Lesson 11 of 13 · 15m
BloodHound: Reading the Graph Attackers Walk
SharpHound collection, the edge model, and running the shortest-path queries that surface every chain in this course.
BloodHound exists because the ACL graph is too big to eyeball. Released by SpecterOps at DEF CON 24 in 2016 (Rohan Vazarkar, Will Schroeder, Andy Robbins), it ingests AD data into a Neo4j graph where nodes are users/computers/groups/OUs/GPOs and edges are rights — MemberOf, GenericAll, WriteDACL, AdminTo, HasSession, CanRDP, AllowedToDelegate, AllowedToAct. Then it answers the question defenders couldn't ask before: "from this phished user, is there a path to Domain Admins?" The answer is usually yes.
What the collector actually gathers
SharpHound.exe -c All (or bloodhound-python) walks LDAP and RPC:
- Object ACLs — the
WriteDACL/GenericAll/ExtendedRightedges from the ACL lesson. This is the bulk of the graph. - Sessions —
NetSessionEnumon every reachable host: who is logged in where.HasSessionedges turn "DA logged into workstation-417" into a documented path. - Local admins —
AdminTovia SAMR/LSA enumeration per host. - Delegation —
AllowedToDelegate,AllowedToAct,TrustedForDelegationattributes. - GPO links — which GPOs apply to which OUs, feeding
GpLink/AppliedTopaths for GPO-edit abuse.
The wrong mental model: "BloodHound finds misconfigurations." It finds paths. Every edge is a legitimate config; the composition is the attack. A HasSession edge is fresh only as long as the session lasts — sessions expire, and path analysis is a snapshot, not a promise.
The queries that matter
The built-in queries are the course in GUI form: "Shortest paths to Domain Admins," "Find Kerberoastable users," "Find computers with unconstrained delegation," "Shortest paths from owned principals." Two Cypher patterns do most custom work:
MATCH p=shortestPath((u:User {name:"JDoe@CORP.LOCAL"})-[*1..]->(g:Group {name:"DOMAIN ADMINS@CORP.LOCAL"})) RETURN p
MATCH (c:Computer) WHERE c.unconstraineddelegation=true RETURN c.nameBloodHound CE (the 2023 rewrite) added edge metadata — composition graphs showing exactly which ACL grants build each path — and a rewritten SharpHound collector — still C#; the Go collector is AzureHound, which extends the same model into Entra ID. That matters because hybrid estates carry hybrid paths — an on-prem GenericAll chain can end at a synced account with cloud roles.
Reading results like an attacker
A path ending in MemberOf → Domain Admins is obvious. The paths that matter combine: JDoe -[WriteDACL]-> HelpdeskGroup -[GenericAll]-> svc-backup -[MemberOf]-> Backup Operators. Every hop is a separate finding with a separate owner and a separate fix. Fix the cheapest edge first — usually the WriteDACL nobody remembered granting — and the path collapses.
HasSession edges deserve special attention: they change hourly. A path through a session edge means "exploitable right now because DA is logged into a reachable host." Chasing those before the session ends is what defenders do with BloodHound in incident mode.
The defender's workflow
- Collect weekly (SharpHound scheduled task, encrypted output — the JSON is a map of your whole estate; treat it as sensitive).
- Diff path counts week over week: new
DCSync-right principals, new unconstrained hosts, new paths to DA are the changes that matter. - Run the attacker's queries on yourself first: kerberoastable non-gMSA accounts, roastable
DONT_REQ_PREAUTHusers,DCSyncER holders outside DA/DC, shortest paths from your most-phishable departments. - Fix edges, not nodes: remove the ACE, unscope the GPO, clear the delegation bit. The graph is documentation of your misconfigurations; the fix list is the backlog.
BloodHound is also how attackers validate their work — find the same paths before they do, because they run it too. One operational note: SharpHound is loud. Full LDAP enumeration plus NetSessionEnum against every host generates exactly the telemetry patterns covered in the detection lesson — 1644 expensive-search bursts and session-enumeration RPCs. Attackers running it inside your estate leave fingerprints in the same logs you should be watching; defenders running it should expect the same noise and schedule it accordingly. bloodhound-python gives the same ingest over plain LDAP from outside, slightly quieter, still enumerable.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
A Password-Free Path to Root: Inside the macOS Screen Sharing Vulnerability Now Under Attack
A logic bug in screensharingd let attackers skip authentication entirely and land as root — no password required. Here's how it was found, patched, reverse-engineered, and finally weaponized.
CVE-2026-31431 "Copy Fail": How a 9-Year-Old Linux Kernel Bug Gives Any Local User Root in 732 Bytes
CVE-2026-31431 chains AF_ALG, splice(), and authencesn's ESN scratch write into a deterministic 4-byte page cache write that gives an unprivileged local user root. Full technical breakdown, exploit mechanics, detection, mitigation, and patch status per distro.
BlueHammer: The Unpatched Windows Zero-Day That Weaponizes Microsoft Defender Against Your Own System
BlueHammer is an unpatched, publicly released Windows local privilege escalation exploit that chains Microsoft Defender's update workflow, Volume Shadow Copy, Cloud Files callbacks, and opportunistic locks to reach NT AUTHORITY\SYSTEM from a standard user account.
What is Privilege Escalation? How Attackers Go From Foothold to Full Control
An attacker starts with a low-privileged shell or user account and escalates to root or Administrator using misconfigurations, SUID binaries, kernel exploits, and Active Directory attacks. Here's every technique, the tools professionals use, and how to harden against it.