Back to services
directory1433/tcp

MSSQL in AD Environments

AD MSSQLMSSQL DomainLinked SQL Server

MSSQL in Active Directory environments uses integrated authentication and linked servers, enabling lateral movement across the domain via database links.

Ports

PortProtocolDescription
1433tcpMSSQL
445tcpSMB
88tcpKerberos

Fingerprints

Banner / ProbeExpected Response
nmap -sV -p <port> <target>Service banner and version info
nc -nv <target> <port>Raw banner grab

Key Files

PathDescription
C:\Windows\NTDS\ntds.ditAD database with all password hashes
C:\Windows\System32\config\SAMLocal SAM password hashes
C:\Windows\System32\config\SYSTEMSystem hive (boot key for hash decryption)
C:\Windows\System32\config\SECURITYSecurity policy and cached domain credentials
%USERPROFILE%\AppData\Roaming\Microsoft\Credentials\Saved Windows credentials

Default Credentials

UsernamePasswordContext
sa(empty)SQL Server system admin
saPassword123Common test password

Known CVEs

IdentifierTypeDescription
AuthWeak SA password / default SA creds

Exploitation Primitives

TechniqueTool / CommandResult
Impersonate SAsqsh -S <target> -U saConnect as sysadmin
xp_cmdshell RCEEXEC xp_cmdshell 'whoami'RCE via xp_cmdshell
Linked ServerEXEC sp_linkedserversPivot through linked servers

Notes

xp_cmdshell is disabled by default in modern SQL Server. Enable it with:

`EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;`

Linked servers in AD environments are a goldmine for lateral movement.

Tools: `sqsh`, `impacket-mssqlclient`, `netexec mssql`.

Seen on

ShodanCensysFOFAZoomEye

References