Use the high-level SMBConnection API to interact with remote shares:
from impacket.smbconnection import SMBConnectionconn = SMBConnection("TARGET", "192.168.1.10")conn.login("username", "password")# List files in a sharefiles = conn.listPath("SHARE", "/*")for f in files: print(f.get_longname())
3
Use built-in tools
Impacket includes 68+ example scripts for common security operations:
# Dump credentials from a remote systemsecretsdump.py domain/user:password@192.168.1.10# Execute commands remotelywmiexec.py domain/user:password@192.168.1.10# Extract Kerberos ticketsGetUserSPNs.py domain/user:password -dc-ip 192.168.1.5
Explore by protocol
Comprehensive implementations of Windows network protocols
SMB/CIFS
Full SMB1, SMB2, and SMB3 client and server implementation for file sharing and remote operations
MS-RPC
DCE/RPC over multiple transports with 40+ interface implementations
Kerberos
Complete Kerberos v5 support for authentication, ticket management, and attacks
LDAP
LDAP protocol for Active Directory queries and ACL manipulation
NetBIOS
NetBIOS name service for network discovery and enumeration
MSSQL/TDS
SQL Server protocol for database operations and command execution
Popular example tools
Battle-tested scripts for security research and penetration testing