adcs
Theadcs command provides tooling for enumerating, analyzing, and exploiting Active Directory Certificate Services (ADCS). It covers certificate authority enumeration, vulnerability detection across ESC1–ESC16, certificate requests, NT hash extraction via PKINIT, and relay attack enumeration.
Usage
Subcommands
adcs find
Enumerate the full ADCS environment and detect vulnerabilities. This is typically the first ADCS command you run — it enumerates all certificate authorities and certificate templates, then evaluates them for known escalation scenarios (ESC1–ESC16).
Flags
| Flag | Description |
|---|---|
--output, -o | Directory to write enumeration results |
--ldap-server | LDAP server (defaults to stored target) |
What It Detects
| ESC | Description |
|---|---|
| ESC1 | Template allows client-supplied Subject Alternative Names with enrollment rights to low-privileged users |
| ESC2 | Template has the Any Purpose or SubCA EKU with enrollment rights to low-privileged users |
| ESC3 | Template allows enrollment agent enrollment (Certificate Request Agent) |
| ESC4 | Template has a vulnerable DACL that allows low-privileged users to modify the template |
| ESC5 | Vulnerable PKI object DACL (CA, AIA, CDP, NTAuthCertificates) |
| ESC6 | CA has EDITF_ATTRIBUTESUBJECTALTNAME2 flag set |
| ESC7 | CA has dangerous permissions for unprivileged users |
| ESC8 | CA web enrollment is accessible and allows NTLM relay |
| ESC9 | Certificate template with no security extension and CT_FLAG_NO_SECURITY_EXTENSION |
| ESC10 | Weak certificate mapping configuration on the target domain |
| ESC11 | CA has IF_ENFORCEENCRYPTICERTREQUEST flag not set |
| ESC12 | CA Shell access via EDITF_ATTRIBUTEALTNAME2 |
| ESC13 | Issuance policy linked to a group enables privilege escalation |
| ESC16 | CA does not enforce strong certificate binding |
certificate_authorities, certificate_templates, and adcs_vulnerabilities tables.
adcs req
Request or retrieve certificates from a Certificate Authority.
Flags
| Flag | Description |
|---|---|
--ca | Certificate Authority name (required) |
--target | Target CA server hostname/IP (required) |
--template | Certificate template name |
--subject | Certificate subject (e.g., CN=user) |
--upn | User Principal Name for Subject Alternative Name |
--dns | DNS SAN (repeatable, e.g., --dns host1 --dns host2) |
--email | Email SAN |
--ip | IP SAN (repeatable) |
--attributes | Additional request attributes |
--key-size | RSA key size in bits (default: 2048) |
--key-file | Use an existing private key |
--method | Request method: rpc, dcom, or web (default: rpc) |
--retrieve | Retrieve a pending or already-issued certificate |
--request-id | Request ID to retrieve |
--out, -o | Output file path for the certificate |
--pem | Output in PEM format instead of PFX |
--no-key | Don’t include private key in output |
adcs nt
Extract the NT hash of an account using PKINIT + UnPAC-the-Hash.
When you have a valid certificate for an account (e.g., obtained via adcs req), you can authenticate via Kerberos PKINIT to get a TGT, then extract the NT hash from the PAC field. This allows lateral movement with Pass-the-Hash even when you only have a certificate.
Flags
| Flag | Description |
|---|---|
--upn | Override UPN for authentication |
Authentication flags (--pfx,--pfx-password,--cert,--key,--ccache) are inherited from the global flags or stored credential.
adcs relay
Enumerate and support ADCS relay attacks (ESC8).
/certsrv/certfnsh.asp) to request a certificate on behalf of the coerced machine account. R4t’s relay subcommand provides enumeration support for identifying relay targets.
adcs auth (planned)
Authenticate using certificates (PKINIT or Schannel). Not yet fully implemented.
adcs account (planned)
Manage Active Directory accounts via ADCS. Not yet implemented.
adcs ca (planned)
Manage Certificate Authorities (view, configure). Not yet implemented.
adcs cert (planned)
Certificate format conversion utilities (PFX ↔ PEM, extract private key, etc.). Not yet implemented.
adcs forge (planned)
Forge certificates — Golden Certificate attacks using the stolen CA private key. Not yet implemented.
adcs shadow (planned)
Shadow Credentials — manipulate msDS-KeyCredentialLink on target objects for certificate-based authentication without a template. Not yet implemented as a standalone subcommand (shadow credential detection is available via ldap scan).

