MCPcopy Index your code
hub / github.com/dirkjanm/BloodHound.py

github.com/dirkjanm/BloodHound.py @v1.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.1 ↗ · + Follow
337 symbols 904 edges 20 files 95 documented · 28% updated 8mo ago★ 2,41119 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

BloodHound.py

Python 2.7 and 3 compatible PyPI version License: MIT

BloodHound.py is a Python based ingestor for BloodHound, based on Impacket.

This version of BloodHound.py is only compatiable with BloodHound 3.0 or newer.

Limitations

BloodHound.py currently has the following limitations: - Supports most, but not all BloodHound (SharpHound) features (see below for supported collection methods, mainly GPO based methods are missing) - Kerberos authentication support is not yet complete

Installation and usage

You can install the ingestor via pip with pip install bloodhound, or by cloning this repository and running python setup.py install, or with pip install .. BloodHound.py requires impacket, ldap3 and dnspython to function. To use it with python 3.x, use the latest impacket from GitHub.

The installation will add a command line tool bloodhound-python to your PATH.

To use the ingestor, at a minimum you will need credentials of the domain you're logging in to. You will need to specify the -u option with a username of this domain (or username@domain for a user in a trusted domain). If you have your DNS set up properly and the AD domain is in your DNS search list, then BloodHound.py will automatically detect the domain for you. If not, you have to specify it manually with the -d option.

By default BloodHound.py will query LDAP and the individual computers of the domain to enumerate users, computers, groups, trusts, sessions and local admins. If you want to restrict collection, specify the --collectionmethod parameter, which supports the following options (similar to SharpHound): - Default - Performs group membership collection, domain trust collection, local admin collection, and session collection - Group - Performs group membership collection - LocalAdmin - Performs local admin collection - RDP - Performs Remote Desktop Users collection - DCOM - Performs Distributed COM Users collection - PSRemote - Performs Remote Management (PS Remoting) Users collection - DCOnly - Runs all collection methods that can be queried from the DC only, no connection to member hosts/servers needed. This is equal to Group,Acl,Trusts,ObjectProps - Session - Performs session collection - Acl - Performs ACL collection - Trusts - Performs domain trust enumeration - LoggedOn - Performs privileged Session enumeration (requires local admin on the target) - ObjectProps - Performs Object Properties collection for properties such as LastLogon or PwdLastSet - All - Runs all methods above, except LoggedOn

Muliple collectionmethods should be separated by a comma, for example: -c Group,LocalAdmin

You can override some of the automatic detection options, such as the hostname of the primary Domain Controller if you want to use a different Domain Controller with -dc, or specify your own Global Catalog with -gc.

Core symbols most depended-on inside this repo

get_entry_property
called by 65
bloodhound/ad/utils.py
put
called by 25
bloodhound/ad/utils.py
has_priv
called by 19
bloodhound/enumeration/acls.py
build_relation
called by 18
bloodhound/enumeration/acls.py
search
called by 15
bloodhound/ad/domain.py
get
called by 14
bloodhound/ad/utils.py
has_flag
called by 14
bloodhound/enumeration/acls.py
write
called by 12
bloodhound/lib/cstruct.py

Shape

Method 268
Class 56
Function 13

Languages

Python100%

Modules by API surface

bloodhound/lib/cstruct.py180 symbols
bloodhound/enumeration/acls.py36 symbols
bloodhound/ad/domain.py33 symbols
bloodhound/ad/utils.py27 symbols
bloodhound/enumeration/memberships.py13 symbols
bloodhound/ad/computer.py13 symbols
bloodhound/enumeration/objectresolver.py7 symbols
bloodhound/__init__.py7 symbols
bloodhound/enumeration/computers.py5 symbols
bloodhound/ad/trusts.py4 symbols
bloodhound/enumeration/outputworker.py3 symbols
bloodhound/enumeration/domains.py3 symbols

For agents

$ claude mcp add BloodHound.py \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact