Linux command
impacket-mssqlclient 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Connect to MSSQL server
impacket-mssqlclient [domain]/[user]:[password]@[target]
Connect with Windows authentication
impacket-mssqlclient -windows-auth [domain]/[user]:[password]@[target]
Specify port
impacket-mssqlclient -port [1433] [user]:[password]@[target]
Execute query
impacket-mssqlclient [user]:[password]@[target] -q "[SELECT @@version]"
说明
impacket-mssqlclient connects to Microsoft SQL Server databases for executing queries and database operations. Part of the Impacket toolkit. Supports SQL and Windows authentication. Interactive mode provides a SQL shell for commands like xp_cmdshell.
参数
- -windows-auth
- Use Windows authentication.
- -port _port_
- SQL Server port (default 1433).
- -q _query_
- Execute query and exit.
- -file _file_
- Execute SQL from file.
- -hashes _lm:nt_
- Use NTLM hashes.
FAQ
What is the impacket-mssqlclient command used for?
impacket-mssqlclient connects to Microsoft SQL Server databases for executing queries and database operations. Part of the Impacket toolkit. Supports SQL and Windows authentication. Interactive mode provides a SQL shell for commands like xp_cmdshell.
How do I run a basic impacket-mssqlclient example?
Run `impacket-mssqlclient [domain]/[user]:[password]@[target]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -windows-auth do in impacket-mssqlclient?
Use Windows authentication.