Expand description
ms-rodc — Read-Only Domain Controller audit primitives.
§Why RODCs need their own audit surface
An RODC has:
- Its own per-RODC krbtgt account (
krbtgt_NNNNN) with its own key. A ticket forged with the domain krbtgt won’t validate at an RODC and vice-versa, but forging a TGT with a per-RODC krbtgt key is often sufficient to authenticate to services that trust the RODC. - A Password Replication Policy (PRP) — the set of accounts whose
secrets the RODC is allowed to cache locally. Two attributes drive it:
msDS-RevealOnDemandGroup(allow list)msDS-NeverRevealGroup(deny list)
- A revealed set tracking what has actually been cached:
msDS-RevealedList(constructed, per-RODC list of principals whose secrets are cached)msDS-RevealedUsers(per-user link to revealing RODCs — inverse)
Silver-lining detection: if a Tier-0 account (Domain Admins, DA-shaped
service accounts) shows up in an RODC’s msDS-RevealedList, physical
compromise of that RODC hands the attacker a live secret. If the same
account is missing from msDS-NeverRevealGroup, that hole was policy,
not accident.
§What this crate does
RodcObject— normalize an RODC computer object (primaryGroupIDreported as 521,msDS-KrbTgtLinkpointing at its per-RODC krbtgt).per_rodc_krbtgt_dn/per_rodc_krbtgt_sam— build the expected name of the per-RODC krbtgt account for a given RODC (or recover one fromkrbtgt_NNNNNshape).RevealAudit— cross-referencemsDS-RevealedListagainst the tier classification of the revealed principals; surface Tier-0 leakage.ldap_filter_rodc_computers,ldap_filter_krbtgt_all, and friends — ready LDAP filters for enumeration.is_per_rodc_krbtgt_sam— cheap sAMAccountName check (krbtgt_NNNNNorkrbtgt_<numeric>).
§What this crate does not do
- No LDAP transport (bring your own —
ldap3, adhammer’s raw client). - No ticket forgery for the per-RODC krbtgt key — that path lives in
ms-pac-forge(once the caller has extracted the per-RODC krbtgt key via DCSync or SAMR). - No Kerberos AP-REQ path to distinguish where a ticket was issued — a separate RODC-scoped Kerberos client is future work.
Structs§
- Reveal
Audit - Auditor: given a set of RODC objects and a per-principal tier lookup,
return every
(rodc, principal)pair whose presence in the RODC’smsDS-RevealedListwarrants attention. - Reveal
Finding - A single audit finding produced by
RevealAudit. - Rodc
Object - A normalized RODC computer object as consumed from AD.
Enums§
- Reveal
Tier - Classification the caller applies to a principal to decide the severity of its presence on an RODC.
Constants§
- KRBTGT_
AUDIT_ ATTRS - Attributes commonly requested when auditing a krbtgt account (either domain-wide or per-RODC).
- PRIMARY_
GROUP_ RID_ DC - Well-known primary-group RID for a writable DC.
- PRIMARY_
GROUP_ RID_ RODC - Well-known primary-group RID that identifies an RODC computer account.
A DC has
primaryGroupID == 516(Domain Controllers); an RODC hasprimaryGroupID == 521(Read-Only Domain Controllers). - RODC_
AUDIT_ ATTRS - Attributes commonly requested when auditing an RODC.
Functions§
- is_
per_ rodc_ krbtgt_ sam - Cheap sAMAccountName-shape check. Returns the numeric suffix if
samlooks like a per-RODC krbtgt (krbtgt_NNNNN— Microsoft always zero-pads the 5-digit form on RODC provisioning, but we accept any numeric tail for tolerance). - ldap_
filter_ krbtgt_ all - LDAP filter matching every krbtgt account (domain-wide
krbtgtplus every per-RODCkrbtgt_NNNNN). Combined withmsDS-KeyVersionNumberthis drives krbtgt-rotation audits. - ldap_
filter_ per_ rodc_ krbtgt - LDAP filter matching a specific per-RODC krbtgt by its numeric suffix.
- ldap_
filter_ rodc_ computers - LDAP filter matching every RODC computer object in a domain.
- per_
rodc_ krbtgt_ dn - Recover a per-RODC krbtgt full DN under the domain’s
CN=Userscontainer.domain_dnshould be the full defaultNamingContext (e.g.DC=corp,DC=local). - per_
rodc_ krbtgt_ sam - Recover a per-RODC krbtgt sAMAccountName from a numeric suffix (matches
what
Install-ADDSReadOnlyDomainControllerAccountwrites).