What is MSSQL?
Microsoft SQL Server is Microsoft’s enterprise database platform with tight Windows integration.
Common security issues
Weak
saor admin credentials.xp_cmdshell or unsafe features enabled.
Windows authentication exploitation.
SQL injection from apps.
Linked server abuse.
Default ports
1433
Enumeration
Enumerate MSSQL using nmap, nxc, and impacket for DB info
Vulnerability Discovery
Find weak creds and dangerous MSSQL configs like xp_cmdshell
MSSQL Dangerous Configuration Checks
MSSQL Weak Credentials and Default SA Login
Exploitation
RCE, privilege escalation, and credential capture via MSSQL
MSSQL Credential Capture via Forced Authentication
MSSQL Privilege Escalation via Impersonation
Exploit MSSQL IMPERSONATE privileges to escalate from low-privileged login to sysadmin by chaining user impersonation within database execution contexts.
MSSQL RCE via xp_cmdshell
Exploit MSSQL xp_cmdshell to achieve remote code execution, covering enablement via sp_configure, privilege requirements, and command execution techniques.
Post-Exploitation
Pillage DBs, dump password hashes, and loot stored credentials
MSSQL Credential Dump
Techniques for extracting credentials from MSSQL databases post-compromise, including sa accounts, linked server passwords, and stored connection strings.
MSSQL Database Pillaging
Techniques for extracting credentials, data, and secrets from compromised MSSQL instances, including linked servers, agent jobs, and stored procedures.
Privilege Escalation
Escalate MSSQL sysadmin to SYSTEM via Agent Jobs
MSSQL to SYSTEM via SQL Server Agent Jobs
Lateral Movement
Move laterally via MSSQL linked servers using OPENQUERY and AT
Lateral Movement via MSSQL Linked Servers
Exploiting MSSQL linked server trust relationships to pivot across database instances and execute commands on remote SQL servers.