Bloodhound
Table of Contents
Active Directory attack path mapping tool. Uses graph theory to reveal privilege escalation and lateral movement paths through AD relationships, permissions, and sessions. Requires data collection via SharpHound (Windows) or bloodhound-python (Linux), import into Neo4j, then analysis in the GUI.
Related: Active Directory Post Exploitation Kerberoasting Lateral movement mimikatz Pass-the-Hash
Collection
# Windows — run from domain-joined machine as any domain user .\SharpHound.exe -c All --zipfilename output.zip # Stealthier — DC queries only .\SharpHound.exe -c DCOnly --zipfilename output.zip
# Linux — from attacker machine with valid credentials bloodhound-python -u <user> -p <pass> -ns <DC_IP> -d <domain> -c all
Transfer the resulting zip to your attack machine and import via the BloodHound GUI upload button.
Workflow
- Import zip into BloodHound
- Mark any compromised accounts/machines as Owned (right-click node)
- Run pre-built queries to find paths
- Follow the graph — each edge is an exploitable relationship
- Execute the technique the edge represents, mark next node Owned
- Repeat until Domain Admin
Key Pre-built Queries
| Query | Use |
|---|---|
| Shortest Paths to Domain Admins | Primary path from any owned principal |
| Shortest Paths from Owned Principals | Paths specifically from your foothold |
| Find Kerberoastable Accounts | SPNs set — hash extractable offline |
| Find AS-REP Roastable Users | Preauth disabled — no creds needed |
| Users with DCSync Rights | Can replicate domain credentials |
| Computers where Domain Users are Local Admin | Lateral movement targets |
| Find Shortest Paths to Domain Admins | Re-run after marking each new node owned |
Common Edge Types
| Edge | Meaning | Exploit technique |
|---|---|---|
MemberOf |
Group membership | Inherit group permissions |
AdminTo |
Local admin on machine | PSExec, WMI, lateral movement |
HasSession |
Privileged user has session on machine | Dump creds from that machine |
GenericAll |
Full control over object | Reset password, add to group |
GenericWrite |
Write to object properties | Add SPN → Kerberoast |
ForceChangePassword |
Can reset user's password | Reset and authenticate as user |
WriteDACL |
Modify object ACL | Grant self GenericAll |
DCSync |
Replication rights | Dump all domain hashes |
Useful Cypher Queries
// All users with GenericAll over Domain Admins group
MATCH (u:User)-[r:GenericAll]->(g:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"})
RETURN u.name, g.name
// Owned users with path to DA
MATCH (u:User {owned:true}), (da:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}),
p=shortestPath((u)-[*1..]->(da))
RETURN p
// All kerberoastable users with paths to DA
MATCH (u:User {hasspn:true}),(da:Group {name:"DOMAIN ADMINS@DOMAIN.LOCAL"}),
p=shortestPath((u)-[*1..]->(da))
RETURN p
Tips
- Mark nodes Owned as you progress — Shortest Paths from Owned Principals updates dynamically and reveals next steps
HasSessionedges are time-sensitive — privileged sessions may not be present when you arrive; re-collect if paths disappearGenericWriteon a user → add SPN → Kerberoast is a reliable chain when direct paths to DA are not available- BloodHound CE (Community Edition) is the current version — replaces the legacy Neo4j + separate GUI setup with a single Docker deployment
bloodhound-pythoncollection from Linux does not capture session data as reliably as SharpHound — prefer SharpHound when you have a Windows foothold