ACL

ko-fiarrow-up-right

Interesting ACL

  • ForceChangePasswordarrow-up-right abused with Set-DomainUserPassword - 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).

  • Add Members abused with Add-DomainGroupMember

  • GenericAllarrow-up-right abused with Set-DomainUserPassword or Add-DomainGroupMember - 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)arrow-up-right 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.

  • GenericWritearrow-up-right abused with Set-DomainObject - 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.

  • WriteOwner abused with Set-DomainObjectOwner

  • WriteDACL abused with Add-DomainObjectACL

  • AllExtendedRights abused with Set-DomainUserPassword or Add-DomainGroupMember

  • Addself abused with Add-DomainGroupMember - shows security groups that a user can add themselves to.

Tools

AbuseACL

Script to automatically list vulnerable Windows ACEs/ACLs.

ACLpwn

SharpADWS

More commands on the github repo

ADACLScanner

PowerDACL

ACL Enumeration

PowerView

One in all

Get-Acl & GetADUser

NXC

Hidden OU ACLs

ForceChangePassword

wley -> ForceChangePassword -> damundsen

Run as wley

New password

Change Pass

With BloodyAD

With RPCclient

GenericWrite

The typical techniques to abuse GenericWrite are:

  • shadowCredentials (windows server 2016 or later)

  • targetKerberoasting (the password should be weak enough to be cracked)

  • Resource-Based Constrained Delegation

circle-check

Add Member - PowerView

Run as damundsen:

Add member

Confirming user wad added to the group

CleanUp - Remove user from group

Add Member - BloodyAD

Disable Kerberos Pre Auth - ASREP Roast

Misconfigurationchevron-right

Targeted Kerberoast

Linux

Windows

Enumerate the permissions for one group with PowerView

Check if a the victim already has a SPN

  • PowerView

  • AD Module

Set a SPN for the victim

  • PowerView

  • AD Module

Kerberoast the vicitm

Trustee and Resource Delegationchevron-right

Windows Server 2008

Traditional methosds (shadow credential, RBCD, targetedKerberoast) can not be used -> change password

GenericAll

circle-check

Kerberoastchevron-right

CleanUp - Remove fake SPN

Other Example

RBCD - Resource Based Constrained Delegation RBCD

Trustee and Resource Delegationchevron-right

Change user Context

1 - Add a new attacker-controlled computer account

https://raw.githubusercontent.com/Kevin-Robertson/Powermad/refs/heads/master/Powermad.ps1arrow-up-right

2 - Build a generic ACE with the attacker-added computer SID as the principal, and get the binary bytes for the new DACL/ACE

https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/refs/heads/dev/Recon/PowerView.ps1arrow-up-right

3 - Set this newly created security descriptor in the msDS-AllowedToActOnBehalfOfOtherIdentity field of the comptuer account

Or automate the process with RbcdPwn.ps1

https://gist.githubusercontent.com/snovvcrash/81c8e151527bfd5e28c40ed77eb3c5ab/raw/e026157aa1cee84135c5bba4aca5bd597454e85c/RbcdPwn.ps1arrow-up-right

4 - Hash the plaintext password into its RC4_HMAC form

5 - Get a service ticket for the service name (sname) we want to "pretend" to be "admin"

Disable Kerberos Pre Auth - ASREP Roast

Misconfigurationchevron-right

Change Password

With BloodyAD

On OU - Generic Descendent Object Takeover

AddSelf

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 add itself to the target group, instead of adding arbitrary principals.

AllExtendedRights

Change password

Shadow Credentials

Pre-requisites to abuse Shadow Credentials:

  • AD CS (Key Trust if AD CS is not present)

  • Support for PKINIT and at least one DC with Windows Server 2016 or above.

  • Permissions (GenericWrite/GenericAll) to modify the msDS-KeyCredentialLink attribute of the target object.

In BloodHound: AddKeyCredentialLink

Linux - Pywhisker

pywhisker issue

troubleshooting:

https://github.com/ShutdownRepo/pywhisker/issues/17arrow-up-right

Certipy

shadow auto

Abusing User Object

Enumerate the permissions.

Add the Shadow Credential.

Linux - pyWhisker - cf The Hacker Recipes

Using PowerView, see if the Shadow Credential is added.

Request the TGT by leveraging the certificate.

Inject the TGT in the current session or use the NTLM hash

Abusing Computer Object

Enumerate the permissions.

Add the Shadow Credentials.

Using PowerView, see if the Shadow Credential is added.

Request the TGT by leveraging the certificate.

Request and Inject the TGS by impersonating the user.

ShadowSpray

WriteOwner

Grant Ownership

Grant yourself the AddMember privilege

Add member

Resource

Last updated