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.maderPassword: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:
Write Ownership on
Management GroupGrant
FullControlfrom this OwnershipAdd me (as
judith.mader) toManagementGroup to inherit its privilegesAbuse
GenericWriteto addShadow Credentialstomanagement_svcand get his hashAbuse
GenericAllfrommanagement_svcto addshadow Credentialstoca_operatorEnumerate
ADCSusingca_operatorfor 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
UPNtoca_operatoragain

User Flag: 72b66b72cc4346c0c3xxxxxxxxxxxxxxxx
Root Flag: 0c0e5a69756ffa9b7xxxxxxxxxxxxxxxxx
Last updated