CRTP Lab 21
Task 1
Check if AD CS is used by the target forest and find any vulnerable/abusable templates.
Use certify to check for AD CS:
C:\AD\Tools\Certify.exe cas
[*] Enterprise/Enrollment CAs:
Enterprise CA Name : moneycorp-MCORP-DC-CA
DNS Hostname : mcorp-dc.moneycorp.local
FullName : mcorp-dc.moneycorp.local\moneycorp-MCORP-DC-CA
Flags : SUPPORTS_NT_AUTHENTICATION, CA_SERVERTYPE_ADVANCED
Cert SubjectName : CN=moneycorp-MCORP-DC-CA, DC=moneycorp, DC=local
Cert Thumbprint : 8DA9C3EF73450A29BEB2C77177A5B02D912F7EA8
Cert Serial : 48D51C5ED50124AF43DB7A448BF68C49
Cert Start Date : 11/26/2022 1:59:16 AM
Cert End Date : 11/26/2032 2:09:15 AM
Cert Chain : CN=moneycorp-MCORP-DC-CA,DC=moneycorp,DC=local
UserSpecifiedSAN : Could not connect to the HKLM hive - Attempted to perform an unauthorized operation.
CA Permissions :
We can find all the templates using "find"
Task 2
Abuse any such template(s) to escalate to Domain Admin and Enterprise Admin.
We could try to find templates with "ENROLLEE_SUPPLIES_SUBJECT" value to escalate to DA and EA using ESC1
The HTTPSCertificates template has the "ENROLLEE_SUPPLIES_SUBJECT" value where enrollement rights are with dcorp\RDPUsers
Since student is a member of RDPUsers group, we can request certificate for any user as student.
Here we request certificate for the Domain Administrator of the current domain.
Copy all contents between -----BEGIN RSA PRIVATE KEY----- and -----END CERTIFICATE----- and save it to esc1.pem.
We need to convert this to PFX and use it. Use openssl binary to do this and set a password.
Use the PFX created above with Rubeus to request a TGT for DA.
We can now access mcorp-dc
Last updated