--- name: adcs-persistence description: Persistence via Active Directory Certificate Services — stealing CA private keys to forge arbitrary certificates (ESC Golden Certificate / DPERSIST1), harvesting user/machine certificates for long-lived authentication, and abusing enrollment rights for durable access that survives password resets. Use post-compromise for stealthy, resilient AD persistence. --- # AD CS Persistence (Golden Certificate / Cert Theft) Certificates authenticate independently of passwords and last for the template's validity (often 1-10 years). That makes AD CS a premier persistence mechanism. ## Trigger phrases `golden certificate, ca private key theft, certificate persistence, dpersist, forge certificate, cert theft` ## Techniques - **Golden Certificate (DPERSIST1):** steal the CA's private key, then forge a certificate for any user offline — a "golden ticket" that bypasses the CA entirely. ``` certipy ca -backup -u @ -p -ca # exfil CA cert+key (admin on CA) certipy forge -ca-pfx .pfx -upn administrator@ # forge arbitrary user cert certipy auth -pfx administrator.pfx -dc-ip ``` - **Certificate theft (THEFT1-5):** export existing user/machine certs + keys from the store (DPAPI, `certipy` / mimikatz `crypto::`) for long-lived auth as that principal. - **Enrollment-right persistence:** grant a controlled account enrollment rights on a client-auth template; re-enroll whenever needed. ## OPSEC & remediation note - Forged certs are hard to detect and survive password resets; remediation requires CA key rotation / revocation, not just password changes — document this. - Prefer theft/forge over noisy repeated enrollment on monitored CAs. ## Evidence The exfiltrated CA key or stolen cert, a forged/renewed cert, and re-authentication proof. Clearly label as persistence.