ms-pac-forge
Pure-Rust MS-PAC marshaling and Golden / Silver Kerberos ticket forgery. For AD red-teamers and detection engineers who want a scriptable, embeddable ticket forge without shelling out to popular Kerberos clients or spec-vector captures. Part of the icedracon offensive-AD Rust ecosystem, extracted from adhammer 1.3.1.
Status
0.1.0-dev — pre-alpha, expect breaking changes before 0.1.0. Golden and Silver builders are byte-validated against a live Windows Server 2025 KDC PAC; Diamond and Sapphire modes are on the roadmap. No live KDC transport lives here — this crate emits raw Ticket / session-key / PAC bytes; wire them to your own AS/TGS layer or MIT ccache serializer.
What it does
Builds a KERB_VALIDATION_INFO NDR buffer whose layout was diffed byte-for-byte against a live 2025 DC PAC, signs it (SERVER_CHECKSUM + KDC_CHECKSUM, AES256-HMAC-SHA1-96 via picky-krb or RC4-HMAC-MD5 via the hand-rolled checksum module), wraps it in an EncTicketPart, and seals it under the krbtgt key (Golden) or a service-account key (Silver). KB5020805 posture is respected out-of-the-box — both PAC signatures are emitted and PAC_ATTRIBUTES + PAC_REQUESTOR buffers are always present, so tickets survive DC-side signature enforcement that broke pre-2022 forgers.
Usage
use ForgeIdentity;
use forge_golden_tgt;
let id = ForgeIdentity ;
let krbtgt_aes256 = ; // from `dcsync krbtgt` or a lab dump
let tgt = forge_golden_tgt
.expect;
// tgt.ticket_cipher() is the sealed EncTicketPart ready to drop into a KRB_CRED
// or ccache; tgt.session_key gets you the AP-REQ authenticator.
let _cipher = tgt.ticket_cipher;
forge::forge_silver_tgt takes the same shape with the service-account key instead of the krbtgt.
What works / what does not (this version)
- ✅ Working:
KERB_VALIDATION_INFONDR build + parse (byte-verified vs live 2025 KDC),PAC_CLIENT_INFO/PAC_ATTRIBUTES/PAC_REQUESTOR/SERVER_CHECKSUM/KDC_CHECKSUMbuffers, Golden TGT forge (krbtgt-sealed, AES256 or RC4), Silver TGS forge (service-account-sealed), RC4-HMAC (etype 23) +KERB_CHECKSUM_HMAC_MD5(-138) hand-rolls, KB5020805 extended-signatures posture. - ⚠ Deferred: Diamond (TGS-REP tamper) and Sapphire (S4U2self-driven, KB5020805-native from the start — breaks the popular Kerberos clients-only monopoly on this technique) modes. Full PAC dissector for arbitrary buffers beyond
KERB_VALIDATION_INFO. AS/TGS transport (seems-kile).
Related icedracon crates
ms-nrpc— Netlogon secure channel + read-only Zerologon cred probe; upstream source for machine-account credentials that seed Silver forges.credssp— feed a forged ticket intoCredSspClient::with_kerberos_ticketfor RDP/WinRM NLA pass-through.ms-gkdi— LAPS-v2 + gMSA + dMSA key derivation; recover the service-account key Silver forges seal under.
License
MIT © 2026 zevs