diff --git a/autorecon/default-plugins/http_server.py b/autorecon/default-plugins/http_server.py index 479f966..c8711ec 100644 --- a/autorecon/default-plugins/http_server.py +++ b/autorecon/default-plugins/http_server.py @@ -79,6 +79,31 @@ class CurlRobots(ServiceScan): else: info('{bblue}[' + fformat('{tag}') + ']{rst} There did not appear to be a robots.txt file in the webroot (/).') +class CurlKnownSecurity(ServiceScan): + + def __init__(self): + super().__init__() + self.name = "Known Security" + self.tags = ['default', 'safe', 'http'] + + def configure(self): + self.match_service_name('^http') + self.match_service_name('^nacn_http$', negative_match=True) + + async def run(self, service): + if service.protocol == 'tcp': + process, stdout, _ = await service.execute('curl -sSikf {http_scheme}://{addressv6}:{port}/.well-known/security.txt', future_outfile='{protocol}_{port}_{http_scheme}_known-security.txt') + + lines = await stdout.readlines() + + if process.returncode == 0 and lines: + filename = fformat('{scandir}/{protocol}_{port}_{http_scheme}_known-security.txt') + with open(filename, mode='wt', encoding='utf8') as robots: + robots.write('\n'.join(lines)) + else: + info('{bblue}[' + fformat('{tag}') + ']{rst} There did not appear to be a .well-known/security.txt file in the webroot (/).') + + class DirBuster(ServiceScan): def __init__(self): diff --git a/autorecon/default-plugins/smb.py b/autorecon/default-plugins/smb.py index e5319ab..08b1459 100644 --- a/autorecon/default-plugins/smb.py +++ b/autorecon/default-plugins/smb.py @@ -82,7 +82,7 @@ class SMBClient(ServiceScan): self.run_once(True) async def run(self, service): - await service.execute('smbclient -L\\\\ -N -I {address} 2>&1', outfile='smbclient.txt') + await service.execute('smbclient -L //{address} -N -I {address} 2>&1', outfile='smbclient.txt') class SMBMap(ServiceScan): diff --git a/autorecon/main.py b/autorecon/main.py index 2ef271e..22e0762 100644 --- a/autorecon/main.py +++ b/autorecon/main.py @@ -17,7 +17,7 @@ from autorecon.io import slugify, e, fformat, cprint, debug, info, warn, error, from autorecon.plugins import Pattern, PortScan, ServiceScan, Report, AutoRecon from autorecon.targets import Target, Service -VERSION = "2.0.5" +VERSION = "2.0.6" if not os.path.exists(config['config_dir']): shutil.rmtree(config['config_dir'], ignore_errors=True, onerror=None) diff --git a/pyproject.toml b/pyproject.toml index 54bc16a..fe05d3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "autorecon" -version = "2.0.5" +version = "2.0.6" description = "A multi-threaded network reconnaissance tool which performs automated enumeration of services." authors = ["Tib3rius"] license = "GNU GPL v3"