Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for M2 : BloodHound Precompiled binary for Mac M2 #707

Open
RajChowdhury240 opened this issue Mar 26, 2024 · 2 comments
Open

Support for M2 : BloodHound Precompiled binary for Mac M2 #707

RajChowdhury240 opened this issue Mar 26, 2024 · 2 comments

Comments

@RajChowdhury240
Copy link

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

@RajChowdhury240
Copy link
Author

RajChowdhury240 commented Mar 27, 2024

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

@RajChowdhury240
Copy link
Author

RajChowdhury240 commented Mar 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant