mssqlclient.py
Connect to Microsoft SQL Server instances and execute queries. tldr-pages
On several platforms
Several platforms
Connect to Microsoft SQL Server instances and execute queries. Part of the Impacket suite.
Connect to an MSSQL server using Windows authentication
mssqlclient.py -windows-auth domain/username:password@targetIdentifyConnect using SQL server authentication
mssqlclient.py username:password@targetIdentifyConnect using pass-the-hash authentication
mssqlclient.py domain/username@target -hashes LM_Hash:NT_HashIdentifyConnect using Kerberos authentication (requires valid tickets)
mssqlclient.py -k domain/username@targetIdentifyExecute a specific SQL command upon connection
mssqlclient.py username:password@target -query "SELECT user_name();"IdentifyExecute multiple SQL commands from a file
mssqlclient.py username:password@target -file path/to/sql_file.sqlIdentifyConnect to a specific database instance (default is None)
mssqlclient.py username:password@target -db database_nameIdentifyDisplay SQL queries before execution
mssqlclient.py username:password@target -showIdentify