Skip to main content

Python network protocol toolkit

Low-level programmatic access to network protocols. Build powerful security tools with comprehensive SMB, Kerberos, LDAP, and MS-RPC implementations.

15K+ GitHub Stars
Python 3.9 - 3.13
68+ Example Tools

Quick start

Get up and running with Impacket in minutes

1

Install Impacket

Install via pip or pipx for system-wide access to all tools:
python3 -m pipx install impacket
Or for development, install from source:
git clone https://github.com/fortra/impacket.git
cd impacket
python3 -m pip install .
2

Connect to an SMB share

Use the high-level SMBConnection API to interact with remote shares:
from impacket.smbconnection import SMBConnection

conn = SMBConnection("TARGET", "192.168.1.10")
conn.login("username", "password")

# List files in a share
files = 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 system
secretsdump.py domain/user:[email protected]

# Execute commands remotely
wmiexec.py domain/user:[email protected]

# Extract Kerberos tickets
GetUserSPNs.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

Resources

Everything you need to build with Impacket

API Reference

Complete API documentation for all modules and classes

Examples & Tools

68+ example scripts with detailed usage instructions

GitHub Repository

View source code, report issues, and contribute

Security Policy

Report security vulnerabilities responsibly

Ready to get started?

Install Impacket and start building powerful network protocol tools today

Get Started Now