Groups Nested in Domain Admins Hide Privileged Members From Direct-Membership Audits
Overview
Nesting a group inside Domain Admins gives its members Domain Admin-equivalent rights, yet audits that list only direct membership miss them. AdminSDHolder does protect these nested members, so the gap is in the audit, not the protection.
At a glance
- Symptom
- A privileged-access review of Domain Admins in an Active Directory domain shows a small, expected membership list, yet accounts outside that list retain effective…
- Likely cause
- Active Directory's SDProp process, which runs on the PDC emulator and refreshes protected-object ACLs, iterates the AdminSDHolder protected group list and applies AdminCount=1 plus…
- Impact
- Anyone with control over the nested group, including its owner, members of a group with delegated management rights over it, or an attacker who compromises an account that…
- Verification signal
- Validation confirms the nested group no longer appears in either direct or recursive Domain Admins membership and that no account still has orphaned elevated rights.
- Safe correction
- The correction is to remove group nesting from privileged group membership and grant privileged access only through direct, individually accountable membership.
- Rollback or recovery
- Rollback boundary: reversing this change restores the previous access relationship but does not retroactively resolve any exposure that occurred while the nested group was in place; treat prior…
Symptom
A privileged-access review of Domain Admins in an Active Directory domain shows a small, expected membership list, yet accounts outside that list retain effective Domain Admin rights during audits. Security tooling that alerts on direct changes to Domain Admins produces no alert when the extra access is granted, because the group used to grant it was never added to Domain Admins itself; it was already nested there beforehand. Reports that read only direct membership, or that rely on AdminCount alone, do not show these accounts reliably.
False Assumption
The team assumed that nested groups inside Domain Admins were either not privileged or were somehow outside AdminSDHolder protection. In practice, SDProp resolves membership of protected groups recursively, marks those principals (including members of nested groups) as protected (AdminCount=1) and reapplies the AdminSDHolder ACL to them. The exposure lies somewhere else: whoever controls the nested group object (its owner, its ACL and its delegated managers) can grant Domain Admin-equivalent rights, and tools that read only direct membership miss those members. AdminCount values can also be stale or delayed: a newly added member may not show AdminCount=1 until SDProp has run (by default every 60 minutes), and accounts removed from protected groups may keep AdminCount=1.
Root Cause
Active Directory’s SDProp process, which runs on the PDC emulator and refreshes protected-object ACLs, iterates the AdminSDHolder protected group list and applies AdminCount=1 plus the hardened ACL to members of those groups, including members of nested groups. A group nested inside Domain Admins is itself protected, and so are its members. So the gap is not in how SDProp marks accounts but in who controls the nested group: nested membership is equivalent to direct membership for access-token purposes (Kerberos ticket construction expands group nesting through the full chain), yet many audit tools enumerate only direct membership of the protected group rather than resolving effective membership, and the nested group’s owner and delegated managers can change who is privileged.
Impact
Anyone with control over the nested group, including its owner, members of a group with delegated management rights over it, or an attacker who compromises an account that can add members to that nested group, can quietly grant themselves or others Domain Admin-equivalent rights without ever touching the Domain Admins group directly. Such indirect members may be missed by privileged-account reports that look only at direct Domain Admins membership, and AdminCount values can be stale or delayed, so reports relying on AdminCount=1 alone can be misleading. The result is an escalation path that is hard to see and survives every membership review until someone actually resolves nested group membership.
Diagnosis
Every check here is read-only: find the groups nested in Domain Admins, resolve full effective membership, then look at AdminCount for the accounts that turn up. Run the checks below in an isolated or lab domain first, or use a read-only account with directory-read rights in production, and record the output before drawing conclusions.
Get-ADGroupMember -Identity "Domain Admins" | Where-Object objectClass -eq 'group'
This lists the groups nested directly inside Domain Admins. Next, list every effective member, including principals reached only through nested groups:
Get-ADGroupMember -Identity "Domain Admins" -Recursive | Select-Object Name, SamAccountName, ObjectClass
Then check AdminCount for each effective user member:
Get-ADGroupMember -Identity "Domain Admins" -Recursive | Where-Object { $_.objectClass -eq 'user' } | ForEach-Object { Get-ADUser -Identity $_.SamAccountName -Properties AdminCount } | Select-Object SamAccountName, AdminCount
A user who appears in the recursive membership but shows AdminCount 0 or null warrants investigation: SDProp may not yet have run (default interval 60 minutes) or the value may be stale. Also review the ACL, owner and delegated managers of each nested group found by the first command.
Correction
Start by securing and auditing the nested group: review its ACL, owner and delegated managers, remove unnecessary rights, and review whether the nesting is needed. Before removing any nesting, perform an impact analysis of the accounts and workflows that depend on it. First export and keep the current state, for example:
Get-ADGroupMember -Identity "Domain Admins" -Recursive | Select-Object Name, SamAccountName, ObjectClass | Export-Csv .\DomainAdmins-before.csv -NoTypeInformation
Get-ADGroupMember -Identity "NestedGroupSamAccountName" -Recursive | Select-Object Name, SamAccountName, ObjectClass | Export-Csv .\NestedGroup-members-before.csv -NoTypeInformation
(Get-Acl "AD:$((Get-ADGroup -Identity 'NestedGroupSamAccountName').DistinguishedName)").Access | Export-Clixml .\NestedGroup-acl-before.xml
If removal is approved, run it in a change window with a tested recovery path (the rollback below), and confirm a pilot or lab run first:
Remove-ADGroupMember -Identity "Domain Admins" -Members "NestedGroupSamAccountName" -Confirm
This changes state and can cause outages. It removes only the nested group’s membership in Domain Admins; it does not delete the nested group or its own members, but those members lose Domain Admin rights, and existing sessions and tickets may keep access until they refresh. Before you run it, have the exported membership and ACL above, the diagnosis output and explicit change approval confirming the nesting was unintended or unauthorised. Do not go ahead if any currently on-call privileged workflow depends on that nested group’s membership without a documented replacement access path.
Validation
You are checking two things: the nested group no longer appears in either direct or recursive Domain Admins membership, and no account still has orphaned elevated rights. Re-run the nested-group and recursive membership queries from the diagnosis step and confirm the removed group is absent. Then re-run the AdminCount query and review any AdminCount=1 accounts that are no longer members of any protected group; these require a separate, deliberate cleanup decision and are not resolved by this change alone. The change has worked when the removed nested group is absent, all remaining members are reviewed and approved, and AdminCount=1 is shown for them once SDProp has run (default 60 minutes); built-in accounts may show special states and should be reviewed individually.
Rollback
Reversing this change restores the previous access relationship but does not retroactively resolve any exposure that occurred while the nested group was in place; treat prior access during the exposure window as a separate investigation item. If the removed nested group’s access is confirmed as required after the change, restore it explicitly as documented, reviewed membership, using the exported files as the reference:
Add-ADGroupMember -Identity "Domain Admins" -Members "NestedGroupSamAccountName" -Confirm
If nesting is restored, re-run the diagnosis queries immediately afterwards to reconfirm which accounts are indirectly privileged, verify the nested group’s ACL and delegation, and record the accepted risk explicitly rather than leaving it implicit.
Prevention
A one-off fix will not hold, so put a standing control in place. Add a recurring, read-only check that lists groups nested in Domain Admins (and other AdminSDHolder-protected groups), compares recursive membership against an approved list, and flags unexpected members or nested groups. Treat missing AdminCount=1 on a recursive member as a prompt to check whether SDProp has run, not as proof of exposure. Extend privileged-access reviews to explicitly resolve nested group membership and to review the ACL, owner and delegated managers of nested groups rather than relying on direct-membership listings or on AdminCount filters alone. Where role-based delegation is needed, prefer directly managed, individually reviewed membership in protected groups over nesting role groups inside them, and document any accepted exception with its owner and review date.
Related reading
Apply the safer control
Before you change production
Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.
Fix commands and configuration
Get-ADGroupMember -Identity "Domain Admins" | Where-Object objectClass -eq 'group'Get-ADGroupMember -Identity "Domain Admins" -Recursive | Select-Object Name, SamAccountName, ObjectClassGet-ADGroupMember -Identity "Domain Admins" -Recursive | Where-Object { $_.objectClass -eq 'user' } | ForEach-Object { Get-ADUser -Identity $_.SamAccountName -Properties AdminCount } | Select-Object SamAccountName, AdminCountWhen to escalate
Validation and rollback are covered in the sections above.
Escalate
Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.
Fixed? Get the next one before it hits you: The KBY Brief
Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.
About this page
Credited to
Dates
Published
Last updated
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.