Skip to content

Impacket

Collection of Python classes for working with network protocols, with attack and admin tools.

Self-hostedNot yet verified
Report issue
Apache-2.0★ 13000Source project only — not browser-runnable

External Tool

This open-source tool is maintained externally. View the source on GitHub to learn more or run it yourself.

Browse network tools →

What's next with Impacket?

Choose how you want to get started.

Use it free

Open the official tool or demo — no account needed.

Free

Self-host it

Run the open-source version on your own infrastructure.

Open

What is Impacket?

Impacket is an open-source Python library designed for low-level network protocol manipulation and analysis. Developed by Fortra's Core Security (originally by SecureAuth), it provides tools to construct, send, and interpret network packets across various protocols. The project addresses the need for programmatic access to complex protocols like SMB (Server Message Block) and MSRPC (Microsoft Remote Procedure Call), enabling developers and security professionals to interact with network services at a granular level. Its primary users include penetration testers, security researchers, and network analysts who require precise control over protocol interactions. Impacket solves challenges such as reverse-engineering proprietary protocols, testing network defenses, and automating tasks that require deep protocol knowledge without relying on existing tools.

How it works

Impacket is a collection of Python classes that abstract network protocols, allowing developers to work with raw packet data and protocol-specific logic. It focuses on protocols like SMB1-3 and MSRPC, offering both packet construction and full protocol implementation for advanced analysis. The tool is designed for scenarios where direct protocol manipulation is necessary, such as vulnerability research, network reconnaissance, or custom protocol development. Its modular structure enables reuse of components across different applications. Impacket supports crafting and parsing SMB, MSRPC, DNS, and LDAP packets, with detailed handling of SMBv1/v2/v3 for tasks like enumeration and exploit development. It also includes tools like smbserver for creating SMB shares and responder for network discovery.

How to use it

  1. 1Install via pip: `pip install impacket` to access pre-built binaries and dependencies. 2. Import required modules (e.g., `from impacket import smb` for SMB operations). 3. Construct packets using class methods, specifying headers and payloads. 4. Send packets via network sockets or built-in tools like `smbserver` for interactive sessions. Practical tips: Use virtual environments to manage dependencies, verify Python version compatibility, and consult the `examples/` directory for code templates. For advanced use, combine Impacket with libraries like Scapy for custom packet manipulation.

What it can do

  • network protocol tools

Use cases

Assumptions and limitations

Assumptions

  • source: https://github.com/fortra/impacket
  • license: Apache-2.0 — free to use
  • privacy: Self-hosted — you control your data

Limitations

  • Offensive tool — authorized penetration testing and lab use only; unauthorized use is illegal.
  • Limited GUI tools; requires scripting for automation
  • Depends on Python's socket library for low-level networking
  • Focus on specific protocols may exclude broader network analysis
  • Legal risks when used for unauthorized testing without proper authorization

Understanding the result

Collection of Python classes for working with network protocols, with attack and admin tools.

Tool details

  • Clearly flagged when a network request is needed.
  • No account, no sign-up, and no tracking of your content.
  • Powered by (Apache-2.0).
Built with
(fortra/impacket)
License
Apache-2.0
Runs locally
No — requires a network request
Verification
Not yet verified
Input
Query
Output
Text
Open-source source & license

Built with fortra/impacket. OpenToolVault provides the discovery and browser interface while crediting the original project maintainers.

Built with
License
Apache-2.0
View source on GitHub

Open-source project

License: Apache-2.0Source: this project

OpenToolVault is an independent directory. We are not affiliated with or endorsed by this project.

References

Frequently asked

What is Impacket used for?

Impacket is used for low-level network protocol manipulation, including constructing and analyzing packets for SMB, MSRPC, DNS, and LDAP. It enables tasks like network reconnaissance, vulnerability testing, and custom protocol development by providing programmatic access to protocol specifications.

How does Impacket handle protocol implementation?

Impacket implements protocols through Python classes that abstract packet structures, headers, and authentication mechanisms. For SMB, it includes full support for SMBv1/v2/v3, allowing users to send and parse packets while handling encryption and signing. This enables precise control over protocol behavior during testing or analysis.

How do I use Impacket to create an SMB server?

Use the `smbserver` tool from the command line: `python smbserver.py <sharename> <path>`. This creates a fake SMB share for testing, allowing attackers to upload files or execute code. For custom SMB packets, import the `impacket.smb` module and use its classes to build and send requests.

How does Impacket compare to tools like Scapy?

Impacket focuses on specific protocols with full implementation (e.g., SMB, MSRPC), while Scapy is a general-purpose packet manipulation tool. Impacket excels in protocol-specific tasks like SMB enumeration, whereas Scapy offers broader flexibility for arbitrary packet crafting. Both can be used together for hybrid analysis.

How do I resolve a 'socket.error' when using Impacket?

This error typically occurs due to network permissions or firewall restrictions. Ensure the tool has access to the target port (e.g., 445 for SMB). Check Python's socket permissions, disable firewalls temporarily for testing, or use `sudo` for elevated privileges. Verify the target IP and port configuration in the script.

Spotted something wrong with Impacket, or want to maintain it? See how to help.