Certificate Sign-In (PKINIT)
A certificate takes the timestamp's place, and the DC hands back the NT hash for NTLM.
Why It Matters
A certificate that maps to an account signs in as that account until it expires or is revoked, whatever happens to the password. It also yields the account's NT hash, so a misissued or stolen certificate gives NTLM access too.
What Happens
With PKINIT, the AS request carries data signed with the certificate's private key in place of an encrypted timestamp, and the reply key is protected with public-key cryptography instead of the password. The DC maps the certificate to an account, then issues a TGT as it would for a password, writing event 4768 to its Security log with the certificate's issuer, serial number and thumbprint.
Mapping is the deciding check. A strong mapping ties the certificate to one account by something that cannot be reused, such as the account's SID inside it or an explicit mapping by issuer and serial number. Since KB5014754 became enforced by default in February 2025, with compatibility mode removed that September, DCs refuse a certificate that maps only by a name or carries another account's SID, writing Kdcsvc event 39 or 41 to the System log.
Key Trust needs no certificate issued to the account. The DC finds the account by public key and accepts it if the account's msDS-KeyCredentialLink attribute holds that key, which is how Windows Hello for Business key trust signs in. Write access to that attribute therefore lets someone sign in as the account, as a password reset would, and deserves the same auditing.
Because no password is involved, the DC puts the account's NTLM credentials, its NT hash, in the PAC, encrypted with the AS reply key, so NTLM single sign-on still works. A certificate therefore gives the NT hash too, and a password reset does not cancel it. Revoke the certificate, and remove any mapping or key that should not be there.
A certificate for a privileged account can come from a template that lets the requester name the subject, or from a sign-in relayed to web enrolment, which the Certificate Services abuse page covers. On the certification authority (CA), events 4886 and 4887 in the Security log record each request and each certificate issued, where Certification Services auditing and the CA's audit filter are on.
How a DC Ties a Certificate to an Account
A domain controller trusts a certificate only as far as its mapping to an account. These are the ways a DC can tie the two, and KB5014754 rates each one as strong or weak.
| Mapping | Strength |
|---|---|
| The account's SID, in the certificate's security extension | Strong |
| An explicit mapping by issuer and serial number, subject key identifier or public key hash | Strong |
| Key Trust, by the public key held in msDS-KeyCredentialLink | Strong |
| The UPN or DNS name in the subject alternative name | Weak |
| An explicit mapping by issuer and subject, subject alone, or email address | Weak |
What Is Logged
Each event below names the log it is written to, the machine that writes it and the audit setting that switches it on, then what to read in it for this page.
| Event and Log | Written On | Switch It On | What It Tells You |
|---|---|---|---|
| 4768 A Kerberos authentication ticket (TGT) was requested (opens in a new tab) Security log | Domain controllers | Audit Kerberos Authentication Service | Certificate Issuer Name, Certificate Serial Number and Certificate Thumbprint are filled only for a certificate sign-in.AS Reply: The TGT explains how to read it. |
| 39 to 41 No strong mapping, Certificate predates account, Users SID does not match Certificate SID (opens in a new tab) System log | Domain controllers | Domain controllers with the May 2022 or later updates (KB5014754) | It flags a certificate with no strong mapping (39) or one holding another account's SID (41). Event 40 in the same log, for a certificate older than its account, was written only in the old compatibility mode. |
| 4887 Certificate Services approved a certificate request and issued a certificate (opens in a new tab) Security log | The certification authority | Audit Certification Services on the CA, and the events picked on its Auditing tab (the CA audit filter) | It records each certificate issued, with its requester, request attributes and subject. It has no field for a subject alternative name in the request's extensions, which the CA database holds. |
Check It on a Machine
These Windows Registry keys hold the settings this page names. Open one to see where it lives and how to read it on a machine.
Attacks That Hook in Here
These attacks work through what this page describes. Each card says what the attack is and, where it uses one of these steps, what it does there.
- Certificate Services Abuse
Gets a certificate that signs in as another account, often a Domain Admin.
- NTLM Relay
Passes a victim's NTLM sign-in to another server and keeps the session it opens.
- Shadow Credentials
A key added to an account lets a certificate sign in as it, past a password reset.
Sources
- [MS-PKCA] PKINIT in the Kerberos Protocol (opens in a new tab)
- [MS-PKCA] Certificate Mapping (opens in a new tab)
- [MS-PKCA] Mapping Strength (opens in a new tab)
- [MS-PKCA] Key Trust (opens in a new tab)
- [MS-PAC] 2.6 PAC Credentials (opens in a new tab)
- [MS-PAC] 2.6.1 PAC_CREDENTIAL_INFO (opens in a new tab)
- RFC 4556: PKINIT (opens in a new tab)
- Microsoft Support KB5014754: Certificate-Based Authentication Changes on Domain Controllers (opens in a new tab)
- Microsoft Learn: How Windows Hello for Business Authentication Works (opens in a new tab)
- Microsoft Learn: Security Event 4768 (opens in a new tab)
- Microsoft Learn: Securing PKI, the Events to Monitor (opens in a new tab)
- Defender for Identity Posture Assessments: Certificates (opens in a new tab)