Skip to content

Protocols and Library Modules

Back to the Command Index

These pages trace technologies used across commands, from the underlying communication and data formats to Impacket’s implementation. For example, the Kerberos page first covers ticket exchanges, then explains functions and key handling in impacket/krb5/. The command pages cover the behavior and branches of each CLI, while the Active Directory guides cover authentication and operations on the Windows side.

The current code is the authority for its implementation. Microsoft’s published specifications ([MS-SMB2], [MS-NLMP], [MS-KILE], [MS-RPCE], [MS-PAC], and others) provide background, but these pages identify features Impacket does not implement and places where it deliberately simplifies the specification.

  1. Structure and the Binary DSL — the basis for almost every PDU
  2. The page for the protocol of interest
  3. The command pages that use that protocol
PageTarget ModulesMain Command Categories
Structurestructure.pyGeneral
SMB / NetBIOSnmb, smb, smb3, smb3structs, smbconnection, smbserverSMB-RPC, RemoteExecution
NTLM / SPNEGO / NEGOEXntlm, spnego, negoexSMB-RPC
Kerberoskrb5.*Kerberos
DCE/RPC and NDRdcerpc.v5.*SMB-RPC, RemoteExecution, ActiveDirectory
LDAP and AD Security Descriptorsldap.*, ldaptypes, msada_guidsActiveDirectory
DPAPI / SAM / LSA / NTDSdpapi, dpapi_ng, winregistry, ese, examples.secretsdumpSecrets-Storage
TDS / MQTT / Exchangetds, mqtt, dcerpc.v5.nspiDatabase-Messaging
Packets / Registry / ESE / NTFSImpactPacket, ImpactDecoder, IP6*, ese, winregistryNetwork-Packets, Secrets-Storage

Differences Between Specification and Implementation

Section titled “Differences Between Specification and Implementation”

Impacket implements the portions needed for research and testing, not every part of the specifications. In particular, changing code based only on a specification can break the following behavior.

  • Both SMB2 and SMB3 client implementations are in smb3.py.
  • NTLMv2 is selected by the local USE_NTLMv2 setting, not a negotiation bit.
  • S4U2self / S4U2proxy / U2U are mainly in examples/getST.py, not krb5.kerberosv5.
  • impacket.acl handles SMB/NTFS file ACLs, not the AD nTSecurityDescriptor.
  • SimpleSMBServer accepts SMB 2.0.2, 2.1, and 3.1.1. It does not offer SMB 3.0 or 3.0.2.