Pentesting MsSql
ms-sql-s port 1433
Use
impacket mssqlclient.py
to connect
https://book.hacktricks.xyz/pentesting/pentesting-mssql-microsoft-sql-server
Check what is the role we have in the server
If the output is 1 , it translates to True .
Check to see if
xp_cmdshell
is enabled
Set up the command execution through the
xp_cmdshell
:
First as it’s disabled by default:
Now we are able to execute system commands:
Better Command Execution
Get a shell on target with
nc
ormsfvenom
Find the admin password from the shell
Last updated