--- title: "AD CS Attacks (ESC1-ESC16) Explained for Defenders" url: https://playciso.com/blog/adcs-esc-attacks-explained-for-defenders updated: 2026-12-03 section: Blog publisher: PlayCISO --- # AD CS Attacks (ESC1-ESC16) Explained for Defenders > What each AD CS escalation path (ESC1 to ESC16) is, how to check your domain with read-only commands, how to fix it and which events to watch. Source: https://playciso.com/blog/adcs-esc-attacks-explained-for-defenders · Published: 2026-12-03 · Publisher: PlayCISO (https://playciso.com) Primary source: https://learn.microsoft.com/en-us/defender-for-identity/security-posture-assessments/certificates --- ▶Watch: AD CS: one certificate template, domain admin (1:30) How one misconfigured certificate template leads to domain admin, and how to check yours. AI-generated explainer. Chapters: 0:00 one bad template · 0:19 what AD CS does · 0:38 log in as the administrator · 0:54 check without installing · 1:09 what to do this week. Video transcriptIn Active Directory, one badly set certificate template can turn any domain user into a domain admin. If a template lets the requester type whose name goes on the certificate, a user can ask for one in an administrator's name. Active Directory Certificate Services issues the certificates your network trusts for logging in. Its dangerous settings are cataloged as ESC1 to ESC16 in templates, in certificate authority settings, and on domain controllers. With that certificate, the user can log in as the administrator whose name is on it without ever knowing that administrator's password. One setting on one template is enough. That is why template settings deserve the same review as admin rights. You can check without installing anything. A few read-only commands built into Windows list your templates, who can enroll, and your certificate authority settings. Only check a domain you run or have written permission to assess. This week, list which templates are published, find any that let users name the certificate, and fix those first. Paste the command output into the AD CS Template Checker on PlayCISO.com. **Active Directory Certificate Services (AD CS)** is the certificate authority built into Windows Server. Its certificates can log people and computers on to the domain, so a single wrong tick in a certificate template can let any domain user obtain a certificate as a Domain Admin. SpecterOps catalogued these paths as **ESC1 to ESC8** in 2021 and the list now runs to **ESC16**. This guide explains each in plain words, how to check your own domain, how to fix it and what to monitor. **Who this is for:** Windows and identity administrators, PKI owners, SOC leads and security leaders who need to know whether their AD CS is a shortcut to domain admin. *Defender guide. It contains no attack steps. Only assess a domain you run or have written permission to assess.* The short version - Most real-world AD CS risk sits in a handful of settings: who can enrol in a template, whether the requester can type the subject, whether the certificate is good for logon, and whether approval is required. - Template permissions matter as much as template settings: if Domain Users can edit a template (ESC4), they can make it dangerous. - Three CA flags matter: EDITF_ATTRIBUTESUBJECTALTNAME2 (ESC6) should be off, IF_ENFORCEENCRYPTICERTREQUEST (ESC11) should be on, and the SID extension must not be on the DisableExtensionList (ESC16). - Strong certificate mapping (KB5014754, Full Enforcement by default since the February 2025 update) closes many paths, unless the SID extension is left out (ESC9, ESC16) or mapping is weakened (ESC10). - Check it all with read-only, built-in commands in the [AD CS Certificate Template Checker](/tools/adcs-template-checker). ## Why AD CS is a domain admin shortcut When someone logs on with a certificate (smart card logon, or Kerberos PKINIT), the domain controller trusts the identity the certificate names. Templates decide what goes in a certificate and who may ask for one. If a template lets the requester write the name, is accepted for logon, and is open to everyone, the CA will sign whatever name a user asks for. No password is stolen and no malware is needed; the certificate stays valid until it expires or is revoked, even if the user's password changes. ## The ESC list at a glance | ESC | What it is | The fix | | --- | --- | --- | | ESC1 | A template lets the requester type the subject, is good for logon, has no approval or signature, and broad groups can enrol. | Build the subject from AD, or remove logon EKUs, or require manager approval; restrict Enroll. | | ESC2 | A template with the Any Purpose EKU or no EKU is open to broad groups. | Set only the EKUs needed; restrict Enroll or require approval. | | ESC3 | Anyone can get a Certificate Request Agent certificate and enrol on behalf of others. | Restrict the agent template; require approval; set enrollment agent restrictions on the CA. | | ESC4 | Broad groups can edit a template (full control, write, write DACL, write owner, or own it). | Remove the write rights; make PKI admins the owner; audit 4899 and 4900. | | ESC5 | Weak permissions on other PKI objects in AD (the CA computer object, containers, NTAuth). | Treat the CA and PKI containers as Tier 0; review their ACLs. | | ESC6 | The CA flag EDITF_ATTRIBUTESUBJECTALTNAME2 lets every request carry its own subject alternative name. | certutil -setreg policy\EditFlags -EDITF_ATTRIBUTESUBJECTALTNAME2, restart certsvc. | | ESC7 | Broad groups hold Manage CA or Manage Certificates on a CA. | Remove those rights from everyone but a small PKI admin group. | | ESC8 | Web enrolment accepts NTLM over HTTP or without Extended Protection, so logins can be relayed. | HTTPS only, EPA Required (KB5005413), restrict NTLM, or remove web enrolment. | | ESC9 | A logon template has CT_FLAG_NO_SECURITY_EXTENSION, so certificates carry no SID. | Clear the flag; keep strong mapping enforced. | | ESC10 | Domain controllers use weak certificate mapping (StrongCertificateBindingEnforcement 0 or 1, or the UPN bit in Schannel CertificateMappingMethods). | Current updates (Full Enforcement); CertificateMappingMethods 0x18. | | ESC11 | The CA's RPC enrolment does not require encryption (IF_ENFORCEENCRYPTICERTREQUEST off), so logins can be relayed. | certutil -setreg CA\InterfaceFlags +IF_ENFORCEENCRYPTICERTREQUEST, restart certsvc. | | ESC12 | The CA private key is on a YubiHSM2 whose access can be abused by someone with shell on the CA. | Treat the CA server as Tier 0; follow the HSM vendor's guidance. | | ESC13 | An issuance policy is linked to an AD group, so a certificate from that template grants group membership at logon. | Review issuance policy links and who can enrol in those templates. | | ESC14 | Weak explicit certificate mappings set on accounts (altSecurityIdentities). | Use only strong explicit mappings; restrict who can write altSecurityIdentities. | | ESC15 | Schema version 1 templates with "Supply in the request" on an unpatched CA (CVE-2024-49019, "EKUwu"). | November 2024 update on every CA; untick Supply in the request; restrict Enroll. | | ESC16 | The CA leaves the SID extension (1.3.6.1.4.1.311.25.2) out of every certificate. | Remove the OID from policy\DisableExtensionList, restart certsvc. | The numbering follows SpecterOps ([Certify documentation, ESC1 to ESC16](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/4-escalation-techniques.md)). Microsoft Defender for Identity has posture assessments for ESC1, ESC2, ESC3, ESC4, ESC6, ESC7, ESC8, ESC11 and ESC15 ([Microsoft Learn](https://learn.microsoft.com/en-us/defender-for-identity/security-posture-assessments/certificates)). ## Template misconfigurations: ESC1, ESC2, ESC3, ESC4, ESC9, ESC15 ### ESC1: the requester names any user Four things together make ESC1: **"Supply in the request"** on the Subject Name tab (the CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT flag, 0x1 in msPKI-Certificate-Name-Flag, per [[MS-CRTD]](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/1192823c-d839-4bc3-9b6b-fa8c53507ae1)); an EKU that allows logon (Client Authentication, PKINIT Client Authentication, Smart Card Logon, Any Purpose, or no EKU at all); **no CA certificate manager approval** (CT_FLAG_PEND_ALL_REQUESTS, 0x2 in msPKI-Enrollment-Flag) and no authorised signatures; and **Enroll** for a broad group such as Domain Users, Domain Computers or Authenticated Users. Microsoft calls "Supply in the request" one of the most common misconfigurations. Break any one of the four and the path closes. ### ESC2 and ESC3: certificates that are good for too much ESC2 is a template with the Any Purpose EKU or no EKU, open to broad groups. ESC3 is a template with the **Certificate Request Agent** EKU open to broad groups: an enrollment agent can request certificates on behalf of other users, so anyone who gets one can enrol as someone else. Restrict enrolment, require approval, and use enrollment agent restrictions on the CA. ### ESC4: broad groups can edit a template A template is an AD object with its own permissions. If an unprivileged group has full control, write, write DACL, write owner or write property on it, or owns it, they can turn any template into an ESC1 template. Check the owner and the write rights, not only who can enrol. ### ESC9: the SID extension is switched off on a template Since the May 2022 update, CAs add the requester's SID to each certificate (extension OID 1.3.6.1.4.1.311.25.2, per [KB5014754](https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16)). The template flag CT_FLAG_NO_SECURITY_EXTENSION (0x80000 in msPKI-Enrollment-Flag, [[MS-CRTD]](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/ec71fd43-61c2-407b-83c9-b52272dec8a1)) stops it, so the domain controller has to fall back to weaker name matching. ### ESC15: version 1 templates and CVE-2024-49019 On a CA without the November 2024 update, a schema version 1 template that lets the requester supply the subject can also be made to carry application policies the requester picks, turning, for example, a web server template into a logon certificate (CVE-2024-49019, nicknamed "EKUwu"). Microsoft's guidance: patch the CAs, remove enrol rights for unprivileged users and untick "Supply in the request" ([MSRC](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-49019), [Defender for Identity](https://learn.microsoft.com/en-us/defender-for-identity/security-posture-assessments/certificates)). ## CA settings: ESC6, ESC7, ESC11, ESC16 **ESC6:** the CA policy flag EDITF_ATTRIBUTESUBJECTALTNAME2 lets every request carry its own subject alternative name, whatever the template says. Microsoft's fix is `certutil -setreg policy\EditFlags -EDITF_ATTRIBUTESUBJECTALTNAME2` and a restart of the Certificate Services service. SpecterOps notes that with strong mapping, ESC6 alone is no longer enough in a patched domain, but it is again when the SID extension is missing (ESC9 or ESC16). **ESC7:** the CA's own permissions. Manage CA lets someone change CA settings (for example turn on the ESC6 flag); Manage Certificates lets them approve pending requests, defeating manager approval. Keep both with a small PKI admin group. **ESC11:** IF_ENFORCEENCRYPTICERTREQUEST makes the CA's RPC enrolment interface accept only encrypted (packet privacy) connections, which cannot be relayed. Microsoft says it is on by default but often turned off for old clients. Turn it back on with `certutil -setreg CA\InterfaceFlags +IF_ENFORCEENCRYPTICERTREQUEST`. **ESC16:** if the SID extension OID is on the CA's policy DisableExtensionList, no certificate from that CA carries a SID, so every template behaves like ESC9. Microsoft has no page on this registry value; vendor write-ups and SpecterOps describe it. Remove the OID and restart the service. ## Relay and mapping: ESC8 and ESC10 **ESC8** is NTLM relay to the CA's web enrolment (the PetitPotam path in 2021): an attacker coerces a server, often a domain controller, to authenticate to them, then relays that login to the web enrolment page and gets a certificate for that server. [KB5005413](https://support.microsoft.com/en-us/topic/kb5005413-mitigating-ntlm-relay-attacks-on-active-directory-certificate-services-ad-cs-3612b773-4043-4aa9-b23d-b87910cd3429) says to set Extended Protection for Authentication to **Required** on Certificate Authority Web Enrollment and the Certificate Enrollment Web Service, require SSL so only HTTPS is accepted, and restrict NTLM where possible. If you do not use web enrolment, remove it. **ESC10** is weak certificate mapping on domain controllers. [KB5014754](https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16) defines StrongCertificateBindingEnforcement (0 off, 1 compatibility, 2 enforcement); domain controllers without the value moved to Full Enforcement with the February 2025 update, and the value is no longer supported after the September 2025 update. Schannel's CertificateMappingMethods default changed from 0x1F to 0x18, keeping only the strong S4U2Self methods; the UPN bit (0x4) is one of the weak ones. ## The others: ESC5, ESC12, ESC13, ESC14 These need evidence that a template listing does not show: permissions on other PKI objects (ESC5), a CA key held in a YubiHSM2 (ESC12), issuance policies linked to groups (ESC13) and weak explicit mappings on accounts (ESC14). Treat the CA servers, their keys and the PKI containers in AD as Tier 0, like domain controllers. ## How to check your own domain - Templates and permissions: read every template's flags, EKUs, schema version and ACL from the Configuration partition with the ActiveDirectory PowerShell module. A normal domain user can do this. - Which CA publishes what: read the enrollment services objects; an unpublished template cannot be requested today. - CA flags: on each CA, certutil -getreg for policy\EditFlags, CA\InterfaceFlags, policy\DisableExtensionList and CA\Security. - Domain controllers: read StrongCertificateBindingEnforcement and CertificateMappingMethods. - Web enrolment: check whether the roles are installed and, if so, how IIS is configured. The [AD CS Certificate Template Checker](/tools/adcs-template-checker) gives you each of these as a copy-only, built-in command and turns the output into findings with the exact flags it saw and the fix, entirely in your browser. You do not need to download any third-party tool to do this. ## How to detect abuse - Turn on Certification Services auditing on every CA and collect 4886 (request received), 4887 (request approved and certificate issued), 4898 (template loaded), 4899 (template updated) and 4900 (template security updated); Microsoft's [Securing PKI event list](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn786423(v=ws.11)) rates them. - Alert on 4887 where the requester and the subject or subject alternative name differ, especially for privileged accounts. - Alert on 4899 and 4900: template changes should be rare and come from PKI admins. - Watch Kdcsvc events 39 and 41 in domain controllers' System logs (KB5014754): certificates with no strong mapping, and certificates whose SID does not match the account. ## What security leaders should do this week - Ask who owns AD CS and whether its servers are managed as Tier 0. - Run the read-only checks in the [checker](/tools/adcs-template-checker) and fix every published ESC1, ESC4 and ESC8 finding first. - Confirm the CAs have the November 2024 update and domain controllers are in Full Enforcement. - Delete templates nobody uses and unpublish the ones a CA does not need to issue. - Close the relay paths: score yourself with the [rogue listener credential exposure checklist](/tools/rogue-listener-credential-exposure-checklist) (EPA, LDAP signing and channel binding, NTLM). ## Frequently asked questions ### What is AD CS? Active Directory Certificate Services is the Windows Server role that runs an organisation's own certificate authority. It issues certificates from templates stored in Active Directory, and many of those certificates can be used to log on to the domain. That is why a mistake in a template or a CA setting can let an ordinary user become a Domain Admin. ### What does ESC stand for in AD CS? ESC is the numbering SpecterOps introduced in its 2021 "Certified Pre-Owned" research for domain escalation paths through AD CS: ESC1 to ESC8 in the original paper, extended since to ESC16. Each number is a specific misconfiguration or weakness, such as ESC1 for templates that let the requester name any user, or ESC8 for NTLM relay to web enrolment. ### What is ESC1? ESC1 is a certificate template that lets the requester supply the subject ("Supply in the request"), can be used for logging on (Client Authentication, PKINIT, Smart Card Logon, Any Purpose or no EKU), needs no manager approval or authorised signature, and is open to a broad group such as Domain Users. Anyone in that group can request a certificate in an administrator's name. ### How do I check my domain for ESC1 to ESC16? Read the certificate templates and their permissions from Active Directory with PowerShell, read the CA flags with certutil -getreg on each CA, and read the certificate mapping settings on the domain controllers. PlayCISO's AD CS Certificate Template Checker gives you those read-only, built-in commands and turns the output into findings with fixes, in your browser. ### Does strong certificate mapping (KB5014754) fix AD CS attacks? It closes a large part of them. Since the February 2025 update, domain controllers default to Full Enforcement, which rejects certificates without a strong mapping such as the SID security extension. It does not fix templates that let anyone name another user (the CA still adds the requester's SID, but other abuse remains), and it is undone where the SID extension is left out (ESC9 on a template, ESC16 on a CA) or where the mapping registry values are weakened (ESC10). ### What is ESC8 and how do I fix it? ESC8 is NTLM relay to AD CS web enrolment: an attacker makes a server, often a domain controller, authenticate to them and relays that login to the CA's web enrolment page to get a certificate for it. Microsoft's KB5005413 fix is to require HTTPS, set Extended Protection for Authentication to Required on the web enrolment and enrolment web service, and restrict NTLM, or to remove web enrolment if you do not use it. ### Which Windows events show AD CS abuse? On the CA, turn on Certification Services auditing: 4886 (request received), 4887 (request approved and certificate issued), 4898 (template loaded), 4899 (template updated) and 4900 (template security updated). On domain controllers, KB5014754 events 39 and 41 in the System log (source Kdcsvc) show certificates with no strong mapping and certificates whose SID does not match the account. ### Is it safe to test this on my network? Reading templates and CA settings changes nothing and needs no special tooling. Only assess a domain you run, or one you have written permission to assess, and make template or CA changes in a maintenance window: they affect every system that enrols. ## Sources - [Microsoft Learn: Defender for Identity certificate security posture assessments](https://learn.microsoft.com/en-us/defender-for-identity/security-posture-assessments/certificates) (read 3 December 2026) - [[MS-CRTD] msPKI-Certificate-Name-Flag](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/1192823c-d839-4bc3-9b6b-fa8c53507ae1) and [[MS-CRTD] msPKI-Enrollment-Flag](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/ec71fd43-61c2-407b-83c9-b52272dec8a1) - [Microsoft KB5014754: certificate-based authentication changes on Windows domain controllers](https://support.microsoft.com/en-us/topic/kb5014754-certificate-based-authentication-changes-on-windows-domain-controllers-ad2c23b0-15d8-4340-a468-4d4f3b188f16) - [Microsoft KB5005413: mitigating NTLM relay attacks on AD CS](https://support.microsoft.com/en-us/topic/kb5005413-mitigating-ntlm-relay-attacks-on-active-directory-certificate-services-ad-cs-3612b773-4043-4aa9-b23d-b87910cd3429) - [Microsoft Security Response Center: CVE-2024-49019](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2024-49019) - [Microsoft: Securing PKI, Appendix A: Events to Monitor](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn786423(v=ws.11)) - [SpecterOps: Certified Pre-Owned (Will Schroeder and Lee Christensen, 2021)](https://specterops.io/wp-content/uploads/sites/3/2022/06/Certified_Pre-Owned.pdf) and [SpecterOps Certify documentation: ESC1 to ESC16](https://docs.specterops.io/ghostpack-docs/Certify.wik-mdx/4-escalation-techniques.md)