impacket
Network protocols Constructors and Dissectors
What it is and what it does
Impacket is a collection of Python classes for working with network protocols at the packet level. It provides both low-level packet construction and parsing capabilities, as well as high-level protocol implementations for SMB (versions 1–3), MSRPC, LDAP, Kerberos, and related Windows authentication mechanisms. The library lets you build packets from scratch or dissect raw data into structured objects, making it useful for network analysis, protocol testing, and security research.
The package is maintained by Fortra's Core Security and supports Python 3.9 through 3.13. It comes with a set of command-line tools demonstrating practical use cases. The library's primary dependencies are cryptographic (pycryptodomex, pyOpenSSL, pyasn1) and protocol-specific (ldap3, ldapdomaindump, flask for some tools). The project explicitly disclaims production use, positioning itself as a research and educational tool for protocol implementation and security work.
Use it for:
- Construct and send SMB protocol messages to interact with Windows file shares and network resources programmatically.
- Implement MSRPC clients to call remote procedures on Windows systems for administrative or security research tasks.
- Parse and analyze network traffic to understand protocol behavior or reverse-engineer protocol implementations.
- Build security testing tools that authenticate using NTLM, Kerberos, or plain credentials over SMB or MSRPC.
- Develop LDAP clients to query Active Directory or other directory services from Python.
- Dissect Ethernet, IP, TCP, UDP, and other low-level packets for network diagnostics or protocol analysis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Impacket provides low-level Python classes for constructing and parsing network protocol packets, with particular depth in SMB, MSRPC, LDAP, and Kerberos implementations for Windows network interaction.
Yes, if you are doing Windows network protocol work, security research, or protocol analysis. The package is actively maintained, has low install friction, and carries no known vulnerabilities. However, the maintainers explicitly disclaim production use; apply proper security practices if you use it in any real environment. The permissive license poses no barrier to adoption.
Install
impacket on PyPI
pip
pip install impacketuv
uv add impacketpoetry
poetry add impacketInstalling impacket
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance as of 87 days ago. Depends on 10 runtime packages including cryptographic libraries (pycryptodomex, pyOpenSSL) and protocol handlers (ldap3, ldapdomaindump), all of which are standard ecosystem choices.
License in practice
Licensed under a modified Apache license (permissive treatment), meaning you can use, modify, and distribute the code with minimal restrictions, though you should review the LICENSE file for the specific modifications to the standard Apache terms.
Quickstart
pip install impacket
from impacket.smbconnection import SMBConnection
conn = SMBConnection('target_host', 'target_host')
Requires network access to target systems; cryptographic dependencies (pycryptodomex, pyOpenSSL) may require system libraries on some platforms.
Verify before relying
- Whether the package is suitable for production use given its disclaimer emphasizing research and educational purposes.
- Current state of Python 3.9+ support compatibility in practice.
- Whether all MSRPC interfaces listed (EPM, DTYPES, LSAD, LSAT, NRPC, RRP, SAMR, SRVS, WKST, SCMR, BKRP, DHCPM, EVEN6, MGMT, SASEC, TSCH, DCOM, WMI, OXABREF, NSPI, OXNSPI) are fully or partially implemented.
Package facts
| License | Apache modified (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — pyasn1, pyasn1_modules, pycryptodomex, pyOpenSSL, six, ldap3, ldapdomaindump, flask, charset_normalizer, pyreadline3 |
| Maintenance | actively maintained — 87 days since the last release |
| First released | |
| Downloads | 654,488/month — #5,523 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: impacket-0.13.1-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
dpktdpkt parses and creates TCP/IP protocol packets…
permissive · top 5,000 on PyPI
smbprotocolSMBv2 and SMBv3 client library for Python that…
permissive · top 5,000 on PyPI
msldapmsldap is a Python library for querying and…
permissive · top 15,000 on PyPI
scapyScapy is a Python library for forging,…
copyleft · top 5,000 on PyPI
pyspnegoHandles SPNEGO, NTLM, Kerberos, and CredSSP…
permissive · top 1,000 on PyPI
pydivertPyDivert is a Python binding for the WinDivert…
copyleft · top 15,000 on PyPI
pmd-net-protoParses, assembles, and validates network…
copyleft · top 15,000 on PyPI
sspilibProvides Python bindings to the Windows SSPI…
permissive · top 5,000 on PyPI
pysmbpysmb implements the SMB/CIFS protocol to let…
permissive · top 5,000 on PyPI
bloodhoundBloodHound.py is a Python ingestor that…
permissive · top 15,000 on PyPI