AD CS/AD FS Enrollment "cdc" Chase Attribute Abuse → Domain Controller Impersonation (CertiGhost, CVE-2026-54121)
Published: 2026-07-27 • Researcher: aniqfakhrul & H0j3n
- Severity
- High
- CVE
- CVE-2026-54121
- Category
- network
- Affected product
- Microsoft Active Directory Certificate Services (AD CS) Enterprise CA, in environments where AD FS / certificate enrollment resolves DC identity via "chase" (cdc/rmd) request attributes
- Affected versions
- Windows Server AD CS Enterprise CA builds prior to Microsoft's 2026-07-14 fix; templates whose msPKI-Certificate-Name-Flag includes a DNS-name subject flag (nameFlag & 0x58000000, e.g. the default Machine/DomainController-style templates) are exploitable
- Disclosed
- 2026-07-27
- Patch status
- Patched
Tags
References
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-07-27 |
| Last Updated | 2026-07-24 |
| Author / Researcher | aniqfakhrul & H0j3n |
| CVE / Advisory | CVE-2026-54121 |
| Category | network |
| Severity | High |
| CVSS Score | 8.8 (CVSSv3) |
| Status | Weaponized |
| Tags | active-directory, adcs, certificate-services, dcsync, pkinit, kerberos, privilege-escalation, domain-controller-impersonation, windows |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Microsoft Active Directory Certificate Services (AD CS) Enterprise CA, in environments where AD FS / certificate enrollment resolves DC identity via “chase” (cdc/rmd) request attributes |
| Versions Affected | Windows Server AD CS Enterprise CA builds prior to Microsoft’s 2026-07-14 fix; templates whose msPKI-Certificate-Name-Flag includes a DNS-name subject flag (nameFlag & 0x58000000, e.g. the default Machine/DomainController-style templates) are exploitable |
| Language / Platform | Windows Server, Active Directory Certificate Services, Kerberos/PKINIT, LDAP/SMB (Netlogon) |
| Authentication Required | Yes — any authenticated low-privileged domain user (default AD “create computer objects” / self-join quota is sufficient) |
| Network Access Required | Yes — the attacker host must be reachable by the Enterprise CA over SMB (445) and LDAP (389) |
Summary
CertiGhost (CVE-2026-54121) abuses a “chase” mechanism in AD CS certificate enrollment: when a certificate request carries a cdc (chase domain controller) attribute pointing at an attacker-controlled IP alongside an rmd (remote machine DNS) attribute naming a target machine, the Enterprise CA will connect back to that attacker-controlled host over SMB/LDAP to resolve the named machine’s identity (sAMAccountName, SID, dNSHostName) instead of querying a real, trusted source. A low-privileged domain user can stand up rogue LDAP/SMB listeners, request a machine certificate as a self-created computer account, set cdc to their own IP and rmd to a real Domain Controller’s DNS name, and have the CA issue a certificate for a computer object whose identity was fabricated by the attacker’s rogue listener — a certificate that authenticates as the Domain Controller itself. That certificate is then used with PKINIT to log on as the DC, extract its NT hash/PAC via a U2U ticket, and pivot to DCSync/krbtgt theft for full domain compromise.
Vulnerability Details
Root Cause
When an Enterprise CA processes a certificate request and needs to validate the requester’s claimed subject/SAN identity for templates that permit a DNS-name-derived subject (nameFlag & 0x58000000), it can be steered into performing a “chase” lookup: a request attribute named cdc tells the CA which host to query, and rmd tells it which machine name to ask about. The CA does not verify that the cdc target is a legitimate, trusted Domain Controller — it will happily connect to any attacker-supplied IP over SMB (for a Netlogon/LSA-style identity lookup) and LDAP (for a directory-style identity lookup), and trust whatever sAMAccountName/objectSid/dNSHostName that rogue endpoint returns. Because the requesting principal is validated via genuine Netlogon (NetrServerReqChallenge/NetrServerAuthenticate3/NetrLogonSamLogonWithFlags) against the real DC, the rogue listener’s responses describing the target identity are trusted by extension — allowing the attacker to substitute a Domain Controller’s identity for their own freshly created computer account’s identity in the resulting certificate.
Attack Vector
- As any authenticated low-privileged domain user, create (or reuse) a computer account (default machine-account quota permits self-service computer object creation via SAMR or LDAP).
- Stand up two rogue listeners on the attacker host: an SMB/LSA server on port 445 (impersonating a DC’s LSA policy/Netlogon responses) and a hand-rolled LDAP server on port 389 (impersonating rootDSE/directory lookups), authenticated using the newly created computer account’s own Netlogon secure channel against the real DC.
- Build and submit a CSR to the Enterprise CA’s
ICertPassageRPC interface (\pipe\cert) as the created computer account, embedding request attributesCertificateTemplate:Machine,SAN:dns=<own-hostname>,cdc:<attacker-ip>(the rogue listener’s address), andrmd:<target-dc-dns-name>(the DC being impersonated). - The CA connects back to the attacker’s rogue LSA/LDAP listeners on the advertised
cdcaddress to resolve the identity ofrmd. The rogue listeners answer with the target DC’s real sAMAccountName, objectSid, and dNSHostName instead of the requesting computer’s own identity. - The CA issues a valid certificate bound to the Domain Controller’s identity, delivered back over the RPC channel as a PKCS#12 (
.pfx). - The attacker performs PKINIT authentication using the DC’s certificate to obtain a TGT as the DC, then uses a User-to-User (U2U) TGS request to obtain a service ticket encrypted with a key derivable from the PKINIT reply key, decrypts the embedded PAC, and extracts the DC computer account’s NT hash/credential material from the
PAC_CREDENTIAL_INFObuffer — writing both a.ccache(TGT) and the NT hash to disk. - With the DC’s NT hash and/or
.ccache, the attacker performs DCSync to dumpkrbtgtand all domain credentials, achieving full domain compromise.
Impact
A single authenticated low-privileged domain account (no special AD rights required beyond default machine-account-quota self-join) can escalate to a valid certificate that authenticates as a Domain Controller, and from there to golden-ticket-grade compromise of the entire Active Directory forest via DCSync/krbtgt theft. This is a complete authentication-boundary bypass for any AD CS deployment where the affected chase mechanism is reachable — no phishing, no existing admin foothold, and no direct interaction with the target DC’s own credentials required.
Environment / Lab Setup
Target: Windows Server AD environment with an Enterprise CA (AD CS) issuing certificates
from a template permitting DNS-name subjects (e.g. "Machine"), pre-2026-07-14 patch
Attacker: Linux host with Python 3, Impacket, cryptography, asn1crypto, pycryptodome
Must be network-reachable by the CA over SMB (445) and LDAP (389); requires root
locally to bind those privileged ports
Domain: Any authenticated low-privileged domain user account (default machine account
quota sufficient to self-create a computer object)
Tools: certighost.py (this folder) — mirrored unmodified from
https://github.com/aniqfakhrul/CVE-2026-54121Setup Steps
| |
Proof of Concept
See
certighost.py(full, unmodified) andupstream-README.mdin this folder — mirrored from aniqfakhrul/CVE-2026-54121. Verified before ingestion: read the complete 987-line script end to end. It genuinely implements every stage of the documented chain from scratch — a NETLOGON secure-channel oracle (NLOracle) that authenticates NTLM challenge/response via realNetrServerReqChallenge/NetrServerAuthenticate3/NetrLogonSamLogonWithFlagscalls against the real DC; a hand-rolled ASN.1/BER LDAP server (RogueLDAP) that handles SASL/GSS-SPNEGO NTLM bind and search requests including NTLMSSP sealing; a patchedimpacket.smbserver-based rogue SMB/LSA service (LSASrv) answeringLsarOpenPolicy/LsarQueryInformationPolicywith fabricated domain/DC identity; a realICertPassage(ICPR) RPC client that submits the CSR with thecdc/rmdrequest attributes over\pipe\cert; and a full from-scratch PKINIT implementation (Diffie-Hellman key exchange, CMSSignedDataAuthPack signing, AS-REQ/AS-REP, then a genuine U2U TGS-REQ/TGS-REP round trip to decrypt the PAC and pullPAC_CREDENTIAL_INFO/NTLM_SUPPLEMENTAL_CREDENTIALfor the NT hash). This is not a stub or template — it is a complete, working exploitation chain, authored by aniqfakhrul, one of the two researchers who discovered and reported the underlying vulnerability to Microsoft.
Step-by-Step Reproduction
Recon — Confirm the target Enterprise CA and a certificate template permitting DNS-name subjects (e.g.
Machine) are reachable, and that the authenticated low-priv account can create a computer object (default machine account quota).Run the tool — invoke
certighost.pyas root, supplying low-priv domain credentials and the DC’s IP:Shell script1sudo python3 certighost.py -d playground.local -u lowpriv -p 'Password1234' --dc-ip 192.168.1.10Automatic chain execution — the script, unattended:
Output[*] Connecting to LDAPS [*] Detecting infrastructure [*] Creating computer: GHOSTABCDEFGH$ [*] Starting rogue servers (LSA:445 + LDAP:389) [*] Requesting certificate (template=Machine, cdc=<attacker-ip>) Saved: dc01.pfx [*] PKINIT as DC01$ [*] Got hash for DC01$: DC01$:aad3b435b51404eeaad3b435b51404ee:<DC-machine-account-NT-hash> ccache: dc01$.ccache [*] GGWPPost-exploitation — use the DC’s NT hash /
.ccachewithsecretsdump.pyorimpacket-secretsdumpto DCSync the domain (krbtgt,Administrator, all user hashes), or use the.ccachedirectly withKRB5CCNAMEfor pass-the-ticket.
Exploit Code
See
certighost.pyin this folder for the complete implementation.
| |
Expected Output
[*] Got hash for DC01$:
DC01$:aad3b435b51404eeaad3b435b51404ee:9f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c
ccache: dc01$.ccache
[*] GGWPDetection & Indicators of Compromise
Remediation
| Action | Detail |
|---|---|
| Patch | Apply Microsoft’s fix, released 2026-07-14, addressing CVE-2026-54121. |
| Workaround | Disable or restrict the cdc/chase-attribute enrollment mechanism where not required; restrict certificate templates with DNS-name subject flags (nameFlag & 0x58000000) to trusted principals only; deny low-privileged users the ability to self-create computer objects (reduce ms-DS-MachineAccountQuota to 0) as defense-in-depth. |
| Config Hardening | Enforce certificate enrollment auditing (Event IDs 4886/4887) with alerting on templates whose issued subject doesn’t match the requesting principal’s own identity; segment/firewall the CA/DC so it cannot originate SMB/LDAP connections to general workstation IP ranges; apply standard AD CS hardening (disable ESC1/ESC8-style abuse vectors, enable Certificate Services role-based access review). |
References
- MSRC Update Guide — CVE-2026-54121
- Technical writeup — H0j3n, “CertiGhost”
- Public PoC — aniqfakhrul/CVE-2026-54121
- ly4k/Certipy (referenced by upstream as related AD CS tooling)
Notes
Verified before ingestion this session: the upstream repository (https://github.com/aniqfakhrul/CVE-2026-54121, 233 stars / 48 forks at time of review) was cloned directly and its full contents read — certighost.py (987 lines) and README.md. The script was confirmed to genuinely implement the documented CVE-2026-54121 mechanism end to end (rogue Netlogon-authenticated SMB/LSA and hand-rolled LDAP listeners, malicious cdc/rmd CSR attribute construction against the CA’s ICertPassage RPC interface, and a from-scratch PKINIT + U2U implementation for NT hash/PAC extraction) rather than being a stub, template, or phantom PoC. The file copied into this folder (certighost.py) is byte-for-byte identical to the upstream clone (verified via diff/md5sum) — no paraphrasing or rewriting was performed. The author, aniqfakhrul, is one of the two researchers (alongside H0j3n) credited with discovering and reporting this vulnerability to Microsoft on 2026-05-14, which was patched 2026-07-14 and the PoC publicly released 2026-07-24 (matching the upstream repo’s last commit date). No requirements.txt or LICENSE file exists in the upstream repository, so none is mirrored here; the companion upstream-README.md is copied for attribution. As of this archive entry’s creation (2026-07-27), CVE-2026-54121 is not listed in the CISA KEV catalog and there is no confirmed in-the-wild exploitation.
| |