agentleFS
kaandgnshkaandgnsh/Claude-Blue/skills/active-directory-security/ad-attack-path-analysis/SKILL.md

ad-attack-path-analysis

Skill0 starsChanged 11 days agoMITView on GitHub

Use BloodHound (Community Edition) and SharpHound/AzureHound data defensively to find and remove attack paths to Tier 0 — ACL abuse (GenericAll, WriteDacl, AddMember), sessions, delegation, ADCS and hybrid paths. Use when prioritizing AD remediation, validating tiering, or explaining how an attacker reached Domain Admin.

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:

    Prefer structural fixes (tiering, delegated admin redesign) over one-off ACE removals that regrow.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

AD Attack Path Analysis (Defensive BloodHound)

Collection (authorized, coordinated with the SOC)

SharpHound.exe -c All,GPOLocalGroup --outputdirectory C:\bh --zipfilename collection.zip

SharpHound/AzureHound activity resembles attacker reconnaissance — notify the SOC, run from an approved host, and store output as sensitive (it is a map to your crown jewels). BloodHound Enterprise / CE ingest via the UI.

Edges that matter most

EdgeMeaningTypical fix
MemberOf → Tier 0Direct privilegeRemove; use JIT/PIM
GenericAll / GenericWrite / WriteDacl / WriteOwner / OwnsFull or ACL control over objectRemove ACE; review delegated admin model
AddMember / AddSelfCan add to groupRemove ACE
ForceChangePasswordReset another user's passwordRestrict to helpdesk tier for non-admin users only
HasSession / AdminToCredential exposure from privileged logons on lower-tier hostsEnforce tiering, PAWs, logon restrictions
AllowedToDelegate / AllowedToAct / unconstrainedDelegation abuseRemove delegation, mark admins sensitive
GetChanges + GetChangesAllDCSyncOnly DCs/Entra Connect (scoped)
ADCSESC1…ESC13Certificate template/CA abuseSee adcs-security-review
GPLink / GenericWrite on GPOCode execution on linked OUsRestrict GPO edit rights

Cypher examples (BloodHound CE)

// Shortest paths from any enabled user to Domain Admins
MATCH p=shortestPath((u:User {enabled:true})-[*1..]->(g:Group))
WHERE g.objectid ENDS WITH '-512'
RETURN p LIMIT 50

// Non-admin principals with DCSync rights on the domain
MATCH (n)-[:GetChanges|GetChangesAll|DCSync]->(d:Domain)
WHERE NOT (n)-[:MemberOf*1..]->(:Group {highvalue:true})
RETURN n.name, labels(n)

Property names (highvalue, tier tags) differ between legacy BloodHound and CE — adapt to your version.

Prioritization

  1. Count how many principals reach Tier 0 through each edge ("choke points"): fixing one ACE that cuts thousands of paths beats fixing many leaf issues.
  2. Prefer structural fixes (tiering, delegated admin redesign) over one-off ACE removals that regrow.
  3. Re-collect after remediation and compare path counts.

Output

Attack path review <domain> <date>  Collection: <tool/version/time>
Principals with path to Tier 0: <n> (before) → <n> (after)
Top choke points: <edge> <source> → <target> <paths cut> <fix> <owner>

Related skills

ad-privileged-access-review, adcs-security-review, gpo-security-review, dcsync-detection

References

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.