ADCS Exploitation: ESC9 and ESC10
ESC9 and ESC10 exploit weak certificate-to-account mapping on the DC. Both require GenericWrite on a domain account to modify its UPN before requesting a certificate. The issued certificate then maps to a different account when authenticated. These techniques rely on confirmed ESC9 or ESC10 conditions before exploitation.
ESC9 — UPN swap via NO_SECURITY_EXTENSION template
The template lacks CT_FLAG_NO_SECURITY_EXTENSION, meaning issued certificates contain no binding to the issuing account. By temporarily changing the victim's UPN to the target account's UPN and requesting a certificate, the issued cert contains the target UPN. Restore the victim's UPN and authenticate — the KDC maps the certificate to the target account.
Requires: GenericWrite on victim account + ESC9 template + StrongCertificateBindingEnforcement != 2 on DC.
# Step 1: [*] Updating user '$VICTIM' [*] Successfully updated 'userPrincipalName' to '[email protected]' # Step 2: [*] Saved certificate and private key to 'administrator.pfx' # Step 4: [*] Got hash for '[email protected]': fc525c9683e8fe067095ba2ddc971889
ESC10a — weak binding enforcement, any template
When StrongCertificateBindingEnforcement = 0 on the DC, no template flag is required. Any certificate with a UPN matching a domain account authenticates as that account. The attack chain is identical to ESC9 but any client-authentication template works — not limited to templates with NO_SECURITY_EXTENSION.
Requires: GenericWrite on victim account + StrongCertificateBindingEnforcement = 0 on DC.
[*] Successfully updated 'userPrincipalName' to '[email protected]' [*] Saved certificate and private key to '$VICTIM.pfx' [*] Got hash for '[email protected]': fc525c9683e8fe067095ba2ddc971889
ESC10b — SubjectName mapping (CertificateMappingMethods)
When CertificateMappingMethods includes the SubjectName bit (0x4) or Issuer+Subject bit (0x2), the DC maps certificates using the Subject CN or Subject/Issuer pair in addition to UPN. With GenericWrite on an account, modify the victim's dNSHostName attribute (for computer accounts) or UPN to match the target. The issued certificate maps to the target account via the legacy SubjectName mapping path.
Requires: CertificateMappingMethods with legacy bits + GenericWrite on a computer account.
[*] Got hash for '[email protected]': fc525c9683e8fe067095ba2ddc971889
References
-
Certipy (GitHub)github.com/ly4k/Certipy (opens in new tab)
account update -upn/-dns, req, auth commands for ESC9/ESC10 chains
-
Certipy 4.0 — ESC9, ESC10 (ly4k)research.ifcr.dk/certipy-4-0-esc9-esc10-bloodhound-new-adcs-and-domain-escalation-techniques-34d1c26f0dc6 (opens in new tab)
Original research introducing ESC9 and ESC10 with full attack chain documentation
-
Certified Pre-Owned — SpecterOpsposts.specterops.io/certified-pre-owned-d95910965cd2 (opens in new tab)
Original ESC taxonomy reference (ESC1-ESC8)
Was this helpful?
Your feedback helps improve this page.