MCPcopy Create free account
hub / github.com/AutoRecon/AutoRecon / NmapMSSQL

Class NmapMSSQL

autorecon/default-plugins/nmap-mssql.py:3–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1from autorecon.plugins import ServiceScan
2
3class NmapMSSQL(ServiceScan):
4
5 def __init__(self):
6 super().__init__()
7 self.name = "Nmap MSSQL"
8 self.tags = ['default', 'safe', 'databases']
9
10 def configure(self):
11 self.match_service_name(['^mssql', '^ms\-sql'])
12
13 def manual(self, service, plugin_was_run):
14 if service.target.ipversion == 'IPv4':
15 service.add_manual_command('(sqsh) interactive database shell:', 'sqsh -U <username> -P <password> -S {address}:{port}')
16
17 async def run(self, service):
18 await service.execute('nmap {nmap_extra} -sV -p {port} --script="banner,(ms-sql* or ssl*) and not (brute or broadcast or dos or external or fuzzer)" --script-args="mssql.instance-port={port},mssql.username=sa,mssql.password=sa" -oN "{scandir}/{protocol}_{port}_mssql_nmap.txt" -oX "{scandir}/xml/{protocol}_{port}_mssql_nmap.xml" {address}')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected