AD CS ESC — Attack Index

Ctrl+F: ESC1 · ESC9 · certipy find · Hacker Recipes · Certified

External: Internal All The Things — Certificate Services

External: Internal All The Things — Certificate ESC

External: Internal All The Things — Golden Certificate

SpecterOps “Certified Pre-Owned” misconfigurations → domain compromise via PKINIT.

Always start:

certipy-ad find -u user@domain.htb -p 'PASS' -dc-ip DC_IP -vulnerable
grep -i ESC *_Certipy.txt    # read the .txt report Certipy writes

Certipy & Certify · Certipy & Certify > find — enumerate


📌 ESC quick map

ESCNameVault noteHacker Recipes
ESC1Enrollee supplies SAN / UPNESC1Template SAN
ESC2Any Purpose EKUESC2Any purpose EKU
ESC3Enrollment Agent EKUESC3Certificate Agent
ESC4Vulnerable template ACLESC4Template ACL (ESC4)
ESC6CA EDITF_ATTRIBUTESUBJECTALTNAME2ESC6EDITF SAN on CA
ESC7Vulnerable CA ACLESC7CA ACL (ESC7)
ESC8NTLM relay → web enrollmentESC8Web endpoint ESC8
ESC9No security extension + UPN swapESC9No security extension
ESC10Weak certificate mappingESC10Weak mapping
ESC13Issuance policy → privileged groupESC13Issuance policy
ESC14Weak explicit mappingESC14Weak explicit mapping
ESC15Arbitrary application policyESC15CVE-2024-49019
ESC16Security extension disabled on CAESC16ESC16 on CA

Also: SpecterOps whitepaper — Certified Pre-Owned (PDF)


📌 Generic post-cert workflow

After any ESC gives you a .pfx:

certipy-ad auth -pfx administrator.pfx -domain 'domain.htb' -dc-ip DC_IP
evil-winrm -i DC_IP -u Administrator -H NTHASH

Or with ticket → Use Kerberos Ticket