ACL Attacks

AdminSDHolder

General

  • Resides in the System container of a domain

  • Used to control the permissions - using an ACL - for certain built-in privileged groups (called Protected Groups)

  • Security Descriptor Propagator (SDPROP) runs every hour and compares the ACL of protected groups and members with the ACL of AdminSDHolder

  • Any differences are overwritten on the object ACL

  • Protected groups

    • Domain Admins

    • Enterprise Admins

    • Domain Controllers

    • Read-only Domain Controllers

    • Schema Admins

    • Administrators

    • Account Operators

    • Backup Operators

    • Server Operators

    • Print Operators

    • Replicator

Protected Groups Abuse (All of the below Can Log on Locally to DC)

Group
Permissions

Account Operators

Cannot modify DA/EA/BA groups. Can modify nested group within these groups.

Backup Operators

Backup GPO, edit to add SID of controlled account to a privileged group and Restore

Server Operators

Run a command as system (using the disabled Browser service)

Print Operators

Copy ntds.dit backup, load device drivers

Exploitation

  • With DA privileges (Full Control/Write permissions) on the AdminSDHolder object, it can be used as a backdoor/persistence mechanism by adding a user with Full Permissions (or other interesting permissions) to the AdminSDHolder object

  • In 60 minutes (when SDPROP runs), the user will be added with Full Control to the AC of groups like Domain Admins without actually being a member of it

Abusing FullControl Rights

Abusing ResetPassword Rights

Rights Abuse

General

  • Add useful rights to domain user

  • With DA privileges we can modify the ACL for the domain root to provide

    • FullControl

    • Ability to run DCSync

Exploitation

FullControl Rights

DCSync Rights

ResetPassword Rights

WriteMembers Rights

Security Descriptors

General

  • It's possible to modify Security Descriptors (security information like Owner, primary group, DACL and SACL) of multiple remote access methods (secureable objects to allow access to non-admin users)

  • Admin privileges required

  • Security Description Definition Language defines format for Security Descriptors

  • SDDL uses ACE strings for DACL and SACL

  • ACE for built-in administrators for WMI namespaces

Exploitation

Using samratashok's RACE.ps1

WMI

Modify ACLs to allow non-admin users access to securable objects

PowerShell Remoting

Enable PS Remoting

Remote Registry

Remote registry changes and backdoors

Detection

  • Events (Audit Policy for object must be enabled)

    • 4662: An operation was performed on an object

    • 5136: A directory service object was modified

    • 4670: Permissions on an object were changed

  • Useful tools:

Last updated