Skip to content

BloodHound Enterprise Executor

Category: Identity and Access Script: bloodhound_enterprise.py Integration: REST API Faraday Plugin: Raw JSON Website: https://specterops.io/bloodhound-enterprise/

Description

Imports the asset-group inventory and Active Directory/Azure AD attack-path findings from BloodHound Enterprise into Faraday. Use it to check whether hosts and accounts flagged by other tools also sit on a path to a Tier Zero (high-value) asset.

Prerequisites

  • A BloodHound Enterprise tenant
  • An API token pair (token ID and key), created in the console under Administration > API Tokens
  • requests available in the agent's Python environment

Configuration

Environment Variables (Setup)

Variable Required Description
BHE_HOST Yes BloodHound Enterprise tenant host (e.g., bhe.mycorp.com). https:// is added if missing.
BHE_TOKEN_ID Yes BloodHound Enterprise API token ID, created in the console under Administration > API Tokens
BHE_TOKEN_KEY Yes Secret key paired with the token ID

These variables are also accepted as execution arguments, so a single run can override them.

Execution Arguments

Parameter Type Mandatory Description
BHE_DOMAIN_FQDN string No Import only the attack paths of one Active Directory domain (FQDN, e.g. corp.mycorp.com) or Azure tenant ID. Default: all domains.
BHE_ATTACK_PATH_TYPE string No Import only one attack-path finding type (its BHE slug, e.g. T0AddAllowedToAct, T0ESC1, LargeDefaultGroups). Default: all types.

YAML Configuration Example

executors:
  bloodhound_enterprise:
    repo_executor: bloodhound_enterprise.py
    max_size: 65536
    varenvs:
      BHE_HOST: "https://bhe.mycorp.com"
      BHE_TOKEN_ID: "<bhe_token_id>"
      BHE_TOKEN_KEY: "<bhe_token_key>"
    params:
      BHE_DOMAIN_FQDN:
        mandatory: false
        type: string
        base: string
      BHE_ATTACK_PATH_TYPE:
        mandatory: false
        type: string
        base: string

How It Works

  1. Signs every request with the SpecterOps HMAC scheme (BHE_TOKEN_ID + BHE_TOKEN_KEY, hour-bound signature)
  2. Reads the asset-group inventory from GET /api/v2/asset-groups (Tier Zero, Owned and other operator-defined groups), 100 per page
  3. Reads the attack-path findings from GET /api/v2/attack-paths/findings, 100 per page, optionally scoped to BHE_DOMAIN_FQDN and BHE_ATTACK_PATH_TYPE
  4. Creates one host per asset group (always info severity) and one host per attack-path finding, both on the synthetic IP 0.0.0.0 since BHE data is graph-based rather than network-based
  5. Maps each finding's severity (low/moderate/high/critical) to Faraday's scale, and adds the finding type, principals involved and domain as references

Notes

  • BHE data describes the identity attack graph, not IP-based assets. Use it to check whether a host or account flagged by another tool also sits on a known privilege-escalation path.
  • By default the executor reads at most 500 asset groups and 500 findings per run. Raise BHE_PAGES for larger tenants.
  • BHE_HOST can be given with or without https://. Without it, https:// is assumed.
  • The run stops if authentication is rejected (HTTP 401). If BHE rate-limits or denies a later request, the executor keeps what it has already read.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor.