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.

Run a free scan

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

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
PowerShellAny domain user
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.

01

Fix your certificate templates

0 of 7 done

More 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 $show

    Any row with a broad group in Enroll is a live ESC1.

    Fix

    1. On the Subject Name tab, switch to Build from this Active Directory information.
    2. If the template needs Supply in the request, require CA certificate manager approval and limit Enroll to the accounts that use it.
    3. Revoke anything it issued that you can't explain.
  • 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 $show

    Templates with no EKU show up here too. Their certificates work like a subordinate CA's.

    Fix

    1. On the Extensions tab, replace Any Purpose with the EKUs the app needs.
    2. 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 $show

    Your real agent template should list only your agents in Enroll.

    Fix

    1. Limit Enroll on agent templates to your real enrollment agents, or require approval.
    2. On the CA's Enrollment Agents tab, restrict which agents can enroll for whom. Remove Everyone from the list.
    3. Unpublish agent templates you don't use.
  • 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 $show

    DCs with the September 2025 update reject these for Kerberos. Schannel may still accept them by UPN.

    Fix

    1. Clear the 0x80000 bit on the template. Our ESC9 post has a script that changes only that bit.
    2. Reissue the certificates in use so they pick up the SID.
  • 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 $show

    No rows means no published sign-in template carries a linked policy.

    Fix

    1. Limit Enroll to the people meant to get that group's access, or require approval.
    2. 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 $show

    Patching the CA doesn't remove these rows. Replacing the template does.

    Fix

    1. Duplicate the template, which makes a copy at schema version 2 or later. Publish the copy and unpublish the original.
    2. Keep every CA on the November 2024 update or later. It's Microsoft's fix for CVE-2024-49019, which TrustedSec named EKUwu.
  • 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 $show

    A web server template normally lets only admins or a server group enroll.

    Fix

    1. Turn off Supply in the request where you can.
    2. Otherwise limit Enroll to the admins or servers that need it, or require approval.
02

Lock down your CAs

0 of 5 done

These 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 setup
    foreach ($c in $cfg) { $c; certutil -config $c -getreg policy\EditFlags | Select-String 'EDITF_|FAILED' }

    EDITF_ATTRIBUTESUBJECTALTNAME2 in a CA's list means ESC6 is on there. If you see FAILED, run it on the CA.

    Fix

    1. On the CA, run certutil -setreg policy\EditFlags -EDITF_ATTRIBUTESUBJECTALTNAME2, then Restart-Service certsvc.
    2. Give apps that need a custom SAN a narrow template of their own.
  • 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 setup
    foreach ($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.2 line under a CA means ESC16 is on there.

    Fix

    1. On the CA, run certutil -setreg policy\DisableExtensionList -1.3.6.1.4.1.311.25.2, then Restart-Service certsvc.
    2. Check the same CA for ESC6.
  • How to check and fix ESC8

    Quick check

    PowerShellAny domain userAfter setup
    foreach ($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

    1. Remove Web Enrollment if nothing uses it.
    2. Otherwise turn on Require SSL and set Extended Protection to Required on CertSrv and any CES app.
    3. Turn off the print spooler on DCs as a second layer.
  • How to check and fix ESC11

    Quick check

    PowerShellAny domain userAfter setup
    foreach ($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

    1. Find clients that can't encrypt first. Windows XP and Server 2003 can't.
    2. On the CA, run certutil -setreg CA\InterfaceFlags +IF_ENFORCEENCRYPTICERTREQUEST, then Restart-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 setup
    foreach ($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, RegistryRights

    Run the second command on any CA that lists the YubiHSM Key Storage Provider.

    Fix

    1. Let only Tier 0 admins sign in to the CA server, locally or over RDP.
    2. 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.
03

Take back PKI permissions

0 of 3 done

Rights 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.

  • How to check and fix ESC4

    Quick check

    PowerShellAny domain userAfter setup
    Get-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 Name

    This one reads every template, published or not.

    Fix

    1. On the template's Security tab, take Write and Full Control away from broad groups.
    2. Under Advanced, make Enterprise Admins the owner.
    3. 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, ObjectClass

    It leaves out Cert Publishers (RID 517) on purpose. That group should hold only your CA servers.

    Fix

    1. Remove write access for anyone except Tier 0 admins and one small PKI admin group.
    2. Make sure NTAuthCertificates lists only CAs you own.
    3. Treat each CA server as Tier 0, including its computer account in AD.
  • How to check and fix ESC7

    Quick check

    Open certsrv.msc and go to the CA's Properties, then the Security tab. Our ESC7 post has a script that reads every CA at once.

    Fix

    1. Leave both rights with Administrators, Domain Admins, Enterprise Admins and one PKI admin group.
    2. Confirm ESC6 is still off and SubCA isn't published on your issuing CAs.
04

Close the certificate mapping gaps

0 of 2 done

These 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.

  • How to check and fix ESC10

    Quick check

    PowerShellDomain Admin
    Invoke-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, SchannelWeak

    A blank KdcBinding means the value isn't set, which is what you want. SchannelWeak should be 0 on every DC.

    Fix

    1. Install the current update on any DC older than September 2025.
    2. Remove both values, starting with any GPO that sets them. Schannel then falls back to 0x18.
  • 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 -Unique

    Expect SYSTEM, Administrators, Domain Admins and Enterprise Admins. AdminSDHolder copies anyone else onto every admin account within the hour. Run it once per domain.

    Fix

    1. Remove the extra entries on AdminSDHolder first, then on the accounts.
    2. Remove any mapping on an admin account that nobody added on purpose.

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.

  1. 2021
    • ESC1 to ESC8Will Schroeder and Lee Christensen, SpecterOps
  2. 2022
    • ESC9, ESC10Oliver Lyak, Certipy 4.0
    • ESC11Sylvain Heiniger, Compass Security
  3. 2023
    • ESC12Hans-Joachim Knobloch
  4. 2024
    • ESC13, ESC14Jonas Bülow Knudsen, SpecterOps
    • ESC15Justin Bollinger, TrustedSec
  5. 2025
    • ESC16Oliver Lyak, Certipy 5
  6. 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.

Run a free scan