Write Owner
Last updated
Last updated
Login to DC03
with the Administrator user and the password Welcome01!
.
Open the "Active Directory Users and Computers" administration tool.
3. Click on "View" and enable "Advanced Features
4. Click on the "Computers" directory and right click on the "DATA01" computer and select "Properties". Then select "Security" to see the ACL's.
5. Click on "Add" and type sa_sql
.
6. Select the "sa_sql" user and click "Advanced". Then select the "sa_sql" once again and click on "Edit". Then select "Modify Owner".
7. We can quickly run BloodHound to check if the correct permissions are applied to the sa_sql
user:
It is configured correctly!
If a domain object has the WriteOwner ACL, the object can change the owner of the object. In this case the user SA_SQL
can change the owner of the computerobject DATA01
. Once you are "Owner" of a object, you can change the DACL of the object.
Download PowerView on the kali machine and host it on a webserver:
2. Login to WS01
as Richard with the password Sample123
.
3. Start PowerShell and download and execute an amsi and PowerView in memory:
4. In the page DACL-Abuses I showed you how to check for ACL's using BloodHound. We will abuse the "Write Owner" ACL sa_sql
has on DATA01
.
5. With PowerView we can query the current owner of the computerobject DATA01
. Since we are queering data from another domain, we will have to provide a username and password for that domain. Create a credential object using the get-credential
cmdlet:
Then we can use PowerView to query the domain controller from secure.local
for the domain-object DATA01
and retrieve the samaccountname and Owner attribute. We will receive a SID which we need to resolve aswell;
The current owner of the computerobject DATA01
is the group Domain Admins
.
6. With PowerView we can change the owner of the object using the Set-DomainObjectOwner
cmdlet.
7. We didn't receive any errors, to lets use the same queries again to query the owner of the computerobject DATA01;
8. We successfully changed the owner of the computerobject from Domain Admins
to sa_ql
. The next step will be on the Owns section: