This tutorial teaches BloodHound, a free open-source tool that uses graph theory to map Active Directory relationships and identify the shortest attack path from any user to Domain Admin, typically within 3–5 relationship hops. The article covers installation, data collection with SharpHound or bloodhound-python, querying built-in BloodHound analyses, interpreting attack path graphs, and translating findings into penetration test reports. BloodHound transforms manual AD security analysis that would take experienced testers days into a process that takes minutes, revealing dangerous permission chains that accumulate undetected over years.
- Graph theory identifies shortest AD attack pathsBloodHound represents an Active Directory environment as a mathematical graph where nodes are AD objects (users, groups, computers, GPOs, domains) and edges are relationships (MemberOf, AdminTo, HasSession, GenericAll, etc.). It applies Dijkstra's shortest path algorithm to find the minimum number of relationship-hops needed between any source and target node. The article demonstrates that in real enterprise environments, Domain Admin is almost never more than 3–5 relationships away from any standard user, not necessarily due to poor security but because AD environments accumulate permission c
- SharpHound collects AD relationship data via LDAP, SMB, RPCSharpHound is the data collection engine that runs on a Windows machine with domain user credentials and queries LDAP, SMB, and RPC to enumerate AD relationships, outputting multiple JSON files covering users, groups, computers, GPOs, domains, and OUs. The article provides command examples including standard collection (SharpHound.exe -c All), stealth collection avoiding direct computer enumeration (SharpHound.exe -c DCOnly), and loop collection for session data (SharpHound.exe -c Session --Loop --LoopDuration 02:00:00). bloodhound-python is a Python port that runs directly from Kali Linux usi
- Each BloodHound edge type maps to a specific exploitation techniqueUnderstanding edge types is essential for converting a BloodHound graph into an execution plan. The article maps: AdminTo (local admin on computer → dump credentials with Mimikatz/secretsdump), HasSession (user logged onto computer → steal credentials from LSASS if you have admin), MemberOf (group membership → inherit all group rights), GenericAll (full control over object → reset password, add to groups, modify ACLs), DCSync (replicate DC → dump all domain password hashes), WriteDacl (modify ACL → grant yourself GenericAll), and ForceChangePassword (reset user password → authenticate without
- BloodHound CE Docker deployment simplifies installationBloodHound CE is the current actively maintained version with a modern web-based interface running via Docker, while BloodHound Legacy is the older Electron desktop app no longer actively developed. The article provides Docker installation via a single command (curl -L https://ghst.ly/getbhce | docker compose -f - up), which starts Neo4j, PostgreSQL, and the BloodHound web interface at http://localhost:8080. For legacy installations on Kali, the article shows manual Neo4j and BloodHound setup with password configuration at http://localhost:7474.
- Built-in queries prioritize highest-value attack path patternsBloodHound includes pre-built queries using Cypher query language against the Neo4j database, eliminating the need to write custom queries. Key queries covered: Find Shortest Paths to Domain Admins (primary attack path query), Find Principals with DCSync Rights (password replication capability), Find All Domain Admins (full list), List All Kerberoastable Accounts (offline hash cracking targets), Find AS-REP Roastable Users (pre-auth not required), Find Computers with Unconstrained Delegation (high-value targets), and Find Computers where Domain Users are Local Admin (lateral movement starting
- Mark as Owned reveals paths from compromised accountsAfter compromising any account during a penetration test, marking it as Owned in BloodHound's interface (right-click node > Mark as Owned) then running the Shortest Path from Owned Principals query immediately shows all paths from that account to Domain Admin. The article emphasizes this is the operational intelligence layer that makes AD pentesting structured and efficient, allowing pentesters to focus their next steps precisely based on newly compromised credentials.
- BloodHound graphs translate into impactful pentest reportsThe article advises that for each attack path in a penetration test report, include: the exported BloodHound graph image, a numbered step-by-step breakdown of each node and edge, the specific technique used to traverse each edge with tool names, the starting account and what level of initial access it represents, and remediation recommendations specific to each node in the path (not generic advice). The article notes that client stakeholders who have never touched a command line immediately understand a graph showing a standard helpdesk user reaching Domain Admin in four steps, making the visu
- Standard domain user credentials enable comprehensive data collectionBloodHound does not require Domain Admin credentials to operate—standard domain user credentials collect most relationship data including group memberships, ACLs, and AD object relationships. While some collection methods require local admin on target machines for session data collection, the core attack path analysis including Shortest Path to Domain Admin works with any domain user account, making BloodHound effective even with minimal initial access.
Bottom line: BloodHound is transformative for Active Directory penetration testing because it uses graph theory to automatically identify the shortest attack path from any compromised user to Domain Admin within minutes, surfacing dangerous permission chains that years of manual review would miss—and these paths are almost never more than 3–5 relationships away in real enterprises. The complete workflow—collecting AD data with SharpHound or bloodhound-python, ingesting into BloodHound CE via Docker, running
Part of the 100-Day Ethical Hacking Course
🎯 What You’ll Master in Day 27
⏱️ 60 min read · 3 hands-on exercises
📊 Where are you with BloodHound?
📋 What You’ll Master — BloodHound Tutorial Active Directory 2026
- What Is BloodHound and How Graph Theory Maps AD Attack Paths
- Installing BloodHound CE and Neo4j on Kali Linux 2026
- Running SharpHound — Collecting Active Directory Relationship Data
- BloodHound Queries — Finding Shortest Path to Domain Admin
- Reading BloodHound Graphs — Every Edge Type Explained
- Turning BloodHound Attack Paths Into Pentest Report Findings
In Day 26 you used Pass the Hash and Pass the Ticket to move laterally between machines — powerful techniques, but applied reactively. BloodHound changes the approach entirely: it shows you proactively which accounts, machines, and relationships form the optimal attack path before you execute a single technique. Combined with the 100-Day Ethical Hacking Course content on AD enumeration from Days 23–26, BloodHound becomes the analytical layer that makes everything else strategic.
What Is BloodHound and How Graph Theory Maps AD Attack Paths
BloodHound represents an Active Directory environment as a mathematical graph — nodes are AD objects (users, groups, computers, GPOs, domains) and edges are relationships between them (MemberOf, AdminTo, HasSession, GenericAll, etc.). Once the graph is built from real AD data, BloodHound applies Dijkstra’s shortest path algorithm to find the minimum number of relationship-hops needed to get from any source node to any target node.
The profound insight is that Domain Admin is almost never more than 3–5 relationships away from any standard user in a real enterprise environment. Not because of poor security necessarily — but because AD environments accumulate permission complexity over years. Group memberships from old projects, local admin rights granted for troubleshooting and never revoked, delegation configurations set up for legacy applications — they create paths that nobody documented and that manual review would never surface.
⏱️ Time: 10 minutes · No tools required
USER: jsmith
– MemberOf: IT_Helpdesk group
– HasSession on: DESKTOP-01 (jsmith is currently logged on)
GROUP: IT_Helpdesk
– AdminTo: all computers in OU=Workstations
COMPUTER: DESKTOP-01
– HasSession: svc_sqlbackup (service account logged on)
USER: svc_sqlbackup
– MemberOf: DB_Admins group
GROUP: DB_Admins
– GenericAll rights over: Domain Admins group
Now answer these questions:
1. Trace the full attack path from jsmith to Domain Admin.
Write each step as: [Source] —[Relationship]→ [Target]
2. What technique from Day 26 do you use at the HasSession edge?
(Hint: svc_sqlbackup is logged on to a machine where you are admin)
3. At the GenericAll edge on Domain Admins group, what can
you do to escalate to Domain Admin?
4. If you remove jsmith’s MemberOf IT_Helpdesk, does this
break the attack path? What is the minimum change required
to fully eliminate it?
📸 Draw your traced attack path and share in your notes.
Installing BloodHound CE and Neo4j on Kali Linux 2026
Running SharpHound — Collecting Active Directory Relationship Data
SharpHound is the data collection engine. It runs on a Windows machine with domain user credentials and queries LDAP, SMB, and RPC to enumerate AD relationships. The output is a ZIP file containing multiple JSON files covering users, groups, computers, GPOs, domains, and OUs.
BloodHound Queries — Finding Shortest Path to Domain Admin
BloodHound’s pre-built queries are the fastest way to identify the highest-value attack paths in an ingested dataset. These queries run against the Neo4j graph database using Cypher query language. You do not need to write Cypher yourself — the built-in queries cover the most important attack path patterns out of the box.
⏱️ Time: 35 minutes · Free TryHackMe account required
or “Attacking Active Directory” (both include BloodHound tasks)
Step 2: Deploy the machine and connect via TryHackMe VPN or AttackBox
Step 3: The room provides domain user credentials — use them to run
bloodhound-python from your Kali AttackBox:
bloodhound-python -u [USER] -p [PASS] -d [DOMAIN] -c All –zip
Step 4: Transfer the ZIP to your BloodHound installation
Step 5: Upload the ZIP via BloodHound’s Upload Data button
Step 6: Once ingested, run the query:
“Find Shortest Paths to Domain Admins”
Step 7: For each attack path found, document:
— Number of hops
— Relationship types (edges) in the path
— Starting node (source user/computer)
— Technique to traverse each edge
Step 8: Mark the starting account as Owned (right-click > Mark as Owned)
Run: “Shortest Path from Owned Principals”
Does it show a different/shorter path?
📸 Screenshot your BloodHound graph showing the Shortest Path to Domain Admin and share in your notes.
Reading BloodHound Graphs — Every Edge Type Explained
Every edge in a BloodHound graph represents a relationship that has a corresponding exploitation technique. Understanding what technique each edge maps to is the skill that transforms a BloodHound graph from a diagram into an execution plan.
⏱️ Time: 20 minutes · Kali Linux with Docker installed
📸 Screenshot the BloodHound CE web interface loaded at localhost:8080 and share in your notes
Turning BloodHound Attack Paths Into Pentest Report Findings
A BloodHound attack path graph is one of the most impactful visuals you can include in a penetration test report. Client stakeholders who have never touched a command line immediately understand a graph showing “your standard helpdesk user can reach Domain Admin in four steps.” The challenge is contextualising the graph with enough technical detail that the remediation team can act on it.
For each attack path in your report, include: the exported BloodHound graph image, a numbered step-by-step breakdown of each node and edge in the path, the specific technique used to traverse each edge (with tool names), the account you started with and what level of initial access it represents, and a remediation recommendation specific to each node in the path (not generic “fix permissions”).
🧠 QUICK CHECK — Day 27
📋 Commands Used Today — Day 27 Reference Card
🏆 Mark Day 27 as Complete
You now have the most powerful Active Directory attack path visualisation tool in your arsenal. BloodHound turns weeks of manual AD analysis into minutes — and makes your pentest reports more impactful than any other tool in this course.
❓ Frequently Asked Questions
What is BloodHound and what does it do?
What is SharpHound and how is it different from BloodHound?
What is the difference between BloodHound CE and BloodHound Legacy?
What AD relationships does BloodHound map?
Do I need Domain Admin credentials to run BloodHound?
What comes after BloodHound in this course?
Day 26: Pass the Hash & Pass the Ticket
Day 28: Lateral Movement Techniques
📚 Further Reading
- Pass the Hash & Pass the Ticket 2026 — Day 26 covers the lateral movement techniques that traverse the AdminTo and HasSession edges BloodHound identifies — the practical execution of today’s attack paths.
- Kerberos Attacks 2026 — Day 25 covers Kerberoasting and AS-REP Roasting — directly applicable to BloodHound’s Kerberoastable and AS-REP Roastable user queries.
- 100-Day Ethical Hacking Course — The full course hub with all Active Directory attack days indexed sequentially from enumeration through domain compromise and post-exploitation.
- BloodHound GitHub Repository — The official BloodHound repository with CE installation docs, SharpHound releases, custom query library, and the complete edge type reference documentation.
- MITRE ATT&CK — Domain Policy Modification — The MITRE framework coverage of the AD privilege escalation and domain persistence techniques that BloodHound attack paths map to in the adversary TTP taxonomy.

