
AI-Powered Active Directory Attack Path Analysis with BloodHound - By Ayi NEDJIMI https://ayinedjimi-consultants.fr
AI-Powered Active Directory Attack Path Analysis
Analyse de chemins d'attaque Active Directory avec Intelligence Artificielle
+---------------------------+
| BloodHound JSON Export |
| (users, groups, ACLs) |
+-------------+-------------+
|
v
+-------------+-------------+
| Graph Analyzer |
| - Parse BH v3/v4 format |
| - Build NetworkX DiGraph |
| - Detect attack paths |
| - Identify Tier 0/1/2 |
+-------------+-------------+
|
+------+------+------+
| | |
v v v
+-------+ +--+------+ +---+--------+
| Risk | | LLM | | Report |
| Scorer | | Advisor| | Generator |
+---+----+ +---+----+ +---+--------+
| | |
v v v
[Scores] [MITRE Map] [HTML/JSON]
| | |
+------+-----+-----+---+
|
v
+--------+---------+
| CLI Interface |
| analyze | paths |
| score | report |
+------------------+
ADBloodHound-AI parses BloodHound JSON exports and uses graph analysis combined with AI (OpenAI GPT) to:
git clone https://github.com/ayinedjimi/ADBloodHound-AI.git
cd ADBloodHound-AI
pip install -e ".[dev]"
# Optional: Set OpenAI API key for AI features
export OPENAI_API_KEY="sk-..."
# Full analysis with HTML report
adbloodhound-ai analyze bloodhound_export.json -d CORP.LOCAL -o report.html
# Find paths from specific user
adbloodhound-ai paths bloodhound_export.json -s "[email protected]"
# Score all nodes and get top 20 risks
adbloodhound-ai score bloodhound_export.json -n 20
# Generate full report with LLM analysis
adbloodhound-ai report bloodhound_export.json -d CORP.LOCAL --llm
[+] Loaded 15423 objects
[+] Graph: 15423 nodes, 47891 edges
[+] Kerberoastable accounts: 23
[+] AS-REP Roastable accounts: 5
[+] DCSync principals: 3
[+] Found 156 attack paths to Domain Admin
[+] Overall domain risk score: 78.5/100
[!] Top 5 riskiest paths:
1. [95.2] SVC_BACKUP -> DOMAIN ADMINS (2 hops)
2. [89.1] HELPDESK1 -> DOMAIN ADMINS (3 hops)
3. [84.7] SVC_SQL -> DOMAIN ADMINS (2 hops)
4. [76.3] IT_ADMIN2 -> ENTERPRISE ADMINS (4 hops)
5. [71.8] WS042.CORP.LOCAL -> DOMAIN ADMINS (5 hops)
ADBloodHound-AI analyse les exports JSON de BloodHound et utilise l'analyse de graphes combinee avec l'IA (OpenAI GPT) pour :
git clone https://github.com/ayinedjimi/ADBloodHound-AI.git
cd ADBloodHound-AI
pip install -e ".[dev]"
# Analyse complete avec rapport HTML
adbloodhound-ai analyze export_bloodhound.json -d CORP.LOCAL -o rapport.html
# Trouver les chemins depuis un utilisateur specifique
adbloodhound-ai paths export.json -s "[email protected]"
# Scorer tous les noeuds
adbloodhound-ai score export.json -n 20
# Rapport complet avec analyse LLM
adbloodhound-ai report export.json -d CORP.LOCAL --llm
pytest tests/ -v --cov=adbloodhound_ai
Ayi NEDJIMI - Cybersecurity & AI Consultant
MIT License - see LICENSE
| Technique | MITRE ID | Detection |
|---|
| Kerberoasting | T1558.003 | SPNs on user accounts |
| AS-REP Roasting | T1558.004 | Pre-auth disabled |
| DCSync | T1003.006 | GetChangesAll rights |
| GenericAll abuse | T1078 | Full control ACEs |
| WriteDACL abuse | T1078 | DACL modification rights |
| Shadow Credentials | T1078 | KeyCredentialLink access |