Access Control List (ACL) Abuse
ACLs are lists that define a) who has access to which asset/resource and b) the level of access they are provisioned.
The settings themselves in an ACL are called Access Control Entities
(ACEs
). Each ACE maps back to a user, group, or process (also known as security principals) and defines the rights granted to that principal. Every object has an ACL, but can have multiple ACEs because multiple security principals can access objects in AD. ACLs can also be used for auditing access within AD.
Types of ACLs:
Discretionary Access Control List (DACL) - defines which security principals are granted or denied access to an object. DACLs are made up of ACEs that either allow or deny access. When someone attempts to access an object, the system will check the DACL for the level of access that is permitted. If a DACL does not exist for an object, all who attempt to access the object are granted full rights. If a DACL exists, but does not have any ACE entries specifying specific security settings, the system will deny access to all users, groups, or processes attempting to access it.
System Access Control Lists (SACL) - allow administrators to log access attempts made to secured objects.
Access Control Entities
ACE
Description
Access denied ACE
Used within a DACL to show that a user or group is explicitly denied access to an object
Access allowed ACE
Used within a DACL to show that a user or group is explicitly granted access to an object
System audit ACE
Used within a SACL to generate audit logs when a user or group attempts to access an object. It records whether access was granted or not and what type of access occurred
Parts of ACE
The security identifier (SID) of the user/group that has access to the object (or principal name graphically)
A flag denoting the type of ACE (access denied, allowed, or system audit ACE)
A set of flags that specify whether or not child containers/objects can inherit the given ACE entry from the primary or parent object
An access mask which is a 32-bit value that defines the rights granted to an object

Importance of ACEs
Attackers utilize ACE entries to either further access or establish persistence. These can be great for us as penetration testers as many organizations are unaware of the ACEs applied to each object or the impact that these can have if applied incorrectly.
They cannot be detected by vulnerability scanning tools, and often go unchecked for many years, especially in large and complex environments. During an assessment where the client has taken care of all of the "low hanging fruit" AD flaws/misconfigurations, ACL abuse can be a great way for us to move laterally/vertically and even achieve full domain compromise.
Some example Active Directory object security permissions are as follows. These can be enumerated (and visualized) using a tool such as BloodHound, and are all abusable with PowerView, among other tools:
ForceChangePassword
abused withSet-DomainUserPassword
Add Members
abused withAdd-DomainGroupMember
GenericAll
abused withSet-DomainUserPassword
orAdd-DomainGroupMember
GenericWrite
abused withSet-DomainObject
WriteOwner
abused withSet-DomainObjectOwner
WriteDACL
abused withAdd-DomainObjectACL
AllExtendedRights
abused withSet-DomainUserPassword
orAdd-DomainGroupMember
Addself
abused withAdd-DomainGroupMember
ACL Attacks
ForceChangePassword - gives us the right to reset a user's password without first knowing their password (should be used cautiously and typically best to consult our client before resetting passwords).
GenericWrite - gives us the right to write to any non-protected attribute on an object. If we have this access over a user, we could assign them an SPN and perform a Kerberoasting attack (which relies on the target account having a weak password set). Over a group means we could add ourselves or another security principal to a given group. Finally, if we have this access over a computer object, we could perform a resource-based constrained delegation attack which is outside the scope of this module.
AddSelf
- shows security groups that a user can add themselves to.GenericAll - this grants us full control over a target object. Again, depending on if this is granted over a user or group, we could modify group membership, force change a password, or perform a targeted Kerberoasting attack. If we have this access over a computer object and the Local Administrator Password Solution (LAPS) is in use in the environment, we can read the LAPS password and gain local admin access to the machine which may aid us in lateral movement or privilege escalation in the domain if we can obtain privileged controls or gain some sort of privileged access.

ACL Attacks in the Wild
Abusing forgot password permissions
Help Desk and other IT users are often granted permissions to perform password resets and other privileged tasks. If we can take over an account with these privileges (or an account in a group that confers these privileges on its users), we may be able to perform a password reset for a more privileged account in the domain.
Abusing group membership management
It's also common to see Help Desk and other staff that have the right to add/remove users from a given group. It is always worth enumerating this further, as sometimes we may be able to add an account that we control into a privileged built-in AD group or a group that grants us some sort of interesting privilege.
Excessive user rights
We also commonly see user, computer, and group objects with excessive rights that a client is likely unaware of. This could occur after some sort of software install (Exchange, for example, adds many ACL changes into the environment at install time) or some kind of legacy or accidental configuration that gives a user unintended rights. Sometimes we may take over an account that was given certain rights out of convenience or to solve a nagging problem more quickly.
Last updated