ESC1 — SAN in Template
Template allows enrollee to specify Subject Alternative Name (SAN). Request cert as any user.Conditions
ENROLLEE_SUPPLIES_SUBJECTflag set- Client Authentication EKU
- Low-privilege user can enroll
Certify
Certipy
ESC2 — Any Purpose / No EKU
Template hasAny Purpose EKU or no EKU at all → can be used for client auth.
Exploit
Same as ESC1 if ENROLLEE_SUPPLIES_SUBJECT also set. Otherwise combine with ESC3 (enrollment agent).ESC3 — Enrollment Agent
Two-step: enroll as enrollment agent, then request cert on behalf of another user.Step 1 — Get Enrollment Agent Cert
Step 2 — Request on Behalf Of
ESC4 — Template ACL
Write access to certificate template → modify template to be vulnerable (ESC1).Certipy
ESC5 — PKI Object ACL
Write access to CA server AD object, CA config, or PKI-related objects. Broad scope — depends on specific misconfiguration.ESC6 — EDITF_ATTRIBUTESUBJECTALTNAME2
CA flagEDITF_ATTRIBUTESUBJECTALTNAME2 allows SAN in any certificate request, regardless of template config.
Check
Exploit
Same as ESC1 — specify SAN in any template:ESC7 — CA ACL (ManageCA)
Two distinct rights: ManageCA allows CA configuration changes (toggle the EDITF/SAN flag, enable templates, add officers); ManageCertificates (the “officer” right) approves/issues pending requests. A ManageCA-only attacker usually adds themselves as an officer first.Enable EDITF_ATTRIBUTESUBJECTALTNAME2
Certipy cannot toggle this flag (there is no-enable-flag). Set it on the CA host with certutil, then restart the service: