BloodHound
BloodHound turns flat Active Directory enumeration into a graph of relationships: nodes (users,
groups, computers, OUs, GPOs, domains) joined by edges that represent permissions and relationships
(MemberOf, AdminTo, HasSession, GenericAll, AddKeyCredentialLink, Owns…). Over that graph,
one query answers what’s unmanageable by hand: what is the shortest path from the account I control
to Domain Admin. It turns tens of thousands of scattered ACLs into a concrete attack path. It
exploits nothing: it reveals what’s already misconfigured.
flowchart LR
U["jdoe (controlled)"] -->|MemberOf| G[IT Support]
G -->|GenericWrite| S["svc-backup"]
S -->|MemberOf| B[Backup Operators]
B -->|DCSync| D["corp.local"]
Threat model
Section titled “Threat model”What BloodHound exploits isn’t a bug, it’s accumulated complexity. A real AD has tens of thousands of delegated permissions, nested groups and active sessions that nobody audits together. Individually harmless relationships, chained, form a path to DA that the defense doesn’t see because it never looks at it as a graph. The attacker does. For the Blue Team, the same graph is the tool to find and cut those paths first.
Anatomy
Section titled “Anatomy”The two pieces
Section titled “The two pieces”- Collector: walks the domain over LDAP, SMB and sessions, and produces JSON files. On Windows,
SharpHound; from Linux, bloodhound.py (
bloodhound-ce-pythonfor the Community edition). - Interface: loads the JSON into a Neo4j database and lets you query and visualize paths.
The editions
Section titled “The editions”- BloodHound Community Edition (CE): the current version, web, deployed with containers. It’s the
living line (v8 introduced OpenGraph, which ingests data beyond AD/Entra; releases ship
frequently). Its collector is SharpHound CE or
bloodhound-ce-python. - BloodHound legacy (the Electron app) still works but is no longer developed. The edges and logic are equivalent; the JSON format differs, so collector and interface must be the same line.
What collection methods are
Section titled “What collection methods are”SharpHound doesn’t collect everything at once. The methods decide what it queries and how much noise it makes:
- DCOnly: only asks the DC over LDAP. Quiet, doesn’t touch the hosts. Doesn’t see sessions or local admins, but does see all ACLs, groups and delegations.
- Session / LoggedOn: asks each host who is logged in. Essential for
HasSessionpaths, but touches the whole network (noisy). - LocalAdmin / RDP / DCOM: local admins and remote access rights per host.
- All: nearly all of the above.
Red Team
Section titled “Red Team”Collection from Linux (CE)
Section titled “Collection from Linux (CE)”bloodhound-ce-python -c All -u jdoe -p 'Passw0rd!' -d corp.local -ns 10.10.10.10 --zip# quiet: only the DC, without touching hostsbloodhound-ce-python -c DCOnly -u jdoe -p 'Passw0rd!' -d corp.local -ns 10.10.10.10 --zip# with Kerberosbloodhound-ce-python -c All -u jdoe -k -no-pass -d corp.local -ns 10.10.10.10 --zipCollection from Windows (SharpHound CE)
Section titled “Collection from Windows (SharpHound CE)”SharpHound.exe -c AllSharpHound.exe -c DCOnly --outputdirectory C:\Windows\TempNetExec also launches collection and uploads the result:
nxc ldap dc01.corp.local -u jdoe -p 'Passw0rd!' --bloodhound -c All --dns-server 10.10.10.10Load and query
Section titled “Load and query”Deploy BloodHound CE with bloodhound-cli (requires Docker), log in at
http://localhost:8080/ui/login with user admin and the password the installer prints (recoverable
with bloodhound-cli resetpwd), and upload the ZIP. Then:
- Mark your account as Owned.
- Use the prebuilt queries and, above all, Shortest paths to Domain Admins and Shortest paths from Owned principals.
- The Query Library (over 170 queries in v8) covers delegations, ACLs, Kerberoasting, Tier 0 paths.
Reading the graph
Section titled “Reading the graph”Each edge is a technique from another card. The most common:
| Edge | What it means | Where it leads |
|---|---|---|
GenericAll / GenericWrite |
Object control | ACL abuse |
AddKeyCredentialLink |
Write msDS-KeyCredentialLink |
Shadow Credentials |
ForceChangePassword |
Reset password | ACL abuse |
AllowedToDelegate / AllowedToAct |
Delegation | Delegation |
HasSession |
Active user session | Lateral movement |
DCSync |
Secret replication | Credential dumping |
Investigator workflow
Section titled “Investigator workflow”- DCOnly collection first (quiet): it already reveals nearly all ACL and delegation paths.
- If you need session paths, scoped Session collection on the hosts that matter.
- Mark your account as Owned and ask for the shortest path to DA.
- Each edge of the path → the card for the matching technique.
- Run the path step by step, verifying at each hop.
- SharpHound CE (Windows) / bloodhound-ce-python (Linux): collectors.
- bloodhound-cli: deploying the CE interface.
- NetExec: built-in collection (
--bloodhound). - AzureHound: equivalent for Entra ID.
Impact
Section titled “Impact”BloodHound doesn’t grant access on its own: it gives the map. Its value is turning enumeration that looks harmless into an exact path to Domain Admin, and prioritizing where to attack.
Blue Team
Section titled “Blue Team”Detection
Section titled “Detection”- Collection: a single source making massive LDAP queries to the DC (thousands of objects and ACL attributes at once), and, in Session mode, SMB connections across the fleet from one host in a short time.
- Spikes of queries to
ntSecurityDescriptor,member,msDS-AllowedToActOnBehalfOfOtherIdentity. - Honeytokens: decoy accounts with attractive paths; if someone walks them, collection is active.
Telemetry and sources
Section titled “Telemetry and sources”- Auditing of costly/inefficient LDAP queries on the DCs.
- Events 4624/4625 across the fleet correlated (a wave of network logons from one host).
- Identity detection tools (ITDR) that flag SharpHound-style collection.
Hardening
Section titled “Hardening”- Shrink the graph: the defensive goal is that no short path to DA exists. Review periodically with BloodHound itself (or BloodHound Enterprise) and cut edges: remove excess delegated permissions, reduce local admins, clean nested groups.
- Tiering: separate accounts and hosts by level (Tier 0 = DCs and domain controllers) so no path crosses from an ordinary workstation to Tier 0.
- Watch and limit who can read ACLs and sessions in bulk.
Response
Section titled “Response”If you detect collection, isolating the host isn’t enough: assume the attacker already has the map. Prioritize closing the short paths to DA that graph would have revealed and rotate the credentials of the accounts that appeared in them.
CVEs and real cases
Section titled “CVEs and real cases”- BloodHound isn’t a vulnerability: it’s a path-analysis tool (MITRE T1482, T1087.002). Used equally by attackers and defenders.
- It’s the de facto standard for mapping AD in internal tests and real operations. Its adoption changed how AD is attacked: from hunting a specific flaw to following the shortest path the graph already draws.
Test checklist
Section titled “Test checklist”- DCOnly collection done and loaded.
- Initial account marked as Owned.
- Shortest path to Domain Admins computed.
- Each edge of the path identified with its technique.
- Delegation, ACL, Shadow Credentials paths in the graph?
- Session collection only where it helps and scoped.
- Blue: massive LDAP queries detected? Any short path to DA to close?