skillfed

impacket

Network protocols Constructors and Dissectors

impacket v0.13.1 654.5K downloads/30d#5,523 on PyPI
Permissive license Apache modified Active released

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 impacket

uv

uv add impacket

poetry

poetry add impacket

Installing 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

Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

SMB protocol implementationMSRPC client librarynetwork packet constructionWindows authentication protocolsLDAP and Kerberos supportprotocol dissectionnetwork protocol parsing
network-protocolswindows-securitypacket-manipulation

More Security packages