MSSQL command
Execute MSSQL command using CrackMapExec

Execute MSSQL command

1
cme mssql 10.10.10.52 -u admin -p '[email protected][email protected]!' --local-auth -q 'SELECT name FROM master.dbo.sysdatabases;'
Copied!
Expected Results:
1
MSSQL 10.10.10.52 1433 None [+] admin:[email protected][email protected]! (Pwn3d!)
2
MSSQL 10.10.10.52 1433 None name
3
MSSQL 10.10.10.52 1433 None --------------------------------------------------------------------------------------------------------------------------------
4
MSSQL 10.10.10.52 1433 None master
5
MSSQL 10.10.10.52 1433 None tempdb
6
MSSQL 10.10.10.52 1433 None model
7
MSSQL 10.10.10.52 1433 None msdb
8
MSSQL 10.10.10.52 1433 None orcharddb
Copied!
When playing with MSSQL, you can use the tool MSDAT from quentinhardy​
GitHub - quentinhardy/msdat: MSDAT: Microsoft SQL Database Attacking Tool
GitHub

Example

Mantis machine is a good example to test MSSQL procotol with CrackMapExec
https://www.hackthebox.eu/home/machines/profile/98
www.hackthebox.eu
​
Last modified 1yr ago