CLI for querying BloodHound (Neo4j) data without using the GUI.
Project description
bloodhound-cli
bloodhound-cli is a Python command-line tool designed to query and manage data from a BloodHound legacy database running on Neo4j. It enables you to enumerate ACLs, computers, and users (including filtering by attributes like password not required or password never expires) in an Active Directory environment ingested by BloodHound.
Note that this tool only work for legacy version of bloodhound and not for the Community Edition (CE). If you're looking for SpecterOps' version of bloodhound-cli, which helps users install BloodHound Community Edition, you're in the wrong place. Please head over to: https://github.com/specterOps/bloodHound-cli. Thanks!
Key Features
-
Configuration Management
- Save your Neo4j connection details (host, port, user, and password) to a local configuration file (
~/.bloodhound_config) using thesetsubcommand. - The configuration file is stored with restricted permissions (
chmod 600) to protect your sensitive credentials.
- Save your Neo4j connection details (host, port, user, and password) to a local configuration file (
-
ACL Queries (
aclsubcommand)- Enumerate ACLs related to a single user by specifying
-u/--user. - Enumerate cross-domain ACLs for a domain by specifying
-d/--domain. - Optionally exclude multiple domains with
-bd/--blacklist-domains.
- Enumerate ACLs related to a single user by specifying
-
Computer Queries (
computersubcommand)- Enumerate computers within a specified domain (
-d). - Optionally save results to a file (
-o). - Filter by LAPS status (
--laps True/False).
- Enumerate computers within a specified domain (
-
User Queries (
usersubcommand)- Enumerate users within a specified domain (
-d). - Optionally save results to a file (
-o). - Use mutually exclusive filters to target specific user attributes:
--admin-count: Show only privileged (admin) users.--high-value: Show only high-value users.--password-not-required: Show only users withpasswordnotreqdenabled.--password-never-expires: Show only users withpwdneverexpiresenabled.
- Enumerate users within a specified domain (
-
Secure Credential Storage
- The
setsubcommand saves your Neo4j credentials in a local file (~/.bloodhound_config) which is excluded from source control and has strict file permissions.
- The
Installation
It is recommended to install bloodhound-cli using pipx to ensure it runs in an isolated environment. You can install it from PyPI:
pipx install bloodhound-cli
Alternatively, you can use pip:
pip install bloodhound-cli
Usage
-
Set Neo4j Configuration
Before using any other subcommand, run:bloodhound-cli set --host <neo4j_host> --port <neo4j_port> --db-user <neo4j_user> --db-password <neo4j_password>
This will create/update a configuration file at
~/.bloodhound_config. -
Enumerate ACLs
-
For a single user:
bloodhound-cli acl --user myuser
-
For cross-domain:
bloodhound-cli acl --domain mydomain.local
-
Exclude multiple domains:
bloodhound-cli acl --domain mydomain.local -bd EXCLUDED1 EXCLUDED2
-
-
Enumerate Computers
-
All computers in a domain:
bloodhound-cli computer --domain mydomain.local
-
Filter by LAPS and save results:
bloodhound-cli computer --domain mydomain.local --laps True -o computers_with_laps.txt
-
-
Enumerate Users
-
List all users in a domain:
bloodhound-cli user --domain mydomain.local
-
List privileged (admin) users:
bloodhound-cli user --domain mydomain.local --admin-count
-
List high-value users:
bloodhound-cli user --domain mydomain.local --high-value
-
List users with password not required:
bloodhound-cli user --domain mydomain.local --password-not-required
-
List users with password never expires:
bloodhound-cli user --domain mydomain.local --password-never-expires
-
Save user query results:
bloodhound-cli user --domain mydomain.local --admin-count -o admin_users.txt
-
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bloodhound_cli-0.1.30.tar.gz.
File metadata
- Download URL: bloodhound_cli-0.1.30.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ac960e502f380dfec32efc2eab10a54d35751e3262254f4ce450a76a246b23
|
|
| MD5 |
048172bb68b662e56ee842584ebeeb07
|
|
| BLAKE2b-256 |
220fddb6729c0fe5060437d95b7e0131384c382312a12f6507bfa483a455319e
|
File details
Details for the file bloodhound_cli-0.1.30-py3-none-any.whl.
File metadata
- Download URL: bloodhound_cli-0.1.30-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c341ed53f86bc3fec891dd6086401ee012eb003f846e477ee7e04334d137d40c
|
|
| MD5 |
0fd08f5e66d5d21e59b43d237f269104
|
|
| BLAKE2b-256 |
e203fcfefd1ce004eea858aa8eb98bbdb8f617703e60d75825cbfec7a237165d
|