๐Ÿ› ๏ธAbusing ACLs/ACEs

GenericAll/GenericWrite

User/Computer

We can configure a fake SPN on a target account, request a service ticket (TGS), then obtain its hash and perform a Kerberoasting Attack.

Requirements: Having GenericAll or GenericWrite permissions

Linux

# Assign a fake SPN (cifs/gzzcoo) to the account called 'target'.
bloodyAD --host 10.10.10.10 -d domain.htb -u 'user' -p 'password' set object 'target' servicePrincipalName -v 'cifs/gzzcoo'

# Get the TGS ticket of the user we made Kerberoastable.
impacket-GetUserSPNs -dc-ip 10.10.10.10 domain.htb/'user':'password' -request-user 'target'

# Leave the SPN empty on the user we had made Kerberoastable.
bloodyAD --host 10.10.10.10 -d domain.htb -u 'user' -p 'password' set object 'target' servicePrincipalName

Alternative with PowerView.py:

# Through PowerView.py
powerview domain.htb/'user':'password'@10.10.10.10 --dc-ip 10.10.10.10
PV > Set-DomainObject -Identity "TARGET" -Set 'servicePrincipalname=cifs/gzzcoo'

# Automatic process, assigns an SPN to users with permissions, gives you the TGS ticket and then leaves the user as it was.
python3 targetedKerberoast.py --dc-ip 10.10.10.10 -d domain.htb -u 'user' -p 'password'

Windows

AS-REP Roast Attack

We can assign a user the flag (DONT_REQ_PREAUTH), request a ticket (TGT), then obtain a hash and perform AS-REP Roast.

Requirements: Having GenericAll or GenericWrite permissions

Linux

Alternative with PowerView.py:

Windows

Password Modification

Modify another user's password.

Requirements: Having GenericAll permissions

Linux

Verification:

Windows

Script Path Manipulation

WriteProperty on an ObjectType, which in this particular case is Script-Path, allows the attacker to overwrite the login script path of the delegated user, meaning that the next time the delegated user logs in, their system will execute our malicious script.

Requirements: Having GenericAll or GenericWrite permissions

Linux

Windows

AddSelf

The AddSelf permission allows a user to add themselves to a group. This is particularly dangerous when the permission is granted on high-privilege groups or groups that have access to sensitive resources.

Requirements: Having AddSelf permissions on a target group

Method 1 (LDIF File)

Linux

LDIF Content:

Method 2 (bloodyAD)

Linux

Method 3 (PowerView.py)

Linux

Verification:

Group Manipulation

Add ourselves to a group or another domain user.

Linux

Windows

WriteDACL

This permission allows modifying the Discretionary Access Control List (DACL) of an object, enabling the user to change associated permissions. An attacker with WriteDACL could grant themselves additional privileges or revoke legitimate access, compromising system security.

WriteDACL on Domain

Linux

Windows

WriteDACL on Group

Linux

Windows

WriteOwner

An attacker can become the owner of an object. Once the owner has been modified to one that the attacker has access to, they can manipulate the object having absolute control over it.

Requirements: Having WriteOwner permissions on a target object

Method 1 (bloodyAD)

Linux

Method 2 (impacket-owneredit + impacket-dacledit)

Linux

Practical Example:

Method 3 (PowerView.py)

Linux

Windows

ReadLAPSPassword

If an attacker has a user with ReadLAPSPassword privileges, they can read the LAPS password of the machine to which this ACL applies.

Linux

Windows

ReadGMSAPassword

If an attacker has a user with ReadGMSAPassword privileges, they can read the GMSA password of the machine to which this ACL applies.

Linux

ForceChangePassword

If a user has the ForceChangePassword ACL on a user, they can modify the target user's password without needing to know their current password.

Requirements: Having ForceChangePassword permissions on a target user

Method 1 (bloodyAD)

Linux

Method 2 (rpcclient)

Linux

Method 3 (net rpc)

Linux

Method 4 (pth-net)

Linux

Method 5 (PowerView.py)

Linux

Verification:

Windows

Organizational Units ACL

ACLs on Organizational Units (OUs) can be exploited to compromise all objects contained within them.

Non-Privileged Objects

A user with GenericAll or WriteDACL permissions on an OU can add an ACE with FullControl and inheritance enabled, compromising all child objects by inheriting said ACE.

Linux

Last updated