1. Resources
  2. Detection rules
  3. NTAuth Store or PKI Trust Object Changed

NTAuth Store or PKI Trust Object Changed detection rules

A CA certificate added to the NTAuth store makes certificates from that CA valid for sign-in to the whole forest. An attacker with write access to the PKI objects trusts a CA of their own. Detected with events 5136 and 5137.

Platform
Active Directory
Severity
Critical
Log source
Windows Security event log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Write access to the NTAuth store or to the PKI containers in the configuration partition, and a CA certificate with its private key under the attacker's control.
Impact
Certificates from the attacker's CA are accepted for sign-in across the forest for any account, and the organization cannot see or revoke them on its own CAs.
Response
Remove the unauthorized CA certificate from the NTAuth store and the other CA objects, and handle the incident as a compromise of the forest.
Mitigation
Limit write access to Public Key Services and everything below it to the forest's Tier 0 administrators, and review the NTAuth store against the CA inventory.
Event IDs
51365137

How the attack works

Active Directory keeps the list of certification authorities it trusts in the configuration partition, under CN=Public Key Services,CN=Services. The object CN=NTAuthCertificates is the NTAuth store. A CA whose certificate is published in its cACertificate attribute is trusted to issue certificates that can be used for authentication, and an enterprise CA publishes its own certificate there when it is installed. The same container holds the objects that publish CA certificates to the forest (certificationAuthority objects under Certification Authorities and under AIA) and the enterprise CAs that clients can enroll with (pKIEnrollmentService objects under Enrollment Services). Since the April 2025 updates, enforced by default from July 2025, a domain controller also applies this check to certificates that are mapped to an account explicitly, so that a certificate used for Kerberos sign-in has to chain to a CA in the NTAuth store.

Whoever can write to these objects decides which CAs the forest trusts. An attacker adds the certificate of a CA whose private key they hold to the NTAuth store, and where needed to the other CA objects. From then on they issue themselves a certificate for any account on a machine of their own and sign in with it. These certificates never pass through a CA of the organization. They are in no CA database, match no request event, and are not affected by a password reset of the account they name. The change is a way to keep control of a forest after it was compromised, and a way up wherever the access control lists of the PKI containers are wider than they should be.

The directory change is the trace: event 5136 when a value is added to cACertificate, and event 5137 when a new CA object is created. Both need an auditing entry (SACL) on the objects in the configuration partition. This page differs from AD CS CA Private Key Backup or Export, where the key of a CA that is already trusted is stolen and the trust objects stay as they are, and from AD CS Certification Authority Configuration Changed and Certificate Template Modification, which change the settings of a legitimate CA or its templates.

What an attacker needs

  • Write access to the NTAuth store object or to the containers under Public Key Services in the configuration partition. Microsoft notes that changing the NTAuth store takes Enterprise Administrator permissions, so the attacker has either reached that level or found a delegation on these objects that is too wide.
  • A CA certificate and its private key under the attacker's control.

Impact

Certificates from the attacker's CA are accepted for sign-in across the forest, for any account, including domain administrators and domain controllers. The organization cannot see or revoke these certificates on its own CAs. The access survives password resets of the impersonated accounts and lasts until the CA certificate is removed from the trust objects and the domain controllers have picked up the change.

Detection rules

CA Certificate Written to a CA Object in the Directory

Detects a value added to the cACertificate attribute of an object under the Certification Authorities or AIA container of Public Key Services in the configuration partition (event 5136, Value Added). The objects in these containers hold the certificates of the CAs that the forest publishes to its members, so a certificate added to one of them introduces another CA certificate without creating a new object. It complements the rule for the NTAuth store, which decides whether a CA is trusted for sign-in, and the rule for new CA objects. The attribute holds the certificates themselves, and Microsoft does not document how the event renders such a value, so identify the new certificate from the object itself. Requires Audit Directory Service Changes and a SACL that audits writes on these objects.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: CA Certificate Written to a CA Object in the Directory
id: f834bd0c-716f-4d36-a222-89bd6f519ba5
status: experimental
description: >-
  Detects a value added to the cACertificate attribute of an object under
  the Certification Authorities or AIA container of Public Key Services in
  the configuration partition (event 5136, Value Added). The objects in
  these containers hold the certificates of the CAs that the forest
  publishes to its members, so a certificate added to one of them introduces
  another CA certificate without creating a new object. It complements the
  rule for the NTAuth store, which decides whether a CA is trusted for
  sign-in, and the rule for new CA objects. The attribute holds the
  certificates themselves, and Microsoft does not document how the event
  renders such a value, so identify the new certificate from the object
  itself.
  Requires Audit Directory Service Changes and a SACL that audits writes on
  these objects.
references:
  - https://learn.microsoft.com/en-us/troubleshoot/windows-server/certificates-and-public-key-infrastructure-pki/decommission-enterprise-certification-authority-and-remove-objects
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-cacertificate
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
  - https://attack.mitre.org/techniques/T1649/
author: Forestall
date: 2026-11-18
tags:
  - attack.credential-access
  - attack.t1649
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    AttributeLDAPDisplayName: cACertificate
    OperationType:
      - '%%14674'
      - 'Value Added'
    ObjectDN|contains:
      - 'CN=Certification Authorities,CN=Public Key Services,CN=Services,CN=Configuration,'
      - 'CN=AIA,CN=Public Key Services,CN=Services,CN=Configuration,'
  condition: selection
falsepositives:
  - The renewal of a CA certificate, which can add the new certificate to the existing objects of that CA, and the publication of a root or intermediate CA certificate by the PKI team. Match the event to the change record.
level: medium

False positives

  • The renewal of a CA certificate, which can add the new certificate to the existing objects of that CA, and the publication of a root or intermediate CA certificate by the PKI team. Match the event to the change record.

CA Certificate Added to the NTAuth Store

Detects a value added to the cACertificate attribute of the NTAuth store object (event 5136, Value Added, object CN=NTAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration). Certificates published to this multiple-valued attribute name the certification authorities whose certificates can be used for authentication in the forest. A certificate added here makes every certificate from that CA acceptable for sign-in, so an attacker who adds the certificate of a CA they control can issue themselves a certificate for any account. The event shows the object, the attribute and the account that made the change. The attribute holds the certificates themselves, and Microsoft does not document how the event renders such a value, so identify the new certificate from the store itself. Requires Audit Directory Service Changes and a SACL that audits writes on the NTAuthCertificates object, which is in the configuration partition.

LevelHighStatusExperimentalLog sourceWindows Security event log
title: CA Certificate Added to the NTAuth Store
id: 6607060c-21f9-4dbb-9157-03cf047accec
status: experimental
description: >-
  Detects a value added to the cACertificate attribute of the NTAuth store
  object (event 5136, Value Added, object
  CN=NTAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration).
  Certificates published to this multiple-valued attribute name the
  certification authorities whose certificates can be used for
  authentication in the forest. A certificate added here makes every
  certificate from that CA acceptable for sign-in, so an attacker who adds
  the certificate of a CA they control can issue themselves a certificate for
  any account. The event shows the object, the attribute and the account that
  made the change. The attribute holds the certificates themselves, and
  Microsoft does not document how the event renders such a value, so identify
  the new certificate from the store itself. Requires Audit Directory Service
  Changes and a SACL that audits writes on the NTAuthCertificates object,
  which is in the configuration partition.
references:
  - https://learn.microsoft.com/en-us/troubleshoot/windows-server/certificates-and-public-key-infrastructure-pki/import-third-party-ca-to-enterprise-ntauth-store
  - https://learn.microsoft.com/en-us/windows/win32/adschema/a-cacertificate
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5136
  - https://attack.mitre.org/techniques/T1649/
author: Forestall
date: 2026-11-18
tags:
  - attack.credential-access
  - attack.t1649
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5136
    ObjectDN|startswith: 'CN=NTAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration,'
    AttributeLDAPDisplayName: cACertificate
    OperationType:
      - '%%14674'
      - 'Value Added'
  condition: selection
falsepositives:
  - The installation of a new enterprise CA, which publishes its own certificate to the store, the renewal of a CA certificate, and an administrator who publishes the certificate of a non-Microsoft CA for smart card logon. Each is rare and planned. Match the event to the change record and compare the store with the CA inventory.
level: high

False positives

  • The installation of a new enterprise CA, which publishes its own certificate to the store, the renewal of a CA certificate, and an administrator who publishes the certificate of a non-Microsoft CA for smart card logon. Each is rare and planned. Match the event to the change record and compare the store with the CA inventory.

CA Object Created Under Public Key Services

Detects the creation of a certificationAuthority or pKIEnrollmentService object below CN=Public Key Services,CN=Services in the configuration partition (event 5137). Windows creates these objects when Certificate Services is installed on a domain member: certificationAuthority objects under Certification Authorities and AIA hold the certificate of the CA, and the pKIEnrollmentService object under Enrollment Services is created by an enterprise CA and tells clients which certificates that CA issues. A new object of this kind therefore announces another CA to the whole forest. Outside the installation of a CA it is how a CA under an attacker's control is introduced. The event gives the distinguished name and class of the new object and the account that created it. Requires Audit Directory Service Changes and a SACL that audits the creation of child objects on these containers.

LevelMediumStatusExperimentalLog sourceWindows Security event log
title: CA Object Created Under Public Key Services
id: 64285e5f-a8b5-44e5-a53a-92c20f7edb81
status: experimental
description: >-
  Detects the creation of a certificationAuthority or pKIEnrollmentService
  object below CN=Public Key Services,CN=Services in the configuration
  partition (event 5137). Windows creates these objects when Certificate
  Services is installed on a domain member: certificationAuthority objects
  under Certification Authorities and AIA hold the certificate of the CA, and
  the pKIEnrollmentService object under Enrollment Services is created by an
  enterprise CA and tells clients which certificates that CA issues. A new
  object of this kind therefore announces another CA to the whole forest.
  Outside the installation of a CA it is how a CA under an attacker's control
  is introduced. The event gives the distinguished name and class of the new
  object and the account that created it. Requires Audit Directory Service
  Changes and a SACL that audits the creation of child objects on these
  containers.
references:
  - https://learn.microsoft.com/en-us/troubleshoot/windows-server/certificates-and-public-key-infrastructure-pki/decommission-enterprise-certification-authority-and-remove-objects
  - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-5137
  - https://attack.mitre.org/techniques/T1649/
author: Forestall
date: 2026-11-18
tags:
  - attack.credential-access
  - attack.t1649
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 5137
    ObjectClass:
      - certificationAuthority
      - pKIEnrollmentService
    ObjectDN|contains: 'CN=Public Key Services,CN=Services,CN=Configuration,'
  condition: selection
falsepositives:
  - The installation of a new CA by the PKI team, and the publication of a root or intermediate CA certificate to the directory. Both are rare and planned. Match the event to the change record.
level: medium

False positives

  • The installation of a new CA by the PKI team, and the publication of a root or intermediate CA certificate to the directory. Both are rare and planned. Match the event to the change record.

Detection logic

Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.

Sign-in with a certificate from an issuer first seen after the NTAuth store changed

Detection hypothesisSequence of eventsNeeds a baseline

A CA that was added to the NTAuth store for an attack is used soon afterwards, and its name has never appeared in a certificate sign-in before. A ticket request with a certificate whose issuer is new, shortly after the store changed, ties the directory change to its use.

  1. The NTAuth store changes: event 5136 on the object CN=NTAuthCertificates with AttributeLDAPDisplayName cACertificate and OperationType Value Added. Note the time and SubjectUserName.
  2. Build the list of issuer names seen before that time: CertIssuerName of events 4768 with result code 0x0 in the 90 days before the change.
  3. After the change, find events 4768 with result code 0x0 whose CertIssuerName is not empty and not on that list.
  4. Read TargetUserName, TargetSid and IpAddress of those events. A privileged account or the account of a domain controller that signs in this way from a workstation is urgent.

Events51364768

LimitsA new CA of your own shows the same pattern, with a change record. An attacker can give their CA the name of one of yours, and the event holds only the name, so also compare CertSerialNumber with the database of the CA that is named. A certificate that is used over Schannel leaves no event 4768. The 90 days are a starting point.

Triage

  • Read the object that changed (ObjectDN), the attribute and the account that made the change (SubjectUserName, SubjectLogonId).
  • List the certificates that are now in the store and compare them with your CA inventory. The attribute holds the certificates themselves and Microsoft does not document how the event renders such a value, so identify the new certificate from the store itself.
  • Check whether a CA was installed, renewed or decommissioned at that time. An enterprise CA publishes its own certificate when it is installed, and administrators publish the certificate of a non-Microsoft CA for smart card logon. Both are rare and planned.
  • For a new object (event 5137), read its class and container. A new object under Enrollment Services is a new enterprise CA, and one under Certification Authorities or AIA publishes another CA certificate to the forest.
  • Search for sign-ins with a certificate from an issuer you do not know after the change (event 4768, CertIssuerName).

Response

Once the attack is confirmed:

  1. Remove the unauthorized CA certificate from the NTAuth store and from the other CA objects, and make sure the domain controllers have refreshed their copy of the store.
  2. Handle the incident as a compromise of the forest. The account that made the change held write access to the configuration partition.
  3. Find the accounts that signed in with a certificate from the unauthorized issuer since the change, treat them as compromised and end their sessions.
  4. Disable the account that made the change and find out how it obtained the right, including delegations on the PKI containers.
  5. Compare the trust objects with the CA inventory again after the cleanup, and review the other PKI objects for changes by the same account.

Mitigation

  • Review the content of the NTAuth store and of the other CA containers on a schedule, and compare it with the list of CAs the organization operates. The Enterprise PKI console and certutil both show these stores.
  • Remove the certificates of CAs that were decommissioned. Microsoft's procedure for decommissioning an enterprise CA includes removing its certificate from the NTAuth store.
  • Limit write access to Public Key Services and everything below it to the forest's Tier 0 administrators, and remove delegations to other groups.
  • Keep every domain controller on the updates that enforce the NTAuth check for certificate sign-in, so that this store is the only list that decides.
  • Add auditing entries for writes and for the creation of objects on Public Key Services and its descendants, and enable Audit Directory Service Changes on all domain controllers.

Frequently asked questions

Why are the attacker's certificates not in the database of our CA?

They were not issued by it. The attacker holds the private key of a CA of their own and signs the certificates on their own machine. Your CAs never see a request, so there is nothing to find or to revoke there. The only way to end the trust is to remove the CA certificate from the NTAuth store and the other CA objects.

What adds a certificate to the NTAuth store legitimately?

An enterprise CA publishes its own certificate to the store when it is installed, and administrators publish the certificate of a non-Microsoft CA that issues smart card logon or domain controller certificates. Both happen a few times in the life of a forest and have a change record.

Does resetting passwords or the krbtgt account remove this access?

No. The trust in the CA is stored in the directory and does not depend on any password. As long as the CA certificate is in the NTAuth store, a new certificate can be issued for any account. Remove the certificate from the store first, then deal with the accounts that were used.

How does this differ from the theft of a CA private key?

When the key of a trusted CA is stolen, the trust objects in the directory do not change and the trace is on the CA server. Here the attacker brings a CA of their own and has to add it to the directory, which is the change the rules on this page match.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.