$ cat bloodhound.md

BloodHound

Active Directory Attack Path Enumeration Tool

Core Components

BloodHound operates using a two-part system:

  1. The Ingestors (Data Collectors):
    • SharpHound: The primary, modern data collector written in C#. It’s the recommended tool.
    • BloodHound.py: A Python-based ingestor, useful on Linux systems or when attacking from a non-Windows machine.
    • Function: These scripts are executed on a compromised domain-joined host (even with low privileges). They query the AD domain controller via the LDAP protocol and collect vast amounts of data about users, groups, computers, permissions, sessions, and trusts.
  2. The UI (The Analyst):
    • A graphical interface (built on Electron) that ingests the JSON files collected by the ingestor.
    • It builds a graph database (using Neo4j) of all the objects and relationships.
    • The UI allows you to visually query this graph to find complex attack paths.

How It Works:

BloodHound’s power comes from its use of graph theory. Instead of looking at permissions in isolation, it maps the relationships between all objects. It then uses algorithms to find the shortest path from a low-privileged starting point (e.g., a regular user account we’ve compromised) to a high-value target (e.g., the Domain Admins group).

We can right-click on any user or group and select “Find Shortest Paths to High Value Targets” to instantly see all possible privilege escalation routes.

Common Attack Paths It Identifies

BloodHound automatically enumerates and highlights dangerous misconfigurations, including:

Cheatsheet

# 1. Start the BloodHound UI and Neo4j database on our attacking machine (Kali)
sudo neo4j console
bloodhound

# 2. On a compromised Windows host, collect data with SharpHound (e.g., hosted on our SMB server)
# Common collection methods:
SharpHound.exe -c All --zipfilename loot.zip
SharpHound.exe -c Session,LoggedOn,Group,LocalGroup,ACL,ObjectProps,Trusts -d cyberlab.local
SharpHound.exe -c All --LdapUser <User> --LdapPass <Pass> # If you have creds but no shell
SharpHound.exe --CollectionMethod Stealth # Attempt to be quieter

# 3. In the BloodHound UI, upload the generated ZIP file.
# 4. Run built-in queries or manually explore the graph.
# 5. Right-click on high-value targets (marked with a trophy) or your owned users to find paths.

← Back to Resources