Include web search in command line flags

This commit is contained in:
Cag 2019-04-09 17:36:04 +10:00
Родитель d2fabed02d
Коммит 523cf4f1cc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 130B2DC4484808D2
3 изменённых файлов: 23 добавлений и 2 удалений

Просмотреть файл

@ -41,6 +41,10 @@ sshscan:
direnum:
docker run -v ${PWD}/results:/app/results -it vautomator:latest ./run.py -d $(TARGET)
.PHONY: websearch
websearch:
docker run -v ${PWD}/results:/app/results -it vautomator:latest ./run.py -w $(TARGET)
.PHONY: test
test:
python -m pytest tests/

Просмотреть файл

@ -13,7 +13,7 @@ def sanitise_shell_command(command):
def package_results(output_dir):
# Do reporting (take all the output from
# the prior runs, zip it up
# the prior runs, zip it up)
tarfile = output_dir.split("/")
cmd = (
"tar --warning=no-all -zcf "

19
run.py
Просмотреть файл

@ -74,6 +74,11 @@ def parseCmdArgs():
action='store_true',
help="Run Tenable.io (Nessus) scan on the target",
default=False)
parser.add_argument('-w',
dest='web_search',
action='store_true',
help="Search for this target on the web for interesting content",
default=False)
args = parser.parse_args()
return args
@ -88,6 +93,7 @@ def setupVA(va_target, arguments):
va_target.addTask(task.SSHScanTask(va_target))
va_target.addTask(task.MozillaHTTPObservatoryTask(va_target))
va_target.addTask(task.MozillaTLSObservatoryTask(va_target))
va_target.addTask(task.WebSearchTask(va_target))
va_target.addTask(task.DirectoryBruteTask(va_target, tool="dirb"))
return va_target
@ -106,6 +112,9 @@ def setupVA(va_target, arguments):
if arguments.ssh_scan:
va_target.addTask(task.SSHScanTask(va_target))
va_target.resultsdict.update({'sshscan': False})
if arguments.web_search:
va_target.addTask(task.WebSearchTask(va_target))
va_target.resultsdict.update({'websearch': False})
if "URL" in va_target.getType():
# We have a URL, means HTTP Obs, TLS Obs,
@ -122,6 +131,9 @@ def setupVA(va_target, arguments):
if arguments.direnum_scan:
va_target.addTask(task.DirectoryBruteTask(va_target, tool="dirb"))
va_target.resultsdict.update({'dirbrute': False})
if arguments.web_search:
va_target.addTask(task.WebSearchTask(va_target))
va_target.resultsdict.update({'websearch': False})
else:
if arguments.tlsobs_scan:
va_target.addTask(task.MozillaTLSObservatoryTask(va_target))
@ -131,6 +143,7 @@ def setupVA(va_target, arguments):
va_target.resultsdict.update({'dirbrute': False})
# HTTP Observatory does not like IPs as a target, skipping
va_target.resultsdict.update({"httpobs": "PASS"})
# Also skipping web search for the IP address targets
va_target.resultsdict.update({"websearch": "PASS"})
elif va_target.getType() == "IPv4":
if arguments.tlsobs_scan:
@ -151,6 +164,9 @@ def setupVA(va_target, arguments):
if arguments.direnum_scan:
va_target.addTask(task.DirectoryBruteTask(va_target, tool="dirb"))
va_target.resultsdict.update({'dirbrute': False})
if arguments.web_search:
va_target.addTask(task.WebSearchTask(va_target))
va_target.resultsdict.update({'websearch': False})
return va_target
@ -165,7 +181,7 @@ def showScanSummary(result_dictionary):
if status == "NA":
logger.warning("[!] [ :| ] " + one_task + " scan skipped as not specified.")
elif status == "TIMEOUT":
logger.warning("[!] [ :| ] " + one_task + " timed out and was killed! Run manually.")
logger.warning("[!] [ :| ] " + one_task + " timed out and was killed! Run manually if you like.")
else:
logger.info("[+] [\o/] " + one_task + " scan completed successfully!")
else:
@ -199,6 +215,7 @@ def main():
'tlsobs': "NA",
'httpobs': "NA",
'sshscan': "NA",
'websearch': 'NA',
'dirbrute': "NA"
}
compress_results = True