ADCS ESC Cheat Sheet: ESC1 to ESC17 Checks and Fixes
ADCS cheat sheet
ADCS ESC1 to ESC17 cheat sheet
This ADCS ESC cheat sheet turns every escalation path, from ESC1 to the new ESC17, into a checklist you can work through. Each item comes with a quick check you can run with Microsoft's own tools and the fix that closes it.
17 escalation paths · 4 groups · Updated November 2026
Progress: 0 of 17 done
The free scan at insightrecon.com checks 16 of these 17 for you.
Free scan coverage
16 of 17 The free scan checks every ESC on this page except ESC12. That one needs a look on the CA server itself.
- Critical in the free scan6
- High in the free scan10
- Not in the free scan1
Every core AD check is free for one domain, ADCS included. See every check
There's nothing left in this view. If you've checked them all off, run the scan again to make sure the fixes stuck.
Before you start
Run the free scan first
Each finding names the template or CA behind it, so you'll know which of these checks apply to you.
To check by hand, paste the setup script into Windows PowerShell on a domain-joined machine with the RSAT AD module. Checks marked After setup reuse what it loads.
Show the setup script
Import-Module ActiveDirectory
$pks = "CN=Public Key Services,CN=Services,$((Get-ADRootDSE).configurationNamingContext)"
$cas = Get-ADObject -SearchBase "CN=Enrollment Services,$pks" -LDAPFilter '(objectClass=pKIEnrollmentService)' -Properties dNSHostName, certificateTemplates
$cfg = $cas | ForEach-Object { "$($_.dNSHostName)\$($_.Name)" }
$pub = $cas | ForEach-Object { $_.certificateTemplates }
$props = 'pKIExtendedKeyUsage', 'msPKI-Certificate-Name-Flag', 'msPKI-Enrollment-Flag', 'msPKI-RA-Signature',
'msPKI-Template-Schema-Version', 'msPKI-Certificate-Policy', 'nTSecurityDescriptor'
# Published templates that need no CA manager approval or authorized signature
$open = Get-ADObject -SearchBase "CN=Certificate Templates,$pks" -LDAPFilter '(objectClass=pKICertificateTemplate)' -Properties $props |
Where-Object { $_.Name -in $pub -and -not ($_.'msPKI-Enrollment-Flag' -band 2) -and -not $_.'msPKI-RA-Signature' }
$sid = [System.Security.Principal.SecurityIdentifier]
$w = [System.DirectoryServices.ActiveDirectoryRights]'WriteProperty, WriteDacl, WriteOwner'
# Client Authentication, Smart Card Logon, PKINIT Client Authentication and Any Purpose
$signIn = '1.3.6.1.5.5.7.3.2', '1.3.6.1.4.1.311.20.2.2', '1.3.6.1.5.2.3.4', '2.5.29.37.0'
function Test-SignIn($t) {
$e = $t.pKIExtendedKeyUsage
-not $e -or [bool]($e | Where-Object { $_ -in $signIn })
}
# Everyone, NETWORK, INTERACTIVE, Anonymous, Authenticated Users, This Organization, Users,
# plus Domain Users, Domain Guests and Domain Computers of any domain
function Test-Broad($s) {
"$s" -in 'S-1-1-0', 'S-1-5-2', 'S-1-5-4', 'S-1-5-7', 'S-1-5-11', 'S-1-5-15', 'S-1-5-32-545' -or
"$s" -match '^S-1-5-21-\d+-\d+-\d+-51[345]$'
}
function Get-Enroll($t) {
($t.nTSecurityDescriptor.Access | Where-Object {
$_.AccessControlType -eq 'Allow' -and $_.ActiveDirectoryRights -match 'GenericAll|ExtendedRight' -and
$_.ObjectType -in [guid]::Empty, [guid]'0e10c968-78fb-11d2-90d4-00c04f79dc55'
}).IdentityReference -join ', '
}
$show = 'Name', @{ n = 'Enroll'; e = { Get-Enroll $_ } }$open holds every published template that needs no CA manager approval or authorized signature. The Enroll column lists everyone with Enroll, all extended rights or Full Control on it. Domain Users, Domain Computers, Authenticated Users or Everyone there means anyone in the domain can use the template. It doesn't subtract deny entries.
Fix your certificate templates
0 of 7 doneMore ESCs live in template settings than anywhere else. The checks here list the published templates that need no approval, along with who can enroll in each one.
-
Do firstCritical in the free scan: User-controlled certificate template subject in ADCS (ESC1)
Deep dive: ADCS ESC1Source: SpecterOps
How to check and fix ESC1
Quick check
PowerShellAny domain userAfter setup$open | Where-Object { ($_.'msPKI-Certificate-Name-Flag' -band 1) -and (Test-SignIn $_) } | Select-Object $showAny row with a broad group in Enroll is a live ESC1.
Fix
- On the Subject Name tab, switch to Build from this Active Directory information.
- If the template needs Supply in the request, require CA certificate manager approval and limit Enroll to the accounts that use it.
- Revoke anything it issued that you can't explain.
-
Do firstCritical in the free scan: Unrestricted certificate template with any purpose in ADCS (ESC2)
Deep dive: ADCS ESC2Source: SpecterOps
How to check and fix ESC2
Quick check
PowerShellAny domain userAfter setup$open | Where-Object { -not $_.pKIExtendedKeyUsage -or $_.pKIExtendedKeyUsage -contains '2.5.29.37.0' } | Select-Object $showTemplates with no EKU show up here too. Their certificates work like a subordinate CA's.
Fix
- On the Extensions tab, replace Any Purpose with the EKUs the app needs.
- Limit Enroll to the accounts that use it. Only CA admins should be able to enroll in SubCA.
-
Do firstCritical in the free scan: Misconfigured enrollment agent templates in ADCS (ESC3)
Deep dive: ADCS ESC3Source: SpecterOps
How to check and fix ESC3
Quick check
PowerShellAny domain userAfter setup$open | Where-Object { $_.pKIExtendedKeyUsage -contains '1.3.6.1.4.1.311.20.2.1' } | Select-Object $showYour real agent template should list only your agents in Enroll.
Fix
- Limit Enroll on agent templates to your real enrollment agents, or require approval.
- On the CA's Enrollment Agents tab, restrict which agents can enroll for whom. Remove Everyone from the list.
- Unpublish agent templates you don't use.
-
Do soonHigh in the free scan: Certificate Template Missing Security Extension in ADCS (ESC9)
Deep dive: ADCS ESC9Source: SpecterOps
How to check and fix ESC9
Quick check
PowerShellAny domain userAfter setup$open | Where-Object { ($_.'msPKI-Enrollment-Flag' -band 0x80000) -and (Test-SignIn $_) } | Select-Object $showDCs with the September 2025 update reject these for Kerberos. Schannel may still accept them by UPN.
Fix
- Clear the
0x80000bit on the template. Our ESC9 post has a script that changes only that bit. - Reissue the certificates in use so they pick up the SID.
- Clear the
-
Do soonHigh in the free scan: Certificate Template Grants Group Membership via Issuance Policy in ADCS (ESC13)
Deep dive: ADCS ESC13Source: SpecterOps
How to check and fix ESC13
Quick check
PowerShellAny domain userAfter setup$linked = Get-ADObject -SearchBase "CN=OID,$pks" -LDAPFilter '(msDS-OIDToGroupLink=*)' -Properties msPKI-Cert-Template-OID | ForEach-Object { $_.'msPKI-Cert-Template-OID' } $open | Where-Object { (Test-SignIn $_) -and ($_.'msPKI-Certificate-Policy' | Where-Object { $_ -in $linked }) } | Select-Object $showNo rows means no published sign-in template carries a linked policy.
Fix
- Limit Enroll to the people meant to get that group's access, or require approval.
- Remove links nothing depends on.
-
Do soonHigh in the free scan: Schema V1 Certificate Template Allows Arbitrary Application Policy in ADCS (ESC15)It's rated Moderate when every CA that publishes a listed template has the November 2024 or later update.
Deep dive: ADCS ESC15Sources: TrustedSec · MSRC
How to check and fix ESC15
Quick check
PowerShellAny domain userAfter setup$open | Where-Object { [int]$_.'msPKI-Template-Schema-Version' -le 1 -and ($_.'msPKI-Certificate-Name-Flag' -band 1) } | Select-Object $showPatching the CA doesn't remove these rows. Replacing the template does.
Fix
- Duplicate the template, which makes a copy at schema version 2 or later. Publish the copy and unpublish the original.
- Keep every CA on the November 2024 update or later. It's Microsoft's fix for CVE-2024-49019, which TrustedSec named EKUwu.
-
Do soonHigh in the free scan: Server Authentication Template with Enrollee-Supplied Subject in ADCS (ESC17)
Deep dive: ADCS ESC17 · WSUS securitySource: DigiTrace at TROOPERS26
How to check and fix ESC17
Quick check
PowerShellAny domain userAfter setup$open | Where-Object { ($_.'msPKI-Certificate-Name-Flag' -band 1) -and (-not $_.pKIExtendedKeyUsage -or $_.pKIExtendedKeyUsage -contains '1.3.6.1.5.5.7.3.1' -or $_.pKIExtendedKeyUsage -contains '2.5.29.37.0') } | Select-Object $showA web server template normally lets only admins or a server group enroll.
Fix
- Turn off Supply in the request where you can.
- Otherwise limit Enroll to the admins or servers that need it, or require approval.
Lock down your CAs
0 of 5 doneThese settings live on each CA server or its web enrollment site, not in AD. Most of the checks here read them remotely with certutil.
-
Do firstCritical in the free scan: Certificate Authority Allows Arbitrary SAN in ADCS (ESC6)It drops to High only when the scan rules out every way around the SID check.
Deep dive: ADCS ESC6Sources: SpecterOps · Microsoft KB5014754
How to check and fix ESC6
Quick check
PowerShellAny domain userAfter setupforeach ($c in $cfg) { $c; certutil -config $c -getreg policy\EditFlags | Select-String 'EDITF_|FAILED' }EDITF_ATTRIBUTESUBJECTALTNAME2in a CA's list means ESC6 is on there. If you see FAILED, run it on the CA.Fix
- On the CA, run
certutil -setreg policy\EditFlags -EDITF_ATTRIBUTESUBJECTALTNAME2, thenRestart-Service certsvc. - Give apps that need a custom SAN a narrow template of their own.
- On the CA, run
-
Do firstCritical in the free scan: Certificate Authority Disables SID Security Extension in ADCS (ESC16)ESC6 on the same CA keeps it Critical. Otherwise it drops to High once the scan rules out the other ways in.
Deep dive: ADCS ESC16 · Weak certificate mappingsSources: Certipy 5 · Microsoft KB5014754
How to check and fix ESC16
Quick check
PowerShellAny domain userAfter setupforeach ($c in $cfg) { $c; certutil -config $c -getreg policy\DisableExtensionList | Select-String '311\.25\.2|FAILED' }A
1.3.6.1.4.1.311.25.2line under a CA means ESC16 is on there.Fix
- On the CA, run
certutil -setreg policy\DisableExtensionList -1.3.6.1.4.1.311.25.2, thenRestart-Service certsvc. - Check the same CA for ESC6.
- On the CA, run
-
Do firstHigh in the free scan: Web Enrollment Allows NTLM Relay in ADCS (ESC8)
Deep dive: ADCS ESC8Sources: SpecterOps · Microsoft KB5005413
How to check and fix ESC8
Quick check
PowerShellAny domain userAfter setupforeach ($ca in $cas) { $ca.dNSHostName curl.exe -sI -m 6 "http://$($ca.dNSHostName)/certsrv/" | Select-String '^HTTP|^WWW-Authenticate' }A 401 that offers NTLM or Negotiate means ESC8 is open on that server. A 403 usually means Require SSL is on. No HTTP line means nothing answered on port 80. For HTTPS, check Extended Protection in IIS.
Fix
- Remove Web Enrollment if nothing uses it.
- Otherwise turn on Require SSL and set Extended Protection to Required on CertSrv and any CES app.
- Turn off the print spooler on DCs as a second layer.
-
Do soonHigh in the free scan: Unencrypted Certificate Authority RPC Enrollment in ADCS (ESC11)
Deep dive: ADCS ESC11Source: Compass Security
How to check and fix ESC11
Quick check
PowerShellAny domain userAfter setupforeach ($c in $cfg) { $c; certutil -config $c -getreg CA\InterfaceFlags | Select-String 'IF_|FAILED' }Every CA should list
IF_ENFORCEENCRYPTICERTREQUEST. It's been on by default since Windows Server 2012, so a CA without it was usually changed by hand.Fix
- Find clients that can't encrypt first. Windows XP and Server 2003 can't.
- On the CA, run
certutil -setreg CA\InterfaceFlags +IF_ENFORCEENCRYPTICERTREQUEST, thenRestart-Service certsvc.
-
Do soonCheck this by handThe scan doesn't read the YubiHSM settings on your CA servers.
Source: Hans-Joachim Knobloch
How to check and fix ESC12
Quick check
PowerShellAny domain userAfter setupforeach ($c in $cfg) { $c; certutil -config $c -getreg CA\CSP\Provider | Select-String 'Provider|FAILED' }PowerShellOn the CA(Get-Acl HKLM:\SOFTWARE\Yubico\YubiHSM).Access | Select-Object IdentityReference, RegistryRightsRun the second command on any CA that lists the YubiHSM Key Storage Provider.
Fix
- Let only Tier 0 admins sign in to the CA server, locally or over RDP.
- Limit read access on
HKLM\SOFTWARE\Yubico\YubiHSM. The researcher who found it recommends SYSTEM only.
Let the scan do the first pass
Checking all 17 by hand takes a lot of PowerShell and a lot of reading permissions. The free scan checks 16 of them in a few minutes, as part of its 155+ AD checks.
It runs from any Windows machine that can reach your DCs, with a standard domain account. Every core AD check is free for one domain.
- Each finding names the objects behind it, down to the template or CA.
- You get fix steps for the console or PowerShell.
- The report lists every certificate template with its enrollment settings.
- Paid plans track what changed between scans.
Take back PKI permissions
0 of 3 doneRights in the wrong hands can undo most of the fixes above. Someone who can edit a template or manage a CA can build their own ESC1 or turn on ESC6.
-
Do firstCritical in the free scan: Unrestricted certificate template modification rights in ADCS (ESC4)
Deep dive: ADCS ESC4Source: SpecterOps
How to check and fix ESC4
Quick check
PowerShellAny domain userAfter setupGet-ADObject -SearchBase "CN=Certificate Templates,$pks" -LDAPFilter '(objectClass=pKICertificateTemplate)' -Properties nTSecurityDescriptor | Where-Object { $sd = $_.nTSecurityDescriptor (Test-Broad $sd.GetOwner($sid)) -or @($sd.GetAccessRules($true, $true, $sid) | Where-Object { $_.AccessControlType -eq 'Allow' -and (Test-Broad $_.IdentityReference) -and ($_.ActiveDirectoryRights -band $w) -ne 0 }).Count } | Select-Object NameThis one reads every template, published or not.
Fix
- On the template's Security tab, take Write and Full Control away from broad groups.
- Under Advanced, make Enterprise Admins the owner.
- Check what the template issued around its last change.
-
Do soonHigh in the free scan: Vulnerable PKI Object Access Control in ADCS (ESC5)
Deep dive: ADCS ESC5Source: SpecterOps
How to check and fix ESC5
Quick check
PowerShellAny domain userAfter setup$dom = (Get-ADDomain).DomainSID.Value $root = (Get-ADDomain -Identity (Get-ADForest).RootDomain).DomainSID.Value $admins = 'S-1-5-18', 'S-1-5-32-544', 'S-1-5-9', "$dom-512", "$root-512", "$root-519" $f = '(|(objectClass=container)(objectClass=certificationAuthority)(objectClass=pKIEnrollmentService)(objectClass=msPKI-Enterprise-Oid))' Get-ADObject -SearchBase $pks -LDAPFilter $f -Properties nTSecurityDescriptor | Where-Object { @($_.nTSecurityDescriptor.GetAccessRules($true, $true, $sid) | Where-Object { $_.AccessControlType -eq 'Allow' -and "$($_.IdentityReference)" -notin $admins -and "$($_.IdentityReference)" -notlike '*-517' -and ($_.ActiveDirectoryRights -band $w) -ne 0 }).Count } | Select-Object Name, ObjectClassIt leaves out Cert Publishers (RID 517) on purpose. That group should hold only your CA servers.
Fix
- Remove write access for anyone except Tier 0 admins and one small PKI admin group.
- Make sure NTAuthCertificates lists only CAs you own.
- Treat each CA server as Tier 0, including its computer account in AD.
-
Do soonHigh in the free scan: Risky Certificate Authority Access Control in ADCS (ESC7)
Deep dive: ADCS ESC7Source: SpecterOps
How to check and fix ESC7
Quick check
Open
certsrv.mscand go to the CA's Properties, then the Security tab. Our ESC7 post has a script that reads every CA at once.Fix
- Leave both rights with Administrators, Domain Admins, Enterprise Admins and one PKI admin group.
- Confirm ESC6 is still off and SubCA isn't published on your issuing CAs.
Close the certificate mapping gaps
0 of 2 doneThese two decide which account a certificate signs in as. ESC10 is a setting on your DCs. ESC14 is about who can write mappings on admin accounts.
-
Do soonHigh in the free scan: Weak Certificate Mapping on Domain Controllers in ADCS (ESC10)
Deep dive: ADCS ESC10 · Weak certificate mappingsSources: SpecterOps · Microsoft KB5014754
How to check and fix ESC10
Quick check
PowerShellDomain AdminInvoke-Command -ComputerName (Get-ADDomainController -Filter *).HostName -ScriptBlock { $kdc = Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Services\Kdc $sch = Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel [pscustomobject]@{ KdcBinding = $kdc.StrongCertificateBindingEnforcement; SchannelWeak = $sch.CertificateMappingMethods -band 7 } } | Select-Object PSComputerName, KdcBinding, SchannelWeakA blank KdcBinding means the value isn't set, which is what you want. SchannelWeak should be 0 on every DC.
Fix
- Install the current update on any DC older than September 2025.
- Remove both values, starting with any GPO that sets them. Schannel then falls back to
0x18.
-
Do soonHigh in the free scan: Weak Certificate Mapping Write Access in ADCS (ESC14)
Deep dive: ADCS ESC14 · Weak certificate mappingsSource: SpecterOps
How to check and fix ESC14
Quick check
PowerShellAny domain user$dn = "CN=AdminSDHolder,CN=System,$((Get-ADDomain).DistinguishedName)" # All properties, altSecurityIdentities and the Public Information property set $attr = [guid]::Empty, [guid]'00fbf30c-91fe-11d1-aebc-0000f80367c1', [guid]'e48d0154-bcf8-11d1-8702-00c04fb96050' (Get-ADObject -Identity $dn -Properties nTSecurityDescriptor).nTSecurityDescriptor.Access | Where-Object { $_.AccessControlType -eq 'Allow' -and ($_.ActiveDirectoryRights -match 'GenericAll|WriteDacl|WriteOwner' -or ($_.ActiveDirectoryRights -match 'GenericWrite|WriteProperty' -and $_.ObjectType -in $attr)) } | Select-Object IdentityReference, ActiveDirectoryRights -UniqueExpect SYSTEM, Administrators, Domain Admins and Enterprise Admins. AdminSDHolder copies anyone else onto every admin account within the hour. Run it once per domain.
Fix
- Remove the extra entries on AdminSDHolder first, then on the accounts.
- Remove any mapping on an admin account that nobody added on purpose.
Where this ADCS cheat sheet comes from
- SpecterOps, Certified Pre-Owned (ESC1 to ESC8)
- SpecterOps, Certificates and Pwnage and Patches, Oh My! (ESC9 and ESC10)
- Compass Security, Relaying to AD Certificate Services over RPC (ESC11)
- Hans-Joachim Knobloch, shell access to an ADCS CA with YubiHSM (ESC12)
- SpecterOps, ADCS ESC13 Abuse Technique
- SpecterOps, ADCS ESC14 Abuse Technique
- TrustedSec, EKUwu (ESC15)
- Microsoft Security Response Center, CVE-2024-49019
- Certipy, the release of v5 and ESC16
- DigiTrace at TROOPERS26, ESC17 and HTTPS-enabled WSUS clients
- Certipy wiki, privilege escalation from ESC1 to ESC17
- Microsoft, KB5014754 certificate-based authentication changes
- Microsoft, KB5005413 mitigating NTLM relay attacks on AD CS
- Microsoft Learn, certutil
Check names link to our checks library. We last reviewed this page on November 11, 2026.
Insight Recon · insightrecon.com/adcs-esc-cheat-sheet · Updated November 2026
Where the numbers come from
17 ESCs since 2021
SpecterOps numbered the first eight in their Certified Pre-Owned research. Researchers have added at least one every year since.
- 2021
- ESC1 to ESC8Will Schroeder and Lee Christensen, SpecterOps
- 2022
- ESC9, ESC10Oliver Lyak, Certipy 4.0
- ESC11Sylvain Heiniger, Compass Security
- 2023
- ESC12Hans-Joachim Knobloch
- 2024
- ESC13, ESC14Jonas Bülow Knudsen, SpecterOps
- ESC15Justin Bollinger, TrustedSec
- 2025
- ESC16Oliver Lyak, Certipy 5
- 2026
- ESC17Alexander Neff and Phil Knüfer, DigiTrace
ADCS ESC questions
What does ESC mean in ADCS?
ESC is short for escalation. SpecterOps numbered the first eight ADCS escalation paths ESC1 to ESC8 in their 2021 Certified Pre-Owned research. Researchers have kept adding to the list since. ESC17, from 2026, is the newest.
How many ADCS ESCs are there?
There are 17 as of November 2026, from ESC1 to ESC17. Most are settings you can change yourself. ESC15 is a vulnerability Microsoft patched in November 2024 as CVE-2024-49019. ESC12 comes from how one HSM vendor's software stores its password.
Which ADCS ESCs should I fix first?
Start with the 7 marked Do first. They're the six our scan rates Critical, plus ESC8, since a relayed DC sign-in gets an attacker a certificate as that DC. After that, work through the rest group by group.
Can I check for ADCS ESCs without attack tools?
You can. Every check on this page uses tools that ship with Windows or RSAT. Certipy and Certify find the same settings, but they're attack tools that your EDR may block.
Did the strong certificate mapping updates fix ADCS?
They closed part of it. Since the September 2025 update, domain controllers always enforce strong certificate mapping for Kerberos, so a certificate that only matches an account by name gets rejected. That stops ESC9 and ESC16 unless something else is wrong, like ESC6 on the same CA. Schannel can still accept UPN mapping if CertificateMappingMethods allows it, which is the part of ESC10 the update doesn't touch. Most of the other ESCs don't depend on name matching at all.
Is ESC17 the same as ESC1?
They're close. ESC1 covers templates that allow sign-in, while ESC17 covers ones that allow server authentication, which ESC1 checks skip. Swapping Client Authentication for Server Authentication on an ESC1 template without turning off Supply in the request leaves you with an ESC17.
Does Insight Recon check for every ESC?
It checks ESC1 to ESC17, apart from ESC12. ESC12 lives in the CA server's own registry, outside what the scan reads. The other 16 are part of the core AD checks, which are free for one domain.
Free AD scan
See which of these you have
The free scan checks 16 of these 17 in a few minutes from any Windows machine that can reach your DCs. Then work through what it finds with the fixes above.