Setup Bloodhound legacy on Ubuntu 24.04
About this configuration
While setting up a minimal Ubuntu 24.04 VM for penetration testing, I realized there wasn’t a clear guide available for installing the BloodHound Legacy version on this specific system. To make things easier for others, I’ve created this blog post with detailed, step-by-step instructions.
Installing Java JDK
- Install Java JDK with the following command:
sudo apt install openjdk-11-jdk
- If you have multiple versions of Java installed, select Java 11 using:
sudo update-alternatives --config java
- Verify that Java 11 is active:
java --version
Installing Neo4j
Note: BloodHound Legacy works best with Neo4j version 4.*, specifically 4.4.9.
- Download and install Neo4j’s
cypher-shellusing the following command:
wget https://dist.neo4j.org/cypher-shell/cypher-shell_4.4.9_all.deb -O /tmp/cyphershell.deb && sudo dpkg -i /tmp/cyphershell.deb
- Install Neo4j: (you might need to do
sudo apt install daemonfirst on Kali atleast)
wget https://dist.neo4j.org/deb/neo4j_4.4.9_all.deb -O /tmp/neo4j.deb && sudo dpkg -i /tmp/neo4j.deb
- Start Neo4j:
sudo neo4j start
- Navigate to the specified localhost address to set up Neo4j. You will be prompted to change the default password.
Common Issue:
- If you encounter a permission issue when starting Neo4j, make sure to use
sudowhen running the command.
Installing BloodHound Legacy
After installing Neo4j and its dependencies, proceed to install BloodHound Legacy:
- Download and unzip the latest BloodHound release:
wget https://github.com/BloodHoundAD/BloodHound/releases/download/v4.3.1/BloodHound-linux-x64.zip && unzip BloodHound-linux-x64.zip
- Navigate to the BloodHound directory and run the following command:
/opt/Bloodhound/BloodHound --no-sandbox
Common Issue:
- If BloodHound doesn’t execute, try running it with
sudoand ensure you include the--no-sandboxflag.
Start BloodHound with a One-Liner
For convenience, you can add an alias to your .bashrc file to start BloodHound and Neo4j together:
echo "alias start-bloodhound='pgrep -x java >/dev/null && /opt/Bloodhound/BloodHound --no-sandbox || (sudo neo4j start && sleep 3 && /opt/Bloodhound/BloodHound --no-sandbox)'" >> ~/.bashrc
Note: Replace /opt/Bloodhound/BloodHound with the actual path to your BloodHound binary.