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.
In this repository273 other files it gives its agents.
- adcs-security-reviewSkill
- ad-privileged-access-reviewSkill
- dcsync-detectionSkill
- gpo-security-reviewSkill
- kerberos-attack-detectionSkill
- agent-tool-permission-reviewSkill
- ai-incident-responseSkill
- llm-gateway-controlsSkill
- llm-security-evaluationSkill
- mcp-server-security-reviewSkill
- model-artifact-securitySkill
- prompt-injection-reviewSkill
- rag-security-reviewSkill
- api-abuse-detectionSkill
- api-authorization-testingSkill
- api-inventorySkill
- api-schema-securitySkill
- dast-baselineSkill
- sast-triageSkill
- sca-dependency-riskSkill
- secure-code-reviewSkill
- security-requirementsSkill
- threat-modelingSkill
- asset-criticality-tieringSkill
- asset-inventory-reconciliationSkill
- external-attack-surface-reviewSkill
- shadow-it-discoverySkill
- aws-credential-compromiseSkill
- aws-iam-reviewSkill
- aws-org-guardrailsSkill
- cloudtrail-investigationSkill
- guardduty-triageSkill
- s3-exposure-reviewSkill
- azure-activity-investigationSkill
- azure-rbac-reviewSkill
- conditional-access-reviewSkill
- entra-audit-investigationSkill
- entra-signin-investigationSkill
- backup-assuranceSkill
- critical-service-mappingSkill
- ransomware-recoverySkill
- recovery-exerciseSkill
- cloud-exposure-reviewSkill
- cloud-incident-responseSkill
- cloud-logging-baselineSkill
- cloud-posture-assessmentSkill
- audit-evidence-packageSkill
- continuous-control-monitoringSkill
- control-mappingSkill
- control-testing-samplingSkill
- container-incidentSkill
- dockerfile-hardeningSkill
- image-scanningSkill
- runtime-detection-falcoSkill
- db-audit-loggingSkill
- db-exfiltration-investigationSkill
- db-hardeningSkill
- db-privilege-reviewSkill
- data-classificationSkill
- data-discoverySkill
- The first 60 shown.
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
- Distinctive: line 52
Prefer structural fixes (tiering, delegated admin redesign) over one-off ACE removals that regrow.
≈ “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.
Files
AD Attack Path Analysis (Defensive BloodHound)
Collection (authorized, coordinated with the SOC)
SharpHound.exe -c All,GPOLocalGroup --outputdirectory C:\bh --zipfilename collection.zipSharpHound/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
| Edge | Meaning | Typical fix |
| MemberOf → Tier 0 | Direct privilege | Remove; use JIT/PIM |
| GenericAll / GenericWrite / WriteDacl / WriteOwner / Owns | Full or ACL control over object | Remove ACE; review delegated admin model |
| AddMember / AddSelf | Can add to group | Remove ACE |
| ForceChangePassword | Reset another user's password | Restrict to helpdesk tier for non-admin users only |
| HasSession / AdminTo | Credential exposure from privileged logons on lower-tier hosts | Enforce tiering, PAWs, logon restrictions |
| AllowedToDelegate / AllowedToAct / unconstrained | Delegation abuse | Remove delegation, mark admins sensitive |
| GetChanges + GetChangesAll | DCSync | Only DCs/Entra Connect (scoped) |
| ADCSESC1…ESC13 | Certificate template/CA abuse | See adcs-security-review |
| GPLink / GenericWrite on GPO | Code execution on linked OUs | Restrict 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
- 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.
- Prefer structural fixes (tiering, delegated admin redesign) over one-off ACE removals that regrow.
- 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
- BloodHound CE docs: https://bloodhound.specterops.io/
- Microsoft Enterprise access model: https://learn.microsoft.com/en-us/security/privileged-access-workstations/privileged-access-access-model
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
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.

