acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object ACLs), ESC7 (ManageCA/ManageCertificates abuse), ESC8 (NTLM relay to HTTP enrollment), ESC11 (NTLM relay to ICPR RPC).
$ npx -y skills add blacklanternsecurity/red-run --skill adcs-access-and-relay --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/adcs-access-and-relayContext preview
The summary Claude sees to decide when to auto-load this skill.
Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object ACLs), ESC7 (ManageCA/ManageCertificates abuse), ESC8 (NTLM relay to HTTP enrollment), ESC11 (NTLM relay to ICPR RPC).
name: adcs-access-and-relay description: > Exploits ADCS through ACL abuse on templates/CA objects and NTLM relay to enrollment endpoints. Covers ESC4 (template ACL → modify to ESC1), ESC5 (PKI object ACLs), ESC7 (ManageCA/ManageCertificates abuse), ESC8 (NTLM relay to HTTP enrollment), ESC11 (NTLM relay to ICPR RPC). keywords: - ESC4 - ESC5 - ESC7 - ESC8 - ESC11 - template ACL - ManageCA - ManageCertificates - NTLM relay certificate - relay to AD CS - certsrv relay - web enrollment relay - ICPR relay - certificate template permission - modifyCertTemplate tools: - Certipy - Certify.exe - ntlmrelayx.py - modifyCertTemplate.py - PetitPotam - Rubeus opsec: medium
You are helping a penetration tester exploit ADCS through template/CA access control abuse and NTLM relay to enrollment endpoints. All testing is under explicit written authorization.
**Kerberos-first authentication**: ESC4, ESC5, and ESC7 use Kerberos auth for all operations. ESC8 and ESC11 are inherently NTLM-based (relay attacks) — the Kerberos-first convention does not apply. These techniques explicitly accept NTLM detection artifacts (Event 4776, relay signatures) as a necessary cost.
Check for `./engagement/` directory. If absent, proceed without logging.
When an engagement directory exists:
descriptive filenames (e.g., `sqli-users-dump.txt`, `ssrf-aws-creds.json`).
Call `get_state_summary()` from the state MCP server to read current engagement state. Use it to:
Your return summary must include:
coercion tools (PetitPotam, SpoolSample, DFSCoerce)
**Kerberos-first workflow** (ESC4/5/7 only):
cd $TMPDIR && getTGT.py DOMAIN/user -hashes :NTHASH -dc-ip DC_IP export KRB5CCNAME=$TMPDIR/user.ccache # All Certipy/Impacket commands use -k -no-pass
**Tool output directory**: `getTGT.py`, `certipy req`, and `certipy auth` write output files to CWD with no output-path flag. Always prefix with `cd $TMPDIR &&`. Use `mv` (not `cp`) when saving evidence.
Claude Code cannot execute `sudo` commands. The relay infrastructure tools require root and must be handed off to the user:
**Handoff protocol:** Present the full command including `sudo` to the user. For relay chains (relay listener + coercion trigger), batch the privileged commands so the user can start them before Claude triggers coercion.
**Non-privileged commands** Claude can execute directly:
| Finding | ESC | Attack Path | |---------|-----|-------------| | WriteProperty/WriteDACL on certificate template | ESC4 | Modify template → ESC1 | | Write access to PKI containers/CA object | ESC5 | Create/publish vulnerable template | | ManageCA permission on CA | ESC7 | Enable SAN / approve requests / SubCA abuse | | ManageCertificates permission on CA | ESC7 | Approve pending requests / set extensions | | HTTP enrollment endpoint (CES/CEP/NDES) | ESC8 | NTLM relay to web enrollment | | ICPR RPC without encryption enforcement | ESC11 | NTLM relay to RPC enrollment |
# Certipy — always use -output to avoid writing to CWD certipy find -k -no-pass -dc-ip DC_IP -vulnerable -output engagement/evidence/certipy-adcs # Certify — PKI object ACLs Certify.exe pkiobjects /domain:DOMAIN /showAdmins Certify.exe find /showAllPermissions
# Certify — list CAs with enrollment URLs Certify.exe cas # certutil — enrollment server URLs certutil.exe -enrollmentServerURL -config DC.DOMAIN.LOCAL\DOMAIN-CA
# Certipy find output shows: "Enforce Encryption for Requests: Disabled" certipy find -k -no-pass -dc-ip DC_IP -stdout | grep -i "enforce encryption" # On CA server directly certutil -getreg CA\InterfaceFlags # Vulnerable if IF_ENFORCEENCRYPTICERTREQUEST is NOT set
What access do you have? ├── Write on template object → ESC4 (Step 2) ├── Write on PKI container / CA AD object → ESC5 (Step 3) ├── ManageCA on CA → ESC7 Attack 1 or 2 (Step 4) ├── ManageCertificates on CA → ESC7 Attack 3 (Step 4) ├── Can coerce NTLM auth + HTTP enrollment available → ESC8 (Step 5) ├── Can coerce NTLM auth + ICPR unencrypted → ESC11 (Step 6) └── No direct access → Escalate or **acl-abuse**
**Conditions**: WriteProperty, WriteDACL, or WriteOwner on a certificate template. The attacker modifies the template to intro
Security assessment toolkit for Claude Code. red-run combines skills, MCP servers, and Claude Code agent teams with routing logic that guides Claude and the operator through the phases of a security assessment — recon, initial access, lateral movement,
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Enumerates Active Directory domains and maps attack surface for penetration testing.
Establishes persistent access in Active Directory environments after domain compromise. Covers DCShadow (rogue DC attribute modification), Skeleton Key (LSASS…
Establishes persistence and exploits weak certificate mapping in AD CS. Covers ESC9 (no security extension), ESC10 (weak certificate mapping), ESC12-15…
Exploits misconfigured AD CS certificate templates to impersonate any domain user via SAN manipulation or enrollment agent abuse. Covers ESC1 (enrollee…
Forces remote systems to authenticate back to attacker-controlled listeners and relays captured authentication to escalate privileges or move laterally. Covers…