Skip to content

AD CS Enumeration

belettetimoree edited this page Nov 1, 2026 · 1 revision

AD CS Enumeration — --cert-find

--cert-find is Soaphound.py's equivalent of certipy find. It enumerates every Enterprise CA registered in the forest, every certificate template they publish, parses the ACLs on both, probes HTTP/HTTPS Web Enrollment, and runs an RPC lookup against the CA to pick up registry-only vulnerabilities (ESC6, ESC11, Request Disposition). Output lands in a human-readable .txt and a BloodHound-friendly .json.

Overview

--cert-find is designed to match Certipy's semantics field by field, so that findings copy-paste cleanly back into Certipy for weaponization. The feature stays independent from the regular BloodHound collection path — it does not require -c Default and does not emit BloodHound JSON.

Three protocols are involved:

  • ADWS on tcp/9389 for the configuration NC enumeration (CN=Certificate Templates,..., CN=Enrollment Services,..., pKI container ACLs).
  • HTTP/HTTPS on the CA host for the Web Enrollment probe (certsrv/), controlled by --cert-find-force-epa and --cert-find-skip-web-probe.
  • RPC/Remote Registry on the CA host for ESC6, ESC11 and Request Disposition, controlled by --cert-find-skip-ca-rpc.

CLI Flags

Flag Purpose
--cert-find Run the AD CS enumeration pass. Mutually independent from BloodHound collection flags.
--cert-find-force-epa {auto,enabled,disabled} Override EPA (Extended Protection for Authentication) detection on the Web Enrollment probe. auto runs the heuristic; enabled/disabled short-circuits it.
--cert-find-skip-web-probe Do not probe HTTP/HTTPS /certsrv/ endpoints. ESC8 (Web Enrollment relay) will not be evaluated.
--cert-find-skip-ca-rpc Skip Remote Registry/RPC enrichment. ESC6 (EDITF_ATTRIBUTESUBJECTALTNAME2), ESC11 (RPC authentication requirement) and RequestDisposition tri-state cannot be classified without this.

Example

soaphound --cert-find \
  -u alice -p 'Password123!' \
  -d corp.local \
  -dc dc01.corp.local -dc-ip 10.0.0.10 \
  --output-dir /tmp/certfind

Output files (abbreviated):

/tmp/certfind/
├── 20261101170312_Soaphound_CertFind.json
└── 20261101170312_cert_find.txt

The text report lists each CA, its ACLs, EPA posture, Request Disposition, SAN handling, and every published template with its properties and detected ESC vulnerabilities.

Detection coverage

Code Condition Status
ESC1 Template allows enrollee-supplied SAN + Client Auth EKU + low-priv enroll Detected
ESC2 Template with Any Purpose EKU reachable by low-priv enroll Detected
ESC3 Enrollment Agent template usable to re-enroll on behalf of others Detected
ESC4 Vulnerable DACL on the template object (write access by low-priv) Detected (ACLs)
ESC5 Vulnerable DACL on the CA object or AD CS container Detected (ACLs)
ESC6 CA registry flag EDITF_ATTRIBUTESUBJECTALTNAME2 set Needs --cert-find's RPC probe (default on)
ESC7 Low-priv ManageCA / ManageCertificates on the CA Detected (ACLs)
ESC8 Web Enrollment with NTLM relay viable (no EPA, HTTP accepted) Detected via web probe
ESC9 szOID_NTDS_CA_SECURITY_EXT absent + weak UPN mapping Detected on template
ESC10 Weak certificate mapping registry (StrongCertificateBindingEnforcement) Detected via RPC enrichment
ESC11 RPC interface accepts unauthenticated enrollment Detected via RPC probe

OpSec Notes

  • Transport layer: tcp/9389 to the DC (ADWS), tcp/80 and tcp/443 to the CA host (Web Enrollment probe), tcp/135 + dynamic high port to the CA host (Remote Registry/RPC enrichment).
  • DC-side events: 5156 for the ADWS connections; 1644 on NTDS Diagnostics when the configuration-NC pulls are expensive enough.
  • CA host events: 4624/4634 for the HTTPS probe when /certsrv/ is NTLM-protected; Remote Registry triggers 4624 + 5145 (RemoteRegistry pipe).
  • --cert-find-skip-web-probe + --cert-find-skip-ca-rpc cuts the footprint to ADWS only, at the price of losing ESC6/ESC8/ESC10/ESC11 detection.
  • The urllib3 InsecureRequestWarning noise from the web probe is suppressed since v1.2.1.

References

Clone this wiki locally