agentleFS
fatihkanfatihkan/badi/.claude/skills-vault/pentest-ad/SKILL.md

pentest-ad

Skill8 starsChanged 3 months agoMITView on GitHub

Active Directory pentest methodology — BloodHound graph analysis, Kerberos abuse, ACL exploitation, lateral movement path advisory. Triggers on Active Directory, AD pentest, BloodHound, Kerberoasting, AS-REP, DCSync, Golden Ticket, Silver Ticket, NTLM relay, lateral movement, Impacket, NetExec, Certipy.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user provides a BloodHound JSON export, the skill runs these queries (Cypher):

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

pentest-ad

Internal pentest Active Directory advisory. BloodHound graph, Kerberos vulnerability classes, ACL abuse, lateral path. Live command composing requires a scope declaration.

Triggers

  • "AD pentest"
  • "BloodHound graph analysis"
  • "I found a Kerberoast hash"
  • "can I DCSync"
  • "lateral movement plan"
  • "Golden Ticket"
  • "NTLM relay"
  • "AD CS abuse"

Methodology Flow

1. Enum: SMB, LDAP, DNS, GPP (passive first)
2. Cred: kerbrute users -> AS-REP roasting (no preauth) -> hashcat
3. Foothold: low-priv shell (phish/web/initial)
4. Recon: BloodHound -> high-value path
5. Privesc: ACL abuse, Kerberos delegation, GPO modify
6. Lateral: PtH, PtT, NTLM relay, WinRM, RDP
7. DA: DCSync (Replicating Changes), Golden Ticket (offline)
8. Persistence: Skeleton key, AdminSDHolder (TIER 2, scope-required)

BloodHound Graph Analysis

If the user provides a BloodHound JSON export, the skill runs these queries (Cypher):

// Shortest path to Domain Admin from owned user
MATCH p=shortestPath((u:User {owned:true})-[*1..]->(g:Group {name:"DOMAIN ADMINS@DOMAIN"}))
RETURN p LIMIT 5

// Kerberoastable users with priv access
MATCH (u:User {hasspn:true})-[:MemberOf|AdminTo*1..]->(c:Computer)
WHERE u.enabled=true
RETURN u.name, c.name

// AS-REP roastable
MATCH (u:User {dontreqpreauth:true, enabled:true})
RETURN u.name, u.serviceprincipalnames

// Unconstrained delegation
MATCH (c:Computer {unconstraineddelegation:true})
RETURN c.name, c.distinguishedname

// GPO modify risk
MATCH (g:GPO)<-[:GenericAll|GenericWrite|WriteOwner|WriteDacl]-(u)
RETURN g.name, u.name

Common AD Vulnerability Classes

VulnerabilityDetectionImpact
AS-REP roastDONT_REQUIRE_PREAUTH flagOffline crackable hash
KerberoastUser SPN + RC4 ticketTGS hash crack -> service acc
Unconstrained delegationComputer object flagCompromise via the DC printer bug
NTLM relaySMB sign off, web authAccount takeover via relay
ACL abuseGenericAll, WriteDaclReset password, add to group
ADCS ESC1-ESC8Vulnerable cert templateDomain admin via cert
LAPS readReadProperty ms-Mcs-AdmPwdLocal admin password leak
GPO modifyWriteProperty on GPO linkMass policy compromise
Constrained delegationService can impersonateDA via service abuse
MSSQL trustworthyxp_cmdshell + sysadminSQL -> OS command

Recommended Commands (Scope Required)

# QUIET — anonymous LDAP enum
ldapsearch -x -H ldap://<dc-ip> -b "DC=domain,DC=local" -s sub

# MODERATE — Kerberos user enum (no auth needed)
kerbrute userenum --dc <dc-ip> -d domain.local users.txt

# MODERATE — AS-REP roast (no cred)
GetNPUsers.py domain.local/ -no-pass -usersfile users.txt -dc-ip <dc-ip>

# MODERATE — Kerberoast (with a cred)
GetUserSPNs.py domain.local/user:password -dc-ip <dc-ip> -request

# MODERATE — BloodHound collection
bloodhound-python -u user -p password -d domain.local -ns <dc-ip> -c All

# LOUD — NetExec spray (single password, all users)
nxc smb <range> -u users.txt -p 'Spring2026!' --continue-on-success

OPSEC Notes

  • AS-REP roast: domain controller event 4768 (Kerberos pre-auth failure) — gets DETECTED
  • Kerberoast: TGS-REQ event 4769 + service ticket encryption type 0x17 (RC4) — anomaly
  • BloodHound: massive LDAP query traffic (default collection). Slow down: --throttle 30
  • NetExec spray: one password across all users -> triggers the account lockout policy (3 wrong -> 30-min lock is common)

Finding Output Template

## AD Compromise Path — <domain>

### Owned Path
1. anonymous SMB shares -> found credentials.txt
2. cred: backup-svc / Backup2024!
3. backup-svc Kerberoastable -> hash crack in 4 minutes
4. backup-svc -> ServerAdmins group member
5. ServerAdmins -> WriteDacl on Domain Admins
6. Single command: net group "Domain Admins" attacker /add -> DA

### Detection Gap (Defensive Output)
- Anonymous SMB share access NOT logged
- ServerAdmins WriteDacl change NOT detected (no Event 5136 alert)
- Recommended Sigma rule: under pentest-detection

Out-of-Scope

  • Live exploit execution (GenericAll abuse Bash composer, with scope)
  • Persistent backdoor (such as Skeleton Key) — stays outside the engagement
  • Physical DC attack

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.