Skip to main content

ms_nrpc/
lib.rs

1//! # ms-nrpc
2//!
3//! MS-NRPC (Netlogon) — the minimum secure-channel setup needed to **detect
4//! Zerologon** (CVE-2020-1472) without touching the machine password.
5//!
6//! ## Scope
7//! - [`secure_channel`] — NDR encoders for `NetrServerReqChallenge` and
8//!   `NetrServerAuthenticate3`, plus the AES-128-CFB8 primitive and the
9//!   HMAC-SHA256 session-key derivation from MS-NRPC 3.1.4.3.1.
10//! - [`detect`] — a **read-only** Zerologon probe that establishes an
11//!   authenticated session with the all-zero client credential and reports
12//!   whether the DC accepted it. Never sets the machine password.
13//!
14//! ## Deliberately not here
15//! `NetrServerPasswordSet2` (the destructive step that zeroes the machine
16//! password) and the corresponding restore flows are intentionally NOT
17//! included. Those live inside adhammer as an internal, gated module so this
18//! crate stays useful to defenders (hunt-friendly) without shipping a
19//! ready-made DC-bricking primitive on crates.io.
20
21#![deny(unsafe_code)]
22
23pub mod detect;
24pub mod secure_channel;