Enumerating AD Object Permissions with dsacls

Enumeration, living off the land

It is possible to use a native windows binary (in addition to powershell cmdlet Get-Acl) to enumerate Active Directory object security persmissions. The binary of interest is dsacls.exe.

Dsacls allows us to display or modify permissions (ACLS) of an Active Directory Domain Services (AD DS).

Execution

Let's check if user spot has any special permissions against user's spotless AD object:

attacker@victim
dsacls.exe "cn=spotless,cn=users,dc=offense,dc=local" | select-string "spot"

Nothing useful:

Let's give user spot Reset Password and Change Password permissions on spotless AD object:

...and try the command again:

Full Control

All well known (and abusable) AD object permissions should be sought here. One of them is FULL CONTROL:

Add/Remove self as member

WriteProperty/ChangeOwnerShip

Enumerating AD object permissions this way does not come in a nice format that can be piped between powershell cmd-lets, but it's still something to keep in mind if you do not the ability to use tools like powerview or ActiveDirectory powershell cmdlets or if you are trying to LOL.

For more good privileges to be abused:

Privileged Accounts and Token PrivilegesAbusing Active Directory ACLs/ACEs

Password Spraying Anyone?

As a side note, the dsacls binary could be used to do LDAP password spraying as it allows us to bind to an LDAP session with a specified username and password:

Logon Failure
Logon Successful

Dirty POC idea for Password Spraying:

References

Last updated