The Hacker Recipes
GitHubTwitterExegolTools
  • Introduction
  • Active Directory
    • Reconnaissance
      • DHCP
      • DNS
      • NBT-NS
      • Responder ⚙️
      • Port scanning
      • LDAP
      • BloodHound ⚙️
      • MS-RPC
      • enum4linux ⚙️
      • Password policy
    • Movement
      • Credentials
        • Dumping
          • SAM & LSA secrets
          • DPAPI secrets
          • NTDS secrets
          • LSASS secrets
          • DCSync
          • Group Policy Preferences
          • Network shares
          • Network protocols
          • Web browsers
          • In-memory secrets
          • Kerberos key list
          • 🛠️Cached Kerberos tickets
          • 🛠️Windows Credential Manager
          • 🛠️Local files
          • 🛠️Password managers
        • Cracking
        • Bruteforcing
          • Guessing
          • Spraying
          • Stuffing
        • Shuffling
        • Impersonation
      • MITM and coerced auths
        • ARP poisoning
        • DNS spoofing
        • DHCP poisoning
        • DHCPv6 spoofing
        • WSUS spoofing
        • LLMNR, NBT-NS, mDNS spoofing
        • ADIDNS poisoning
        • WPAD spoofing
        • MS-EFSR abuse (PetitPotam)
        • MS-RPRN abuse (PrinterBug)
        • MS-FSRVP abuse (ShadowCoerce)
        • MS-DFSNM abuse (DFSCoerce)
        • PushSubscription abuse
        • WebClient abuse (WebDAV)
        • 🛠️NBT Name Overwrite
        • 🛠️ICMP Redirect
        • 🛠️Living off the land
      • NTLM
        • Capture
        • Relay
        • Pass the hash
      • Kerberos
        • Pre-auth bruteforce
        • Pass the key
        • Overpass the hash
        • Pass the ticket
        • Pass the cache
        • Forged tickets
          • Silver tickets
          • Golden tickets
          • Diamond tickets
          • Sapphire tickets
          • RODC Golden tickets
          • MS14-068
        • ASREQroast
        • ASREProast
        • Kerberoast
        • Delegations
          • (KUD) Unconstrained
          • (KCD) Constrained
          • (RBCD) Resource-based constrained
          • S4U2self abuse
          • Bronze Bit
        • Shadow Credentials
        • UnPAC the hash
        • Pass the Certificate
        • sAMAccountName spoofing
        • SPN-jacking
      • DACL abuse
        • AddMember
        • ForceChangePassword
        • Targeted Kerberoasting
        • ReadLAPSPassword
        • ReadGMSAPassword
        • Grant ownership
        • Grant rights
        • Logon script
        • Rights on RODC object
      • Group policies
      • Trusts
      • Netlogon
        • ZeroLogon
      • Certificate Services (AD-CS)
        • Certificate templates
        • Certificate authority
        • Access controls
        • Unsigned endpoints
        • Certifried
      • SCCM / MECM
        • Privilege escalation
        • Post-exploitation
      • Exchange services
        • 🛠️PrivExchange
        • 🛠️ProxyLogon
        • 🛠️ProxyShell
      • Print Spooler Service
        • PrinterBug
        • PrintNightmare
      • Schannel
        • Pass the Certificate
      • Built-ins & settings
        • Security groups
        • MachineAccountQuota
        • Pre-Windows 2000 computers
        • RODC
    • Persistence
      • DC Shadow
      • SID History
      • Skeleton key
      • GoldenGMSA
      • AdminSDHolder
      • Kerberos
        • Forged tickets
        • Delegation to KRBTGT
      • Certificate Services (AD-CS)
        • Certificate authority
        • Access controls
        • Golden certificate
      • 🛠️DACL abuse
      • Shadow Principals (PAM)
  • Web services
    • Reconnaissance
      • HTTP response headers
      • Comments and metadata
      • Error messages
      • Site crawling
      • Directory fuzzing
      • Subdomains enumeration
      • Subdomain & vhost fuzzing
      • Web Application Firewall (WAF)
      • Content Management System (CMS)
      • Other technologies
      • Known vulnerabilities
    • Configuration
      • Default credentials
      • HTTP methods
      • HTTP security headers
        • Clickjacking
        • MIME type sniffing
        • 🛠️CORS (Cross-Origin Resource Sharing)
        • 🛠️CSP (Content Security Policy)
      • HTTP request smuggling
      • HTTP response splitting
      • Insecure Cookies
      • Denial of Service (DoS)
      • Identity and Access Management
        • 🛠️OAuth 2.0
    • Accounts and sessions
      • Security policies
      • Password change
      • 🛠️Password reset
      • Account creation
      • 🛠️Account deletion
      • 🛠️Logging in
    • User inputs
      • File inclusion
        • LFI to RCE
          • logs poisoning
          • phpinfo
          • file upload
          • PHP wrappers and streams
          • PHP session
          • /proc
        • RFI to RCE
      • Unrestricted file upload
      • SQL injection
      • XSS (Cross-Site Scripting)
      • CSRF (Cross-Site Request Forgery)
      • SSRF (Server-Side Request Forgery)
      • IDOR (Insecure Direct Object Reference)
      • ORED Open redirect
      • Content-Type juggling
      • XXE injection
      • Insecure JSON Web Tokens
      • 🛠️HTTP parameter pollution
      • 🛠️SSTI (Server-Side Template Injection)
      • 🛠️Insecure deserialization
      • 🛠️CRLF injection
      • 🛠️Arbitrary file download
      • 🛠️Directory traversal
      • 🛠️Null-byte injection
  • Systems & services
    • Reconnaissance
      • 🛠️Hosts discovery
      • Port scanning
    • Initial access (protocols)
      • 🛠️FTP
      • 🛠️SSH
      • 🛠️Telnet
      • 🛠️DNS
      • 🛠️HTTP
      • 🛠️Kerberos
      • 🛠️LDAP
      • 🛠️SMB
      • 🛠️RTSP
      • 🛠️MSSQL
      • 🛠️NFS
      • 🛠️MySQL
      • 🛠️RDP
      • 🛠️WinRM
    • Initial access (phishing)
    • Privilege escalation
      • Windows
        • 🛠️Credential dumping
        • 🛠️Unquoted path
        • 🛠️Scheduled tasks
        • 🛠️Weak service permissions
        • 🛠️Vulnerable drivers
        • 🛠️Account privileges
        • 🛠️Kernel exploitation
        • 🛠️Windows Subsystem for Linux
        • 🛠️Runas saved creds
        • Unattend files
        • 🛠️Network secrets
        • 🛠️Living off the land
      • UNIX-like
        • SUDO
        • SUID/SGID binaries
        • 🛠️Capabilities
        • 🛠️Network secrets
        • 🛠️Living off the land
    • Pivoting
      • 🛠️Port forwarding
      • 🛠️SOCKS proxy
  • Evasion
    • (AV) Anti-Virus
      • 🛠️Loader
      • 🛠️Dropper
      • 🛠️Obfuscation
      • 🛠️Process injection
      • 🛠️Stealth with C2
    • 🛠️(EDR) Endpoint Detection and Response
  • 🛠️Physical
    • Locks
    • Networking
      • Network Access Control
    • Machines
      • HID injection
      • Keylogging
      • BIOS security
      • Encryption
      • Airstrike attack
    • Super secret zones
      • 🍌Banana & chocolate cake
      • 🍳Omelette du fromage
      • 🍔Burger du seigneur
      • 🥞The Pancakes of Heaven
  • 🛠️Intelligence gathering
    • CYBINT
      • Emails
      • Web infrastructure
    • OSINT
    • GEOINT
  • 🛠️RADIO
    • RFID
      • Mifare Classic
        • Default keys
        • Darkside
        • Nested
    • Bluetooth
    • Wi-Fi
      • 🛠️WEP
      • 🛠️WPA2
      • 🛠️WPS
    • Wireless keyboard/mouse
  • 🛠️mobile apps
    • Android
      • Android Debug Bridge ⚙️
      • APK transform
      • Magisk
    • iOS
      • Certificate pinning
Powered by GitBook
On this page
  • Theory
  • Practice
  • Recon
  • Abuse
  • BloodHound ACE edges
  • Permisssions index
  • Talk
  • Resources

Was this helpful?

  1. Active Directory
  2. Movement

DACL abuse

PreviousSPN-jackingNextAddMember

Last updated 12 months ago

Was this helpful?

Theory

Access privileges for resources in Active Directory Domain Services are usually granted through the use of an Access Control Entry (ACE). Access Control Entries describe the allowed and denied permissions for a principal (e.g. user, computer account) in Active Directory against a securable object (user, group, computer, container, organizational unit (OU), GPO and so on)

DACLs (Active Directory Discretionary Access Control Lists) are lists made of ACEs (Access Control Entries) that identify the users and groups that are allowed or denied access on an object. SACLs (Systems Access Control Lists) define the audit and monitoring rules over a securable object.

When misconfigured, ACEs can be abused to operate lateral movement or privilege escalation within an AD domain.

Practice

If an object's (called objectA) DACL features an ACE stating that another object (called objectB) has a specific right (e.g. GenericAll) over it (i.e. over objectA), attackers need to be in control of objectB to take control of objectA. The following abuses can only be carried out when running commands as the user mentioned in the ACE (objectB) (see ).

Recon

DACL abuse potential paths can be identified by from UNIX-like (using the Python ingestor ) and Windows (using the ingestor) systems.

Other tools like, Get-DomainObjectAcl and Add-DomainObjectAcl from 's , Get-Acl and Set-Acl official Powershell cmdlets, or 's dacledit.py script (Python) can be used in order to manually inspect an object's DACL. At the time of writing, the Pull Request () offering that dacledit is still being reviewed and in active development. It has the following command-line arguments.

Abuse

In order to navigate the notes, testers can use the mindmap below.

All of the aforementioned attacks (red blocks) are detailed in the child notes, except:

Self-attacks

ACE inheritance

If attacker can write an ACE (WriteDacl) for a container or organisational unit (OU), if inheritance flags are added (0x01+ 0x02) to the ACE, and inheritance is enabled for an object in that container/OU, the ACE will be applied to it. By default, all the objects with AdminCount=0 will inherit ACEs from their parent container/OU.

adminCount=1

With enough permissions (GenericAll, GenericWrite) over a disabled object, it is possible to enable it again (e.g. set-aduser "user" -enabled 1)

BloodHound ACE edges

Permisssions index

The following table should help for better understanding of the ACE types and what they allow.

Common name
Permission value / GUID
Permission type
Description

WriteDacl

ADS_RIGHT_WRITE_DAC

Access Right

Edit the object's DACL (i.e. "inbound" permissions).

GenericAll

ADS_RIGHT_GENERIC_ALL

Access Right

Combination of almost all other rights.

GenericWrite

ADS_RIGHT_GENERIC_WRITE

Access Right

Combination of write permissions (Self, WriteProperty) among other things.

WriteProperty

ADS_RIGHT_DS_WRITE_PROP

Access Right

Edit one of the object's attributes. The attribute is referenced by an "ObjectType GUID".

WriteOwner

ADS_RIGHT_WRITE_OWNER

Access Right

Assume the ownership of the object (i.e. new owner of the victim = attacker, cannot be set to another user).

With the "SeRestorePrivilege" right it is possible to specify an arbitrary owner.

Self

ADS_RIGHT_DS_SELF

Access Right

Perform "Validated writes" (i.e. edit an attribute's value and have that value verified and validate by AD). The "Validated writes" is referenced by an "ObjectType GUID".

AllExtendedRights

ADS_RIGHT_DS_CONTROL_ACCESS

Access Right

Peform "Extended rights". "AllExtendedRights" refers to that permission being unrestricted. This right can be restricted by specifying the extended right in the "ObjectType GUID".

User-Force-Change-Password

00299570-246d-11d0-a768-00aa006e0529

Control Access Right (extended right)

Change the password of the object without having to know the previous one.

DS-Replication-Get-Changes

1131f6aa-9c07-11d1-f79f-00c04fc2dcd2

Control Access Right (extended right)

DS-Replication-Get-Changes-All

1131f6ad-9c07-11d1-f79f-00c04fc2dcd2

Control Access Right (extended right)

Self-Membership

bf9679c0-0de6-11d0-a285-00aa003049e2

Validate Write

Edit the "member" attribute of the object.

Validated-SPN

f3a64788-5306-11d1-a9c5-0000f80367c1

Validate Write

Edit the "servicePrincipalName" attribute of the object.

Resources

BloodHound releases

SPN-jacking: very specific scenario, requires lots of access: see

Shadow Credentials: see

Kerberos RBCD: see

GPO abuses: see

DCSync : see

User and computers objects can conduct a attack on themselves.

Computer objects can conduct a attack on themselves.

Impacket's dacledit (Python) can be used with the -inheritance flag for that purpose ().

In April 2024, that if GenericAll, GenericWrite or Manage Group Policy Links privileges are available against an Organisational Unit (OU), then it's possible to compromise its child users and computers with adminCount=1 through "gPLink spoofing".

This can be performed with .

has the ability to map abuse paths, with some that rely on DACL abuse. The following edges are not includes in the mindmap above:

AddKeyCredentialLink, a write permission on an object's Key-Credential-Link attribute, for attacks

WriteSPN, a write permission on an object's Service-Principal-Name attribute, for and attacks

AddSelf, similar to AddMember. While AddMember is WriteProperty access right on the target's Member attribute, AddSelf is a Self access right on the target's Member attribute, allowing the attacker to , instead of adding arbitrary principals.

AddAllowedToAct, a write permission on an object's msDS-Allowed-To-Act-On-Behalf-Of-Other-Identity attribute, for attacks

SyncLAPSPassword, both DS-GetChanges and DS-GetChangesInFilteredSet, for domain-wise

WriteAccountRestrictions, which refers to the User-Account-Restrictions property set, which contains enough permissions to modify the msDS-Allowed-To-Act-On-Behalf-Of-Other-Identity attribute of the target objects, for attacks

One of the two extended rights needed to operate a .

One of the two extended rights needed to operate a .

Talk

🎤
ADDS > Movement > Kerberos > SPN-jacking
ADDS > Movement > Kerberos > Shadow Credentials
ADDS > Movement > Kerberos > Kerberos Delegations > RBCD
ADDS > Movement > GPOs
ADDS > Movement > Credential > Dumping > DCSync
Shadow Credentials
PR#1291
Synacktiv explained
OUned.py
BloodHound
Shadow Credentials
targeted Kerberoasting
SPN jacking
add itself to the target group
Kerberos RBCD
synchronizing LAPS password
Kerberos RBCD
https://medium.com/@_wald0/bloodhound-1-3-the-acl-attack-path-update-74aa56c5eb3a
https://blog.cptjesus.com/posts/bloodhound20/
https://posts.specterops.io/introducing-bloodhound-3-0-c00e77ff0aa6
https://posts.specterops.io/introducing-bloodhound-4-0-the-azure-update-9b2b26c5e350
https://posts.specterops.io/introducing-bloodhound-4-1-the-three-headed-hound-be3c4a808146
https://posts.specterops.io/introducing-bloodhound-4-2-the-azure-refactor-1cff734938bd
DCSync
DCSync
⚠️
impersonation techniques
BloodHound
bloodhound.py
SharpHound
Powersploit
Powerview
Impacket
#1291
[MS-ADTS]: Access Rightsdocsmsft
Logo
ActiveDirectoryRights Enum (System.DirectoryServices)docsmsft
Logo
Abusing Active Directory ACLs/ACEsRed Teaming Experiments
SelfADSI : Active Directory Permissions : Security Descriptors
Scanning for Active Directory Privileges & Privileged AccountsActive Directory Security
Kerberos RCD
Logo