ms-nrpc
STATUS: pre-alpha, defensive-only. Minimum MS-NRPC (Netlogon) surface
needed to detect Zerologon (CVE-2020-1472) over ncacn_ip_tcp, and nothing
more. Destructive Zerologon (NetrServerPasswordSet2 with the all-zero
authenticator, and the corresponding restore paths) is deliberately
excluded — it lives inside adhammer as an internal module per triage
2026-08-08, so the crates.io copy stays useful to defenders without shipping
a ready-made DC-bricking primitive.
What is here
secure_channel— NDR encoders forNetrServerReqChallenge(opnum 4) andNetrServerAuthenticate3(opnum 26), plus:- AES-128-CFB8 with a zero IV (the Netlogon credential cipher).
- HMAC-SHA256 session-key derivation per MS-NRPC 3.1.4.3.1.
- The
EMPTY_NT_OWFconstant and the trailing-NTSTATUS reader.
detect::detect_zerologon— read-only probe: bind Netlogon, retry the all-zero challenge / credential handshake up tomax_attempts, and reportVulnerable { attempts }on the firstSTATUS_SUCCESS. Never writes.
What is not here (on purpose)
NetrServerPasswordSet2encoding.- Any exploit function that sets the DC machine account password to empty.
- Any restore function (
restore_password,restore_password_cleartext).
If you need those for authorized IR / recovery, use them out of the private adhammer copy.
Usage sketch
use ;
# async
The offline test suite (cargo test) exercises the NDR layout and the
AES-CFB8 / HMAC-SHA256 math without touching the network.
License
MIT.