A lightweight, robust Python utility for seamlessly uploading Bloodhound JSON/ZIP data to a Bloodhound Community Edition (CE) instance.
Author: PaiN05
- Full support for Bloodhound CE's HMAC-SHA256 request signing setup for custom scripts.
- Optional database wipe functionality without needing external tools (
-delete). - Memory-safe chunked upload for large ZIP files.
You can set up a global symlink and configure your credentials via .zshrc exports for easy usage from any directory.
- Clone the repository
git clone https://github.com/jaytiwari05/BHCEupload.git
cd BHCEupload
pip install -r requirements.txt
- Create a symlink to the script:
sudo ln -s $(pwd)/BHCEupload.py /usr/local/bin/BHCEupload.py- Add your Bloodhound credentials to your shell configuration for automatic integration:
echo 'export BH_TOKEN_ID=Your_Token_Id' >> ~/.zshrc
echo 'export BH_TOKEN_KEY=Your_Token_Key' >> ~/.zshrc
source ~/.zshrc- Bonus One-Linear [Aliasr]
bloodhound-ce-python -c All -u <user> <auth> -d <domain> -ns <ip> --zip && BHCEupload.py -dir $(ls -t *_bloodhound.zip | head -n1) -tokenid $BH_TOKEN_ID -tokenkey $BH_TOKEN_KEY -url http://127.0.0.1:8080
You can use the tool globally once the above installation is complete by referencing $BH_TOKEN_ID and $BH_TOKEN_KEY.
Clear the database and upload a file:
BHCEupload.py -tokenid $BH_TOKEN_ID -tokenkey $BH_TOKEN_KEY -dir /path/to/data.zip
Clear the database without uploading any files:
BHCEupload.py -tokenid $BH_TOKEN_ID -tokenkey $BH_TOKEN_KEY -delete
Upload an entire directory to Bloodhound CE:
BHCEupload.py -tokenid $BH_TOKEN_ID -tokenkey $BH_TOKEN_KEY -dir /path/to/results/Note: The default target URL is
http://localhost:8080. If your Bloodhound CE instance is hosted elsewhere, use the-urlflag to specify the correct endpoint.