Owns
If you are "Owner" of a object, you can change the DACL of the object.
Configuring
Prerequisite
Write OwnerConfiguring
Nothing need to be configured to abuse this since we set the Owner of the object during the attack in the "Write Owner" section. If you would like to configure this it can be configured the same way as we configured "Write Owner".
Attacking
How it works
If you are "Owner" of a object, you can change the DACL of the object. Meaning you can give any object "GenericAll" or any other specific permissions.
Tools
Executing the attack
We will continue the attack from where we left off from the page "Write Owner".
2. We just made the user sa_sql
owner of the computerobject DATA01
. The next step is to write to the DACL of the computerobject and give sa_sql
genericall permission. This can be done with PowerView and the cmdlet Add-DomainObjectAcl
.
3. PowerView gives some errors but it seems like it found the correct information and tried to set the ACL's. We can check this by running BloodHound again or querying the Domain Controller for all ACL's from DATA01 and filter. First we have to get the objectsid from the user sa_sql
and then we can use the cmdlet Get-DomainObjectACL
to query all the ACL's for DATA01
.
From the output we can see that the user sa_sql
has GenericAll permission on DATA01
. Since we own the lab we can also check it out on the Domain Controller, the same way as we configured the Owner permissions. And it has all the permissions:
4. The next step to abuse the GenericAll permissions page which will send you to two more pages. To abuse the privileges for DATA01
the computeraccount takeover attack should be executed:
Cleanup
Login to
DC03
asAdministrator
with the passwordWelcome01!
.Open "Active Directory Users and Computers" and open the "Computers" section and open the "Properties" for the computerobject
DATA01
. Make sure the "Advanced Features" are enabled.Open the "Security" tab and click on "Advanced". Change the owner to the group "Domain Admins"
Delete the
sa_sql
user from the permission entries. Then add it again and give it the permissions "Modify Owner" like we did in the "Write Owner" section to configure the vulnerability. So its ready to be abused again. (Which is easier then deselecting everything)
Defending
Recommendations
Detection
References
Last updated