HTB - Certified

Enumeration


Nmap Scan

Summary

hosts file

As is common in Windows pentests, you will start the Certified box with credentials for the following account: Username: judith.mader Password: judith09

To speed the process of typing credentials each time I run a tool, I will export them to variables

Since I already have credentials, I will move directly to dump ldap data along with smb enumeration and others using cicada-masterful

Prepare archive for bloodhound GUI

In ldap_results/domain_users.html, There are the domain users and I noticed two users that could have high permission. management_svc is a member of Remote Management Users and ca_operator which from its name can interact with ADCS

I will use powerview.py to enumerate the user's privileges from my attacking machine manually

User judith.mader has WriteOwner on management group

I also can confirm it with bloodhound

Management group has GenericWrite on management_svc

BloodHound view:

Mangement_svc has FullControl on Ca_operator

BloodHound View:

Foothold


So the attack path is as follows:

  1. Write Ownership on Management Group

  2. Grant FullControl from this Ownership

  3. Add me (as judith.mader ) to Management Group to inherit its privileges

  4. Abuse GenericWrite to add Shadow Credentials to management_svc and get his hash

  5. Abuse GenericAll from management_svc to add shadow Credentials to ca_operator

  6. Enumerate ADCS using ca_operator for misconfigured templates

Add OwnerShip and Grant FullControl

Add me to Mangement Group

Get management_svc by Shadow Credential attacks, Then attack ca_operator with these credentials and his hash, too

Privilege Escalation


Having ca_operator, I will enumerate ADCS to find misconfigured templates looking for escalation paths

ESC9 attack allows me to update the User prinical Name attribute for any account only if I have GenericWrite on it to do so.

Since I have GenericWrite from management_svc, I will update UPN of ca_operator to match administrator's UPN

After that, I will use ca_operator to request a template impersonating Administrator

For the authentication to work, you should revert the UPN to ca_operator again

User Flag: 72b66b72cc4346c0c3xxxxxxxxxxxxxxxx

Root Flag: 0c0e5a69756ffa9b7xxxxxxxxxxxxxxxxx

Last updated