> ## Content Index
> Fetch the complete content index at: https://www.iamkev.io/llms.txt
> Use this file to discover other available public pages before exploring further.

# AdminSDHolder: the template that cuts the spare keys
- URL: https://www.iamkev.io/adminsdholder-the-template-that-cuts-the-spare-keys/
- Published: 2026-11-05T16:34:06.000Z
- Updated: 2026-11-05T16:34:06.000Z
- Description: AdminSDHolder exists to protect Active Directory's most privileged accounts. Edit the wrong ACL and it becomes a persistence mechanism that repairs itself. How it works, how it is abused, and what recovery looks like.
- Author: Kev Johnson
- Tags: Identity, Active Directory, Persistence, Recovery

Most persistence techniques hide. This one tidies up.

This is one of those things where I initially learned about it and though... nah, that seems unlikely. But... I don't mind putting my hands up and admitting that I was wr0ng. This post is likely old news to most who deal with AD admin on a day to day basis, but I'm sharing it for those for who AD security is adjacent to their day job.

AdminSDHolder is a built-in Active Directory object whose job is to keep privileged accounts locked down. Edit the right ACL on it and the same machinery will copy an attacker's access onto every privileged account in the domain, roughly every hour, for as long as nobody looks. If you try to remove that access from an individual account, the machinery puts it back.

Let's level set on two terms before we start, because the rest of the post leans on them. An **ACL** (access control list) is the list of who can do what to an object. An **ACE** is a single entry in that list. That is all the jargon you need.

## What AdminSDHolder actually is

Microsoft describes AdminSDHolder as an object that provides "template" permissions for the protected accounts and groups in a domain. It is created automatically in the System container of every domain, at `CN=AdminSDHolder,CN=System,DC=...`. Domain Admins owns it by default, and by default Enterprise Admins, Domain Admins and Administrators can change it.

"Protected" has a specific meaning. Microsoft lists these accounts and groups: Account Operators, Administrator, Administrators, Backup Operators, Domain Admins, Domain Controllers, Enterprise Admins, Enterprise Key Admins, Key Admins, Krbtgt, Print Operators, Read-only Domain Controllers, Replicator, Schema Admins and Server Operators. Permissions inheritance is disabled on these objects, so they do not pick up permissions from wherever they happen to sit in the directory.

![led SDProp, every 60 minutes by default on the PDC Emulator, pointing to a card listing the fifteen protected accounts and groups. Three notes below cover inheritance being off, the AdminSDProtectFrequency interval of 60 to 7200 seconds, and the RunProtectAdminGroupsTask rootDSE operation. The domain name is illustrative.](https://storage.ghost.io/c/c0/c2/c0c21edb-3a9c-48a0-9633-b78a9738d43c/content/images/2026/11/adminsdholder-fig1-dark.png)

## SDProp, the part that does the copying

SDProp is the process that enforces the template. Per Microsoft, it runs every 60 minutes by default on the domain controller holding the PDC Emulator role. It compares the permissions on AdminSDHolder with the permissions on each protected account and group, and where they differ it resets the protected object to match.

Two knobs matter. The interval is a registry value, `AdminSDProtectFrequency` on the PDC Emulator, between 60 and 7200 seconds. And an administrator can trigger a run on demand by writing `RunProtectAdminGroupsTask` on the rootDSE, which is how people test AdminSDHolder changes without waiting an hour. Microsoft says not to shorten the interval in production, because it can add load on the domain controller.

You will also meet `adminCount`, an attribute that is set to 1 on protected objects. Treat it as a hint, not a verdict. adsecurity.org notes the value is not reset when an object leaves a protected group, so stale values linger. SpecterOps goes further and says adminCount is not a reliable way to determine privileged status.

## Abuse 1: add a key to the template

This is the classic. adsecurity.org describes it as a way to persist administrative access "after having Domain Admin level rights for 5 minutes". The Hacker Recipes lays out the same steps:

1. The attacker already holds enough rights to edit the AdminSDHolder ACL.
2. They add an ACE giving a principal they control a powerful right, such as Full Control.
3. At the next SDProp run, that ACE is stamped onto the protected objects.
4. The principal can now modify things like Domain Admins membership, despite belonging to no privileged group.

The nasty part is the self-repair. adsecurity.org puts it plainly: even if permissions are changed on a protected group or user, SDProp will change them back. So the defender who finds the odd ACE on Domain Admins and removes it from that one object has fixed nothing. The ACE has to come off AdminSDHolder itself.

The Hacker Recipes names Impacket's `dacledit.py` as one tool that can write the ACE from a UNIX-like system. I am not going to paste the command line. The technique is well documented and the interesting part for defenders is what it leaves behind, which comes later.

![Diagram with two cards. Path A, add an entry to the AdminSDHolder ACL, in four steps ending with a controlled principal able to edit Domain Admins while SDProp restamps any single-object fix. Path B, exclude groups from SDProp with dSHeuristics, in three steps covering the 16th character mask of 1, 2, 4 and 8 for Account, Server, Print and Backup Operators. A note below says both are persistence after privilege, not a way in.](https://storage.ghost.io/c/c0/c2/c0c21edb-3a9c-48a0-9633-b78a9738d43c/content/images/2026/11/adminsdholder-fig2-dark.png)

### A caveat that stops this being magic

The Hacker Recipes points out that adminCount-driven protection blocks inheritance, so inheritance flags on an ACE added to AdminSDHolder are largely ineffective for some objects. Its example: the new ACE reaches the Domain Controllers group itself, but members of that group do not inherit it. That matches SpecterOps, who say members of Domain Controllers and Read-only Domain Controllers are deliberately excluded. So "everything privileged gets backdoored" overstates it. The practical reach is wide, though, because Domain Admins, Enterprise Admins, Administrators and the operator groups are all in scope.

## Abuse 2: switch off the tidying for some groups

The second route does not add a key. It stops SDProp looking after certain groups, so any permission an attacker grants on them stays put.

The mechanism is the 16th character of the `dSHeuristics` attribute. Per Elastic's rule documentation, that character is a bitmask: 1 excludes Account Operators, 2 excludes Server Operators, 4 excludes Print Operators and 8 excludes Backup Operators, and values add together. A non-zero 16th character is therefore worth a look. SpecterOps adds a general observation that changes to dSHeuristics have historically mostly reduced security.

## What I could and could not confirm

I searched for a public incident report that names AdminSDHolder as the persistence method in a specific campaign. I did not find one. What does exist:

- **Documented technique:** adsecurity.org and The Hacker Recipes both describe the abuse in detail.
- **Vendor detections:** Elastic ships two prebuilt rules, both rated High severity with a risk score of 73\. The AdminSDHolder Backdoor rule is mapped to Persistence (TA0003), Valid Accounts: Domain Accounts (T1078.002) and Account Manipulation (T1098).
- **Research:** SpecterOps published a long whitepaper and a summary post in October 2025.

Two clarifications. First, MITRE's T1098 page does not mention AdminSDHolder; the mapping is Elastic's, not MITRE's. Second, SpecterOps argues that Microsoft's documentation describes SDProp's relationship to AdminSDHolder inaccurately, and that SDProp does not itself apply the AdminSDHolder descriptor. I have used Microsoft's wording for the overview because it is the one most people will have read. If you are writing detections or teaching this, read the SpecterOps post first.

My analysis: not finding a named public incident is not evidence that it never happens. It is persistence that requires privilege first, it only shows up if directory change auditing is on, and a quiet technique does not generate headlines. But I am labelling that as my reading, not a finding.

## Detection: what the logs can tell you

Elastic's AdminSDHolder rule is built on Windows Security event 5136, and it needs Audit Directory Service Changes switched on. Everything below depends on that.

- **The signal:** a 5136 event where `ObjectDN` is under `CN=AdminSDHolder,CN=System`. The attribute to care about is `nTSecurityDescriptor`, the ACL itself. A separate 5136 on `dSHeuristics` with a non-zero 16th character covers Abuse 2.
- **Correlate:** group related events by `OpCorrelationID`, and match `SubjectLogonId` to 4624 and 4648 records to see who made the change and from where. Elastic is blunt that missing linked authentication records leave the origin unresolved, not benign.
- **Follow through:** look for later 5136 events on protected users and groups, which suggest SDProp has propagated the change. Elastic notes that no follow-on events on one controller does not rule propagation out.

![r object, the nTSecurityDescriptor attribute, or dSHeuristics with a non-zero 16th character. Correlate: group by OpCorrelationID and match SubjectLogonId to 4624 and 4648. Follow: look for later 5136 events on protected objects. Below are the two Elastic rule names, both High severity with risk 73, and the ATT&CK mapping Elastic gives its AdminSDHolder Backdoor rule: TA0003, T1078.002 and T1098.](https://storage.ghost.io/c/c0/c2/c0c21edb-3a9c-48a0-9633-b78a9738d43c/content/images/2026/11/adminsdholder-fig3-dark-2.png)

Two honest limits. A commenter on the adsecurity.org post notes that comparing an ACL against a saved baseline can miss a change that was made and then reverted, and suggests replication metadata version numbers as a sturdier signal. The same comment points out that auditing can be disabled through schema search flags, so log-based detection alone is not a guarantee. That is one commenter's view, not a tested result, but it is worth knowing.

If you want a read-only look at which objects currently carry `adminCount=1`, adsecurity.org suggests an LDAP filter on `admincount=1` with `Get-ADObject`. Here is the shape of it. I have not run this against a live domain, so try it in a lab or with your AD team, and remember the list includes stale objects that left a protected group long ago.

```powershell
# Read-only. Lists user accounts that have adminCount set to 1.
Get-ADObject -LDAPFilter "(&(objectCategory=person)(objectClass=user)(adminCount=1))" -Properties adminCount

```

## Recovery: putting the identity plane back

This is the part I care about most. The bad state is not a file on a server. It is data in the directory, and the directory replicates it everywhere for you.

Elastic's response guidance for the backdoor rule gives a sensible order, and it is worth following in sequence:

1. **Preserve evidence first.** Keep the triggering 5136 event, the correlated change set, the current AdminSDHolder security descriptor and the linked 4624 and 4648 records before you touch anything.
2. **Contain reversibly.** Restrict the modifying account's directory write path or raise monitoring. The dSHeuristics rule's guidance adds: avoid isolating a domain controller unless broader compromise is confirmed.
3. **Restore the source.** Put the AdminSDHolder ACL back to a known good state. For Abuse 2, restore dSHeuristics to the expected value. Fixing a single protected object is pointless because SDProp will restamp it.
4. **Verify replication.** Check the rollback has reached the other domain controllers.
5. **Review protected objects.** Look for unauthorised ACEs or owner changes and roll back only the malicious ones.
6. **Rotate exposed privileged credentials.** Then baseline the expected descriptor and keep 5136 and authentication logging on.

![Diagram of six numbered cards: preserve evidence, contain reversibly, restore the source, verify replication, review protected objects, rotate credentials. A note below says recovery is about a known good directory, not just a known good server.](https://storage.ghost.io/c/c0/c2/c0c21edb-3a9c-48a0-9633-b78a9738d43c/content/images/2026/11/adminsdholder-fig4-dark.png)

This is a tidy example of why identity recovery is not the same as server recovery. You can rebuild every machine and still have the ACE sitting in the directory, quietly re-applying itself. Knowing what "known good" looks like before an incident, and being able to compare against it, is most of the work.

## The short version

- AdminSDHolder is the template, SDProp is the copier, and both are working as designed when abused.
- Two documented abuse paths: add an ACE to the template, or exclude operator groups via dSHeuristics.
- Fix the source, not the symptom, and verify the fix has replicated.

## Sources

- Microsoft Learn, [Appendix C: Protected Accounts and Groups in Active Directory](https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-c--protected-accounts-and-groups-in-active-directory?ref=iamkev.io)
- adsecurity.org, [Persistence Using AdminSDHolder and SDProp](https://adsecurity.org/?p=1906&ref=iamkev.io)
- The Hacker Recipes, [AdminSDHolder abuse](https://www.thehacker.recipes/ad/persistence/adminsdholder?ref=iamkev.io)
- SpecterOps (Jim Sykora), [AdminSDHolder: Misconceptions, Misconfigurations, and Myths](https://specterops.io/blog/2025/10/31/adminsdholder-misconceptions-misconfigurations-and-myths/?ref=iamkev.io)
- Elastic, [AdminSDHolder Backdoor prebuilt rule](https://www.elastic.co/docs/reference/security/prebuilt-rules/rules/windows/persistence%5Fad%5Fadminsdholder?ref=iamkev.io)
- Elastic via detection.fyi, [AdminSDHolder SDProp Exclusion Added](https://detection.fyi/elastic/detection-rules/windows/persistence%5Fsdprop%5Fexclusion%5Fdsheuristics?ref=iamkev.io)
- MITRE ATT&CK, [T1098 Account Manipulation](https://attack.mitre.org/techniques/T1098/?ref=iamkev.io) and [T1078.002 Domain Accounts](https://attack.mitre.org/techniques/T1078/002/?ref=iamkev.io)
- Feature image: Photo by [Giulia Squillace](https://unsplash.com/@giuliasq?ref=iamkev.io) on [Unsplash](https://unsplash.com/photos/a-bunch-of-keys-hanging-on-a-wall-EzasDHwClE8?ref=iamkev.io)