Repository navigation
AD CS Enumeration
--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.
--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/9389for 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-epaand--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.
| 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. |
soaphound --cert-find \
-u alice -p 'Password123!' \
-d corp.local \
-dc dc01.corp.local -dc-ip 10.0.0.10 \
--output-dir /tmp/certfindOutput 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.
| 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 |
- Transport layer:
tcp/9389to the DC (ADWS),tcp/80andtcp/443to the CA host (Web Enrollment probe),tcp/135+ dynamic high port to the CA host (Remote Registry/RPC enrichment). - DC-side events:
5156for the ADWS connections;1644on NTDS Diagnostics when the configuration-NC pulls are expensive enough. - CA host events:
4624/4634for the HTTPS probe when/certsrv/is NTLM-protected; Remote Registry triggers4624+5145(RemoteRegistry pipe). -
--cert-find-skip-web-probe+--cert-find-skip-ca-rpccuts the footprint to ADWS only, at the price of losing ESC6/ESC8/ESC10/ESC11 detection. - The urllib3
InsecureRequestWarningnoise from the web probe is suppressed since v1.2.1.
- Certipy (reference implementation): https://github.com/ly4k/Certipy
- SpecterOps "Certified Pre-Owned" paper: https://posts.specterops.io/certified-pre-owned-d95910965cd2
- MS-WCCE (Windows Client Certificate Enrollment): https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-wcce/
-
src/soaphound/ad/collectors/cert_find.py— reference implementation in-tree