BloodHoundAD / BloodHound

Six Degrees of Domain Admin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for M2 : BloodHound Precompiled binary for Mac M2

Rajchowdhury420 opened this issue · comments

the current prebuilt ARM binary in release page , doesn't work in M2 Macbook Pro
image

I got a way around to get it running on my M2 Macbook Pro

Install nvm first

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
sudo nano .zshrc
# now paste this at end of the file and save the file
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

now refresh the zsh session by typing

zsh

now install the targeted NodeJs version

nvm install 16

nvm use 16

Download the Bloodhound Source code

wget https://github.com/BloodHoundAD/BloodHound/archive/refs/tags/v4.3.1.zip

unzip BloodHound-4.3.1.zip

cd BloodHound-4.3.1

sudo npm ci

sudo npm run build

It would generate an ARM binary of bloodhound

cd ~/BloodHound-4.3.1/BloodHound-darwin-arm64/BloodHound.app/Contents/MacOS

❯ ./BloodHound

That's it BloodHound is up and running in M2 Macbook Pro :D

image

One click Installer Automation for M1/M2/M3 Macs

installer.sh

#!/bin/zsh

# Step 1: Install nvm
echo "Installing nvm..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

# Step 2: Update .zshrc with nvm configurations
echo "Updating .zshrc with nvm configurations..."
echo '\nexport NVM_DIR="$HOME/.nvm"' >> ~/.zshrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.zshrc
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.zshrc

# Inform user to refresh their zsh session manually
echo "Please run 'source ~/.zshrc' to refresh your session, or restart your terminal, then run this script again."
source ~/.zshrc
# Check if NVM is loaded; if not, exit
if [ -z "$NVM_DIR" ]; then
    echo "NVM is not installed or not loaded. Please ensure NVM is properly set up."
    exit 1
fi

# Step 3: Install and use Node.js version 16
echo "Installing Node.js version 16..."
nvm install 16
nvm use 16

# Step 4: Download BloodHound source code
echo "Downloading BloodHound source code..."
wget https://github.com/BloodHoundAD/BloodHound/archive/refs/tags/v4.3.1.zip

# Step 5: Unzip and prepare BloodHound
echo "Preparing BloodHound..."
unzip v4.3.1.zip
cd BloodHound-4.3.1

# Step 6: Build BloodHound
echo "Building BloodHound..."
sudo npm ci
sudo npm run build

# Final instructions
echo "BloodHound has been built. To run it, navigate to:"
echo "~/BloodHound-4.3.1/BloodHound-darwin-arm64/BloodHound.app/Contents/MacOS"
echo "And execute ./BloodHound"
bash installer.sh