diff --git a/autorecon.py b/autorecon.py index 8d7f8a4..e9fdcde 100644 --- a/autorecon.py +++ b/autorecon.py @@ -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') diff --git a/autorecon/config.py b/autorecon/config.py index 5352c39..26ec78f 100644 --- a/autorecon/config.py +++ b/autorecon/config.py @@ -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, diff --git a/autorecon/targets.py b/autorecon/targets.py index 351d983..b4aba56 100644 --- a/autorecon/targets.py +++ b/autorecon/targets.py @@ -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)