Skip to content

Impacket rpcdump.py

Back to the category index / Back to the command index

Queries the Endpoint Mapper and lists the RPC interfaces and connection details exposed by a target host.

ItemDetails
Implementationexamples/rpcdump.py
CategorySMB / MSRPC / NTLM
Size208 lines
DistributionInstalled as a script through scripts=examples/*.py in setup.py

Run python examples/rpcdump.py -h for the current option definitions.

ArgumentDescription
target[[domain/]username[:password]@]
-debugEnable debug output
-tsAdd a timestamp to each log message
-target-ipTarget machine IP address; if omitted, use the target value. Useful when a NetBIOS target name cannot be resolved
-portPort for the RPC Endpoint Mapper (choices: 135, 139, 443, 445, 593; default: 135)
-hashesNTLM hashes in LMHASH:NTHASH format

The tool builds a transport over ports such as 135, 139, 445, or 443, binds to the EPM interface, pages through hept_lookup, and parses towers. It maps UUIDs to known names, groups entries by binding, and displays them.

The Endpoint Mapper stores registration information for RPC interfaces and binding endpoints on a host. rpcdump connects to the EPM interface and repeatedly calls ept_lookup to retrieve towers and annotations. Rather than scanning ports, it asks the RPC runtime which interface UUIDs, versions, and protocol sequences it exposes.

A tower has multiple floors representing interface UUIDs, transfer syntaxes, TCP ports, named pipes, hosts or addresses, and other details. The epm helper converts floors into string bindings and adds human-readable protocol names by checking a database of known UUIDs. An interface may have multiple registered endpoints or bindings.

EPM responses use pages and context handles, so the first response may not contain every entry. Connection failures also mean different things for RPC over HTTP, SMB transport, and TCP. Even when annotations are empty, UUIDs are unknown, or tower floors are unsupported, an analysis tool should display the raw UUID, version, and binding.

SymbolLocationWhere to trace its responsibility
RPCDump36__init__(), dump()
ModuleMain names used
impacket.httpAUTH_NTLM
impacket.exampleslogger
impacket.examples.utilsparse_target
impacketuuid, version
impacket.dcerpc.v5epm, transport
impacket.dcerpc.v5.rpchRPC_PROXY_CONN_A1_0X6BA_ERR, RPC_PROXY_CONN_A1_404_ERR, RPC_PROXY_INVALID_RPC_PORT_ERR, RPC_PROXY_RPC_OUT_DATA_404_ERR

Output, side effects, and required privileges

Section titled “Output, side effects, and required privileges”
  • The tool primarily makes queries and authentication attempts. Frequent runs can affect audit logs, account lockouts, and target load.
  • On failure, use protocol status codes to determine whether name resolution, connection, authentication, service state, or permissions caused the stop.

The code depends on dcerpc.v5.epm, transport, rpch, impacket.uuid, and HTTP NTLM authentication. RPCDump.dump() selects the transport and enumerates interfaces, retaining RPC-over-HTTP-specific errors for diagnosis.