Expand description
Offline Windows DPAPI decryption — a DonPAPI/dploot-class core in pure Rust. No FFI, no live host: point it at files copied off disk.
masterkey— parse a user masterkey file and decrypt it from the user’s password + SID.blob— parse aDPAPI_BLOB(CryptProtectDataoutput) and decrypt it with a masterkey.crypto— the underlying primitives.
§VALIDATION STATUS (read this)
This is the one crate in the ADhammer set that is a from-scratch crypto build, not an extraction of already-live code. Its honesty bar is therefore explicit:
- Primitives — VALIDATED. PBKDF2-HMAC-SHA1 (RFC 6070), HMAC-SHA1 (RFC 2202) and
HMAC-SHA512 (RFC 4231) are checked against published known-answer vectors in
crypto’s tests — a genuine external oracle, not a self-round-trip. - Parsers — VALIDATED (structure). Deterministic layout tests for the masterkey file,
masterkey subfield, and
DPAPI_BLOB, plus truncation-safety. - The DPAPI chain — NOT YET VALIDATED end-to-end. The masterkey/blob derivation follows
MS-DPAPI and impacket’s
dpapi.py, but has not been run against a real masterkey. Do not treat masterkey/blob decryption as proven until [test_real_masterkey] passes. Validate the same way ADhammer validated WMI/DCSync: on Kali, run impacketdpapi.py masterkey/credentialagainst the same files as the byte-oracle.
Re-exports§
pub use blob::DpapiBlob;pub use masterkey::MasterKey;pub use masterkey::MasterKeyFile;
Modules§
- blob
- DPAPI data-blob (
DPAPI_BLOB) parsing and decryption. - crypto
- DPAPI crypto primitives. These are the parts validated against published RFC
known-answer vectors (see the tests) — PBKDF2-HMAC-SHA1 (RFC 6070) and HMAC (RFC 2202 /
4231). The DPAPI-specific derivation that uses them lives in
masterkey/blob. - masterkey
- DPAPI user masterkey file parsing and decryption.
Enums§
- Dpapi
Error - Errors from parsing or decrypting DPAPI structures.
Functions§
- unlock_
masterkey - Convenience: decrypt a masterkey file’s masterkey from a password + SID.