What problem does it solve?
During authorized penetration tests, Microsoft SQL Server instances often expose weak SA credentials, enabled xp_cmdshell, linked servers, and NTLM coercion paths that manual testing can miss. This Skill provides a structured methodology to enumerate, exploit, and document MSSQL attack surfaces with concrete confirmation steps.
Core Features & Use Cases
- Enumeration and Authentication: Discover instances via nmap NSE scripts and Metasploit, then authenticate with impacket-mssqlclient, sqsh, netexec, or brute-force tools like Hydra and MSSqlPwner.
- Exploitation Primitives: Enable xp_cmdshell for OS command execution, coerce NTLM hashes via xp_dirtree for capture or relay, read files with OPENROWSET BULK, and write webshells through Ole Automation Procedures.
- Lateral Movement: Pivot through linked servers with EXEC (...) AT [LINK], escalate from db_owner to sysadmin, and leverage MSSQLSvc SPN silver tickets.
- Use Case: A tester finds port 1433 open on an internal host, connects with empty sa credentials, confirms sysadmin membership, enables xp_cmdshell, and documents full OS command execution as the SQL service account in a structured finding report.
Quick Start
Use the pentesting-mssql skill to enumerate and test the SQL Server instance at the target IP for weak credentials and xp_cmdshell execution.