MSSQL enumeration with nmap and netexec
Enumerate MSSQL instances using Nmap scripts and NetExec to identify versions, configurations, linked servers, and credentials.
HackIndex.io
Language
Microsoft SQL Server (MSSQL) runs on TCP port 1433 by default, with the SQL Browser service on UDP port 1434 for instance discovery. Nmap identifies it as ms-sql-s. MSSQL is widely used in enterprise environments and commonly found on Windows domain-joined servers.
Default or weak sa credentials are a frequent finding. Once authenticated, the xp_cmdshell stored procedure can execute OS commands directly. MSSQL also supports linked servers, which can chain access across multiple database instances. Impersonation and privilege escalation through database roles are additional attack vectors.
Use nmap --script ms-sql-info to gather version and instance details. Test credentials with crackmapexec mssql or mssqlclient.py from Impacket. After login, check for xp_cmdshell availability, linked servers, impersonatable logins, and sensitive data in databases.
Enumerate MSSQL using nmap, nxc, and impacket for DB info
Enumerate MSSQL instances using Nmap scripts and NetExec to identify versions, configurations, linked servers, and credentials.
Find weak creds and dangerous MSSQL configs like xp_cmdshell
RCE, privilege escalation, and credential capture via MSSQL
Exploit MSSQL IMPERSONATE privileges to escalate from low-privileged login to sysadmin by chaining user impersonation within database execution contexts.
Exploit MSSQL xp_cmdshell to achieve remote code execution, covering enablement via sp_configure, privilege requirements, and command execution techniques.
Pillage DBs, dump password hashes, and loot stored credentials
Techniques for extracting credentials from MSSQL databases post-compromise, including sa accounts, linked server passwords, and stored connection strings.
Techniques for extracting credentials, data, and secrets from compromised MSSQL instances, including linked servers, agent jobs, and stored procedures.
Escalate MSSQL sysadmin to SYSTEM via Agent Jobs
Move laterally via MSSQL linked servers using OPENQUERY and AT
Exploiting MSSQL linked server trust relationships to pivot across database instances and execute commands on remote SQL servers.
We use cookies to improve your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies. Privacy Policy.