windows

AD CS Privilege Escalation: All ESC1–ESC16 Techniques with Certipy (Active Directory Attack Guide)

AD CS Privilege Escalation: All ESC1–ESC16 Techniques with Certipy (Active Directory Attack Guide)

AD CS Privilege Escalation on Active Directory: A Complete Guide to ESC1–ESC16 Techniques with Certipy. Learn how to gain Domain Admin by exploiting misconfigured certificate templates and CAs.

  • Posted on 2026-03-06
  • Reading time: 8 min

Active Directory Certificate Services ( AD CS ) is one of the most powerful vectors for privilege escalation in Active Directory . A single misconfiguration in certificate templates or the Certificate Authority can allow a domain user to authenticate as Domain Admin —often with a single command.

ESC1–ESC16 techniques exploit misconfigurations in certificate templates, the CA, and Domain Controller certificate mapping. In many enterprise environments, these weaknesses remain unchecked for years, making AD CS one of the most effective attack surfaces in internal penetration testing.

This guide collects all AD CS techniques ESC1–ESC16 with operational explanations, real-world impact, and commands used in pentests. Each technique has a dedicated guide with exploitation via Certipy , vulnerability conditions, and mitigations. Here you can find the complete overview of AD CS attacks on Active Directory.

AD CS Privilege Escalation: Quick Start With Certipy #

Three commands. From standard user to Domain Admin in less than 60 seconds.

1 — Find vulnerable templates

bash
certipy find -u 'user@corp.local' -p 'Password123' -dc-ip 10.0.0.100 -vulnerable -enabled -stdout

2 — Request Certificate as Administrator

bash
certipy req -u 'user@corp.local' -p 'Password123' -dc-ip 10.0.0.100 -target CA.CORP.LOCAL -ca 'CORP-CA' -template 'VulnTemplate' -upn 'administrator@corp.local' -sid 'S-1-5-21-...-500'

3 — Authenticate and get TGT + NT hash

bash
certipy auth -pfx 'administrator.pfx' -dc-ip 10.0.0.100

This is ESC1 —the most common certificate attack. The other 15 ESC techniques follow different paths, but the same end result: privileged access to the.


What Is AD CS and Why Is It Vulnerable to Certificate Attacks? #

Active Directory Certificate Services is the Windows Server role that manages the corporate PKI: it issues digital certificates used for authentication, signing, and encryption. In an Active Directory domain , certificates can be used to authenticate via Kerberos PKINIT—whoever owns a valid certificate for a user can obtain the TGT and often also the NT hash . This certificate-based authentication mechanism is the basis of every AD CS attack.

The problem is that many AD CS installations are configured with overly permissive settings: templates with open enrollment for Domain Users , user-specified Subject Alternative Names, overly broad EKUs, unprotected web enrollment, dangerous CA flags, and weak mappings to Domain Controllers. Each misconfiguration can become a direct path to Domain Admin.

Until 2021, almost no one tested AD CS in internal pentests. Today, it's one of the most studied and productive attack surfaces in offensive Active Directory research.


What Are ESC (AD CS Escalation Techniques) #

ESCs are 16 documented Active Directory Privilege Escalation techniques that exploit misconfigurations or vulnerabilities in AD CS. Each ESC targets a different layer of the PKI :

  • Certificate Template → ESC1–4, ESC9, ESC13, ESC15
  • Certificate Authority → ESC5–8, ESC11–12, ESC16
  • Domain Controller / certificate mapping → ESC10, ESC14

The impact is almost always the same: a low-privileged user obtains a certificate that allows them to authenticate as Domain Admin or any other domain user. Some ESCs require prerequisites such as GenericWrite , CA access, or NTLM coercion; others work with a simple domain account.

In practice, every certificate attack follows the same logic:

obtain a valid certificate → authenticate as a privileged user → compromise the domain

Quick Map ESC1–ESC16 #

ESCTypeSubscription
ESC1Enrollee supplies subject + auth EKUtemplate
ESC2Any Purpose / no EKUtemplate
ESC3Enrollment Agent abusetemplate
ESC4Template hijackingtemplate
ESC5PKI object ACL abuseCA / PKI
ESC6Arbitrary SANs via CA flagCA
ESC7Dangerous permissions on CACA
ESC8NTLM relay a web enrollmentCA
ESC9No security extensiontemplate
ESC10Weak certificate mappingDC
ESC11NTLM relay to RPCCA
ESC12YubiHSM2 / CA key abuseCA
ESC13Issuance policy linked to grouptemplate
ESC14Weak explicit certificate mappingDC
ESC15Arbitrary application policy injectiontemplate
ESC16Security extension disabled CA-wideCA

Main Tools For AD CS Exploitation #

Certipy #

Oliver Lyak's Python tool for Linux/Kali. Supports all 16 ESCs: enumeration, exploitation, relay, shadow credentials, certificate forging, and LDAP shell. It's the standard for every AD CS attack in pentests.

👉 Certipy Complete Guide

Certify #

SpecterOps's C#/.NET tool for Windows environments. It supports enumeration and exploitation of classic techniques, especially ESC1–8. It doesn't cover newer scenarios like ESC15/ESC16 well. Useful when Python isn't available in the context of AD CS exploitation.

👉 Certify Complete Guide

The red #

A C# tool for Kerberos ticket manipulation. It doesn't directly attack AD CS, but it's essential for the PKINIT authentication and post-exploitation phase when working from Windows.

👉 Rubeus complete guide


All ESC Techniques: From ESC1 to ESC16 #

ESC1 — Enrollee Supplies Subject #

The template allows the user to specify the Subject Alternative Name (SAN) with an authentication EKU. Any domain user can request an Administrator certificate. This is the most straightforward and common technique used in pentesting.

👉 ESC1 ADCS complete guide

ESC2 — Any Purpose / No EKU #

The template has an Any Purpose EKU or no EKU defined. The certificate can function as an Enrollment Agent and open the on-behalf-of chain to request certificates as any user. It is often chained with ESC3.

👉 ESC2 ADCS complete guide

ESC3 — Enrollment Agent Abuse #

A template with EKU Certificate Request Agent allows on-behalf-of requests. Two steps: get the Enrollment Agent and then request a certificate as a privileged user. This is the explicit version of the logic seen in ESC2.

👉 ESC3 ADCS complete guide

ESC4 — Template Hijacking (ACL Abuse) #

The attacker has write permissions on an AD template object. They modify the template, transform it into an ESC1, exploit it, and then restore it. Certipy automates almost the entire chain.

👉 ESC4 ADCS complete guide

ESC5 — PKI Object ACL Abuse #

Weak ACLs on PKI objects in the Configuration Naming Context: NTAuthCertificates , AIA/CDP containers , OID objects, PKI trusts, and CA computer accounts. This is a rarer but much more strategic technique, as it can lead to persistent control of the domain's PKI.

👉 ESC5 ADCS complete guide

ESC6 — EDITF_ATTRIBUTESUBJECTALTNAME2 #

A CA-level flag that allows arbitrary SANs in any request. After the 2022 patches, it is no longer sufficient on patched DCs by itself, but when combined with ESC9 or ESC16, it becomes very powerful again.

👉 ESC6 ADCS complete guide

ESC7 — ManageCA Permission Abuse #

Anyone with ManageCA permission on the CA can add themselves as officers, enable sensitive templates, approve requests, and force privileged certificate issuance. This is a direct compromise of the Certificate Authority.

👉 ESC7 ADCS complete guide

ESC8 — NTLM Relay to Web Enrollment #

CA web enrollment accepts NTLM without EPA . An attacker forces a DC or privileged user to authenticate, relays to the web enrollment, and obtains a certificate as the victim. Historically, one of the most impactful techniques. If the web enrollment is not exposed, try ESC11 via RPC.

👉 ESC8 ADCS complete guide

ESC9 — No Security Extension #

The template has the flag CT_FLAG_NO_SECURITY_EXTENSION: The certificate does not contain the user's SID. Combined with UPN manipulation and weak mappings, it allows impersonation. It is the template-level variant of ESC16 .

👉 ESC9 ADCS complete guide

ESC10 — Weak Certificate Mapping (Registry) #

The weakness is in the DC registry, not the template. StrongCertificateBindingEnforcement = 0 for Kerberos or CertificateMappingMethods with UPN bit for Schannel can make seemingly harmless certificates exploitable.

👉 ESC10 ADCS complete guide

ESC11 — NTLM Relay to RPC (MS-ICPR) #

As a ESC8 , but towards the CA's RPC interface. If the flag IF_ENFORCEENCRYPTICERTREQUEST if it is not active, the relay can work and lead to the same result: certified as a DC or as another privileged account.

👉 ESC11 ADCS complete guide

ESC12 — YubiHSM2 Key Leak #

A specific scenario where a YubiHSM2-protected CA can still be abused if there is a vulnerability or weak software integration on the CA server. If the CA key is exposed or misused, this leads to a Golden Certificate.

👉 ESC12 ADCS complete guide

A template includes an issuance policy whose OID in AD points to a privileged group. Anyone authenticating with a certificate from that template receives the group's SID in the PAC without being a member. This is an extremely elegant and often overlooked form of privilege escalation.

👉 ESC13 ADCS complete guide

ESC14 — Weak altSecurityIdentities Mapping #

Weak mappings in the attribute altSecurityIdentities They allow certificates to be associated with privileged users using values ​​that are too generic or easily replicable. This is a form of explicit certificate mapping abuse.

👉 ESC14 ADCS complete guide

ESC15 — EKUwu (CVE-2024-49019) #

Schema V1 templates on unpatched CAs allow arbitrary application policies to be injected into the certificate. This essentially adds EKUs that the template shouldn't allow, such as Client Authentication or Certificate Request Agent.

👉 ESC15 ADCS complete guide

ESC16 — Security Extension Disabled CA-Wide #

The CA globally disables the SID security extension in all certificates via DisableExtensionList. It is the CA-wide version of ESC9 : any templates issued by that CA revert to using legacy mappings.

👉 ESC16 ADCS complete guide


AD CS Enumeration With Certipy #

The first step in any AD CS pentest is enumeration. A single Certipy command identifies most of the ESCs present in the environment:

bash
certipy find -u 'user@corp.local' -p 'Password123' -dc-ip 10.0.0.100 -vulnerable -enabled -stdout

Certipy queries LDAP to extract templates, CAs, permissions, issuance policies, and known configurations, then compares them against exploit conditions for common AD CS techniques.

Automatically detects especially:

ESCs not automatically detected — such as ESC5 , ESC10 , ESC12 e ESC14 — instead require manual audits on registry, ACL PKI, altSecurityIdentities or CA server security.


Real AD CS Attack Chain: From Standard User to Domain Admin #

A typical AD CS pentest follows this progression:

Enumeration → certipy find -vulnerable identifies a template ESC1 with enrollment open to Domain Users.

Exploitation → certipy req -upn administrator@corp.local -sid S-1-5-21-...-500 requires an Administrator certificate.

Authentication → certipy auth -pfx administrator.pfx executes PKINIT and returns the Administrator's TGT+NT hash.

Domain Dominance → with the NT Administrator hash you run DCSync to extract all domain credentials, including the hash krbtgt for a Golden Ticket.

Total time: Often less than 60 seconds between the first command and administrative compromise. No software exploits, no memory corruption, no traditional RCE. Just a PKI misconfiguration.

In more complex cases, the ESCs are chained:

This is where AD CS gets really dangerous: not a single vulnerability, but a composable attack surface.


FAQ — AD CS Privilege Escalation #

What are ESCs in Active Directory? #

ESCs are 16 Active Directory Privilege Escalation techniques that exploit misconfiguration in Active Directory Certificate Services. Each ESC affects a different aspect of the PKI: templates, CAs, or domain controller configuration. All can lead to certificate abuse and domain compromise.

What is the most common ESC in pentests? #

ESC1 is the most common: template with Supply in the request + authentication EKU + open enrollment. ESC8 and ESC4 often follow immediately after.

Do you need Certipy to use ESCs? #

Certipy is the most comprehensive tool for AD CS exploitation: enumeration, req, auth, relay, forge, shadow credentials, LDAP shell. In Windows environments, you can also work with Certify and Rubeus , but for the modern AD CS landscape, Certipy remains the reference.

Are ESCs common in real pentests? #

Yes. AD CS configurations are often legacy, poorly documented, and rarely audited. This is why AD CS is now a standard part of any serious internal Active Directory pentest.

How to protect yourself from all ESCs? #

Three levels:

  • template → disable “Supply in the request”, restrict enrollment, avoid permissive EKUs, reduce V1
  • CA → remove dangerous flags, enable EPA, do not disable SID security extension, protect permissions
  • DC → tax StrongCertificateBindingEnforcement = 2, use strong mappings, control Schannel and altSecurityIdentities

Run certipy find -vulnerable regularly and treats the CA as an asset Tier-0.

What is the difference between template-level ESC and CA-level ESC? #

The ESC template (ESC1 , ESC2 , ESC3 , ESC4 , ESC9 , ESC13 , ESC15 ) exploit single template configurations. The ESC CA (ESC5 , ESC6 , ESC7 , ESC8 , ESC11 , ESC12 , ESC16 ) leverage the CA or forest-wide PKI. The ESC DC (ESC10 , ESC14 ) leverage domain controller-side mapping and authentication.


Summary: AD CS Privilege Escalation in 5 Points #

AD CS is one of the most effective vectors of Active Directory Privilege Escalation — 16 documented techniques, many of which lead directly to Domain Admin.

Certipy covers much of the entire AD CS attack cycle — enumeration, exploitation, authentication, relay, forging, and post-exploitation.

Not all ESCs are created equal — some depend on templates, some on the CA, some on mapping to Domain Controllers.

The real risk is not just the single technique, but the concatenation — ESC4 → ESC1, ESC6 + ESC9, ESC6 + ESC16, ESC2 → ESC3, ESC8 → domain.

The most important defensive measure on the DC side remains StrongCertificateBindingEnforcement = 2 — but it alone is not enough if templates, CA and mapping remain weak.


AD CS is one of the most productive certificate attack surfaces in Active Directory pentesting . If this content is useful to you, you can support the project on Support HackIta . Do you want to learn Active Directory exploitation and offensive security 1:1 ? Go to HackIta Services . If you want to test the security of your website or company infrastructure , request a penetration test . Continue with the operational guides: ESC1 · ESC8 · ESC15 · Certipy · Active Directory pentesting Technical references: Certified Pre-Owned – SpecterOps Certipy – GitHub Microsoft AD CS Documentation

text
#ad #adcs #esc #certipy

leave a message

I'm not a robot