Added simple proxychains support.

Command line option --proxychains will add -sT to Nmap scans.
There is no other logic. At some point there should be checks for each plugin.
This commit is contained in:
Tib3rius 2021-09-05 12:53:17 -04:00
parent 334e4cd4b8
commit cea95aa9eb
3 changed files with 16 additions and 0 deletions

View File

@ -269,6 +269,9 @@ async def service_scan(plugin, service):
addressv6 = '[' + addressv6 + ']'
ipaddressv6 = '[' + ipaddressv6 + ']'
if config['proxychains']:
nmap_extra += ' -sT'
tag = service.tag() + '/' + plugin.slug
info('Service scan {bblue}' + plugin.name + ' {green}(' + tag + '){rst} running against {byellow}' + service.target.address + '{rst}')
@ -473,6 +476,9 @@ async def scan_target(target):
addressv6 = '[' + addressv6 + ']'
ipaddressv6 = '[' + ipaddressv6 + ']'
if config['proxychains']:
nmap_extra += ' -sT'
service_match = False
matching_plugins = []
heading = False
@ -641,6 +647,7 @@ async def main():
nmap_group = parser.add_mutually_exclusive_group()
nmap_group.add_argument('--nmap', action='store', help='Override the {nmap_extra} variable in scans. Default: %(default)s')
nmap_group.add_argument('--nmap-append', action='store', help='Append to the default {nmap_extra} variable in scans. Default: %(default)s')
parser.add_argument('--proxychains', action='store_true', help='Use if you are running AutoRecon via proxychains. Default: %(default)s')
parser.add_argument('--disable-sanity-checks', action='store_true', help='Disable sanity checks that would otherwise prevent the scans from running. Default: %(default)s')
parser.add_argument('--disable-keyboard-control', action='store_true', help='Disables keyboard control ([s]tatus, Up, Down) if you are in SSH or Docker.')
parser.add_argument('--force-services', action='store', nargs='+', help='A space separated list of services in the following style: tcp/80/http/insecure tcp/443/https/secure')

View File

@ -17,6 +17,7 @@ configurable_keys = [
'target_timeout',
'nmap',
'nmap_append',
'proxychains',
'disable_sanity_checks',
'disable_keyboard_control',
'force_services',
@ -28,6 +29,7 @@ configurable_boolean_keys = [
'single_target',
'only_scans_dir',
'create_port_dirs',
'proxychains',
'disable_sanity_checks',
'accessible'
]
@ -51,6 +53,7 @@ config = {
'target_timeout': None,
'nmap': '-vv --reason -Pn',
'nmap_append': '',
'proxychains': False,
'disable_sanity_checks': False,
'disable_keyboard_control': False,
'force_services': None,

View File

@ -51,6 +51,9 @@ class Target:
addressv6 = '[' + addressv6 + ']'
ipaddressv6 = '[' + ipaddressv6 + ']'
if config['proxychains']:
nmap_extra += ' -sT'
plugin = inspect.currentframe().f_back.f_locals['self']
cmd = e(cmd)
@ -149,6 +152,9 @@ class Service:
addressv6 = '[' + addressv6 + ']'
ipaddressv6 = '[' + ipaddressv6 + ']'
if config['proxychains']:
nmap_extra += ' -sT'
plugin = inspect.currentframe().f_back.f_locals['self']
cmd = e(cmd)