BloodHound Guide: Mapping Active Directory Relationships
Learn how to use BloodHound and SharpHound for Active Directory reconnaissance, attack path analysis, privilege escalation detection, and security assessment.
Introduction to BloodHound
BloodHound is an open-source tool that uses graph theory to reveal hidden relationships within Active Directory environments. Developed by SpecterOps, BloodHound maps AD objects as nodes in a graph database and identifies attack paths by analyzing edges between them. It visualizes AD relationships in ways impossible with traditional enumeration tools.
Prerequisites
How BloodHound Works
BloodHound (UI + Analysis): The graphical interface running on Kali Linux, connected to a Neo4j graph database.
SharpHound (Data Collector): Runs on a domain-joined system, gathering data via LDAP queries, local admin checks, session enumeration, and ACL analysis.
Setting Up BloodHound
# Install Neo4j and BloodHound on Kali
sudo apt install neo4j bloodhound -y
sudo systemctl start neo4j
# Navigate to http://localhost:7474 and set neo4j:neo4j password
Running SharpHound
# PowerShell collection
Import-Module .\SharpHound.ps1
Invoke-BloodHound -CollectionMethod All -Domain corp.local
# Compiled executable
.\SharpHound.exe --CollectionMethods All --Domain corp.local
Key BloodHound Queries
Find Shortest Paths to Domain Admins: Maps the most efficient route from current compromise to Domain Admin.
Find Kerberoastable Accounts: Lists accounts with SPNs vulnerable to Kerberoasting.
Find Computers where Domain Users have Local Admin: Identifies shadow admin misconfigurations.
Find AS-REP Roastable Users: Users without Kerberos pre-authentication.
Advanced Analysis
BloodHound edges represent privilege escalation opportunities:
ACL edges reveal subtle privilege escalations like GenericAll and WriteDacl that allow adding users to privileged groups.
Common Mistakes
Best Practices
Related Tools
Related Articles
Summary
BloodHound reveals AD attack paths by mapping relationships as graph data. Used offensively, it identifies the most efficient route to privilege escalation. Used defensively, it helps organizations find and fix security gaps before attackers exploit them.
Related SMB Tool Recommendations
Knowledge Check
Frequently Asked Questions
Continue Learning
Domain Enumeration: Active Directory Reconnaissance Techniques
Comprehensive guide to Active Directory enumeration using native tools, PowerShell, and specialized utilities for discovering users, groups, computers, and trust relationships.
Active Directory · AdvancedGolden Ticket Attacks: Kerberos Ticket Forging Explained
Deep technical analysis of golden ticket attacks against Kerberos authentication, including how forged TGTs work, creation techniques, detection methods, and prevention strategies.
Active Directory · AdvancedPass-the-Hash: Understanding NTLM Authentication Attacks
An in-depth look at pass-the-hash attacks against NTLM authentication, how they work, real-world exploitation scenarios, detection techniques, and defense strategies.
Active Directory · AdvancedActive Directory Fundamentals: Windows Network Domains
A comprehensive introduction to Microsoft Active Directory covering domain services, LDAP, Group Policy, authentication protocols, and security fundamentals for Windows enterprise environments.
Related Security Tools
Enum4linux
Learn how to use Enum4linux to enumerate Windows and Samba systems over SMB: install it on Kali Linux, run your first scan, read the users, shares, groups and password policy it returns, and switch to enum4linux-ng for modern hosts that block null sessions.
Information GatheringSMBClient
Learn how to use SMBClient on Kali Linux: install Samba's FTP-like SMB/CIFS client, list shares, connect as a guest or with credentials, browse folders, and upload or download files on Windows, Samba, or NAS devices. For authorized assessments, check ports 139/445 with Nmap before testing share permissions.
Post ExploitationCrackMapExec
CrackMapExec (CME) is a post-exploitation tool for pentesting Windows and Active Directory networks. It can enumerate users, spray passwords, execute commands, and move laterally.
Information Gatheringldapsearch
ldapsearch is a shell-accessible interface to the ldap_search_ext library function, designed to open active queries against corporate Active Directory database frameworks.