DEV Community

Bala Paranj
Bala Paranj

Posted on

BloodHound Maps the Attack Paths. Who Proves You've Closed Them?

✓ Human-authored analysis; AI used for formatting and proofreading.

Justin Kohler, Chief Product Officer at SpecterOps, made a statement that should end every least privilege conversation: Seemingly harmless permissions can be chained together to compromise an AWS tenant.

He's right. A permission to reset an account. A permission to push code to a GitHub branch. A trust relationship between an identity provider and a cloud IAM role. Each one passes every per-resource security check. Each one is individually least privilege. The chain is reset account → push code → trigger pipeline → assume IAM role → read production secrets, compromises the tenant.

BloodHound, the tool SpecterOps built, maps these chains. It shows the attacker's view: from this identity, through these relationships, to these objectives. Red teams use it. Penetration testers use it. Offensive security professionals use it to show organizations what an attacker would find.

Who proves the paths have been closed?

The same concept, opposite directions

BloodHound and deterministic configuration verification operate on the same concept. Graph reachability across identity relationships, permissions, and trust chains. The concept is identical: security risk lives in the edges (relationships between resources), not the nodes (individual resources).

But they run the graph in opposite directions for opposite purposes:

BloodHound asks: "From this starting identity, what can I reach?" It takes an entry point such as a compromised credential, a phishing foothold, a CI/CD service account and traverses forward through every trust relationship, permission grant, and resource-based policy to show the blast radius. The output is the attack graph: every objective reachable from that starting point.

Deterministic verification asks: "To this sensitive resource, can any identity reach it?" It takes the crown jewels such as production databases, Secrets Manager secrets, KMS keys, customer data and traverses backward (or exhaustively) to prove whether any path exists from any identity to those resources. The output is a proof: reachable or not reachable, with the specific path if reachable.

Both operations are graph traversals. Both analyze the same configuration data such as IAM policies, trust relationships, resource-based policies, OIDC federation, cross-account trust chains. Both see the compound paths that per-resource scanners structurally miss.

The difference is purpose. BloodHound shows you the attack. Verification proves you've closed it.

Showing and proving are different

A red team runs BloodHound against your environment and produces a report: "From the GitHub Actions OIDC role, through the deploy role, to Secrets Manager, to the production database. Four hops. Each permission is individually justified. The chain is lethal."

The blue team receives the report. They remediate. Tighten the trust policy, add a condition on the OIDC role, remove the deploy role's Secrets Manager access. The path is closed. The red team moves on to the next engagement.

Three questions remain unanswered:

1. Is the path closed? The blue team made changes. Did the changes eliminate the path, or did they just make one hop harder while leaving an alternative route? BloodHound showed the original path. Nobody verified that the remediation closed it, every path from the OIDC role to production secrets through any chain of relationships.

2. Will the path stay closed? Configuration drifts. A developer adds a new trust relationship next week. A terraform apply restores a permission that was manually removed. An IAM policy update introduces a new hop that recreates the chain. The red team engagement was a point-in-time assessment. The configuration changes continuously. Who verifies the path stays closed on every change?

3. Are there paths BloodHound didn't test? BloodHound's analysis depends on the starting identity which is the foothold. A red team tests from a few footholds: the most exposed service, the CI/CD role, the developer SSO. Each foothold reveals different paths. Paths from footholds that weren't tested remain undiscovered. The red team doesn't claim to have tested every identity. They tested the most likely ones. The paths from unlikely identities are unknown.

Deterministic verification answers all three:

"Is the path closed?" The verification engine traverses the full configuration graph from every identity to every sensitive resource. If the remediation closed the path, the engine proves it. If an alternative route exists, the engine reports it with the exact chain.

"Will it stay closed?" The verification runs on every configuration snapshot. When the developer adds a trust relationship next week, the next snapshot triggers a full re-verification. If the new relationship reopens a path, the finding appears immediately.

"Are there untested paths?" The verification doesn't start from selected footholds. It verifies all identities against all sensitive resources. No selection bias or untested footholds. If a path exists from any identity through any chain to any crown jewel, the engine finds it regardless of whether a red team would have chosen that identity as a starting point.

The compound path problem

Justin's sharpest example: permissions that look harmless individually but chain into full compromise. This is the problem both tools solve. This cannot be solved by per-resource scanners.

He described a specific engagement: "We could push a pull request to a branch in GitHub and assume the AWS role on the other end of the CI/CD system. We went from no privilege in GitHub, literally zero privilege, to full control could have deleted the customer's AWS tenant and shipped malicious code out through their S3 buckets to all their customers."

Zero privilege in GitHub. Full tenant compromise in AWS. Each hop was individually least privilege. The chain reached production. No per-resource check on either side, GitHub or AWS would have flagged it, because each permission was justified in isolation.

A per-resource scanner evaluates each IAM role individually:

  • GitHub Actions OIDC role: has sts:AssumeRole on the deploy role → PASS (least privilege for its function)
  • Deploy role: has cloudformation:*, iam:PassRole, secretsmanager:GetSecretValue → PASS (standard deploy permissions)
  • Secrets Manager secret: encrypted, access logged → PASS (properly configured)

Three checks. Three passes. The compound path — OIDC role → deploy role → Secrets Manager → production credentials. This is invisible because per-resource checks evaluate nodes, not edges.

Both BloodHound and deterministic verification see this path. BloodHound shows it to the red team as an attack graph. Deterministic verification reports it to the blue team as a finding with the invariant that was violated: "a path exists from an external identity (GitHub Actions OIDC) through a trust chain to production secrets."

The difference: BloodHound discovers the path when a red team runs it. Deterministic verification discovers the path on every configuration snapshot, continuously, without a red team.

The choke point: cut the bridges, not every road

Justin uses an analogy that reveals the deeper graph problem: "Think of it like a map of the United States. The critical things in my environment are represented by the island of Manhattan. I only care about the bridges to Manhattan. I can cut off all access by just separating that."

This is the minimum cut set problem from graph theory. In a graph with 22 million attack paths (Justin's number for a 10,000-identity environment), you don't fix paths one by one. You find the smallest set of edges, the bridges whose removal disconnects the attacker subgraph from the crown jewels subgraph. Cut four bridges and you might eliminate millions of paths simultaneously.

BloodHound shows the bridges. The red team says: "These three permissions are the choke points. Remove them and you collapse 70% of the attack paths." Justin's data confirms it: "Our average is around 30% reduction within the first 30-60 days, once they see where to focus."

But the choke point analysis has a verification gap: after the blue team cuts the bridges, who proves no alternative bridges exist?

The tools diverge here. BloodHound identifies choke points by traversing forward from footholds. It finds the bridges the red team would cross. Deterministic verification identifies choke points by exhaustive graph analysis. It finds every bridge, including the ones no red team tested. A Z3 solver can compute the minimum cut set between the external-identity subgraph and the crown-jewels subgraph, proving that no path exists after the bridges are removed. Not "we didn't find a path", "no path exists, proven."

The scale numbers make this concrete:

  • 22 million attack paths in a 10,000-identity environment — a red team can't test them all
  • 70-100% exposure at initial deployment — "if I phished a random user, 7 or 10 out of 10 chance of completely taking over their environment"
  • 30% reduction in 30-60 days once choke points are visible — the low-hanging fruit that BloodHound reveals

The question after the 30% reduction: what about the remaining 70%? And when configuration changes next week add new edges to the graph, do the choke points still hold? BloodHound answers this at the next engagement. Deterministic verification answers this on every snapshot.

I already run BloodHound. Why do I need this?

The answer is scope, direction, cadence and precision.

A note on BloodHound Enterprise vs Classic: BloodHound Enterprise has moved closer to the verification side by defining "High Value Targets" (Tier 0) and showing all paths leading to them. This is valuable and narrows the gap. But the distinction remains: BloodHound — Classic or Enterprise is an observability tool. It shows what IS there. Deterministic verification is a policy engine. It proves an invariant is NEVER violated. Showing all paths to Tier 0 is not the same as proving no path exists. The first is a snapshot of the graph. The second is a proof about the graph.

Scope: BloodHound's strength is Active Directory and the identity graph connecting AD to cloud. It maps trust relationships, group memberships, delegation paths, and privilege escalation chains across AD and cloud IAM. Deterministic verification's strength is cloud infrastructure configuration. IAM policies, S3 bucket policies, KMS key policies, security groups, trust policies, OIDC federation, resource-based policies, and the compound paths between them. The overlap is in the cloud IAM graph. The non-overlapping areas are AD (BloodHound's territory) and cloud infrastructure configuration beyond IAM (deterministic verification's territory).

Direction: BloodHound runs forward from footholds: "what can this identity reach?" Deterministic verification runs exhaustively: "can ANY identity reach this resource?" Forward traversal from selected footholds for red teams. It simulates the attacker's perspective. Exhaustive verification is for blue teams. It proves no path exists, regardless of which foothold an attacker might land on.

Cadence: BloodHound runs when a red team runs it such as quarterly engagements, annual assessments, ad hoc testing. Deterministic verification runs on every configuration snapshot, deploy, terraform apply and manual console change. The configuration changes faster than the red team can test it. The verification keeps pace with the configuration.

Precision on IAM conditions: Graph databases (Neo4j, which BloodHound uses) are excellent at finding paths quickly across millions of nodes. They're optimized for traversal speed. SMT solvers (Z3) and Datalog (Soufflé) are computationally more expensive per query but handle something graph traversal alone cannot: the complex Condition blocks in IAM policies. A graph database sees "Role A can AssumeRole to Role B." An SMT solver evaluates: "Role A can AssumeRole to Role B ONLY IF aws:PrincipalOrgID equals o-abc123 AND aws:MultiFactorAuthPresent is true AND the request originates from CIDR 10.0.0.0/8." The conditions determine whether the edge is traversable and IAM policies are dense with conditions that narrow or widen the real attack surface. Graph-only tools sometimes abstract these conditions away for speed. Formal verification evaluates them precisely, which means a path that exists in the graph may not exist in reality (conditions block it) and a path that looks blocked may be open (conditions are satisfied by a specific caller). Precision on conditions is where formal engines earn their computational cost.

AWS IAM Access Analyzer: uses the Zelkova engine. This is also an SMT solver. This validates the approach: AWS themselves chose formal verification for IAM analysis. The difference is scope. Access Analyzer evaluates single-account, single-resource access. It answers "can any external principal access this S3 bucket?" It does not traverse cross-account trust chains, compose multi-hop paths across IAM roles, or evaluate the compound reachability from an OIDC federation through three accounts to a Secrets Manager secret. Deterministic verification using open-source engines provides the cross-account, cross-entity, multi-hop analysis that AWS's native tool doesn't in an open-source, auditable form.

The messy middle where both tools matter most

Justin identifies the "messy middle" connecting identity providers (EntraID, Okta) to cloud infrastructure as the playground for attackers. This is where OIDC trust policies, SAML federation, cross-account roles, and service provider trust chains create compound paths that neither AD-focused tools nor cloud-focused tools see completely.

BloodHound maps the AD-to-cloud trust path: EntraID group membership → federated role → cloud IAM. Deterministic verification checks the cloud-side configuration: does the OIDC trust policy constrain the sub claim? Does the federated role have access to sensitive resources? Is the cross-account trust scoped or wildcard?

The full picture requires both: BloodHound for the identity-provider side, deterministic verification for the cloud-infrastructure side. The compound path crosses both domains. Neither tool alone sees the complete chain.

What this means for your security program

If you run BloodHound today, you're ahead of most organizations. You see the attack paths. You know what an attacker would find. That knowledge is the prerequisite for remediation.

The next question is: after remediation, how do you prove the paths are closed and stay closed between red team engagements?

BloodHound is the diagnostic. Deterministic verification is the continuous monitor. It proves the treatment is working on every configuration change, not just at the next checkup.

Both use graph reachability. Both analyze compound paths. Both see what per-resource scanners miss. One shows you the attack. The other proves you've closed it. Both are necessary. Neither is sufficient alone.


Stave is an open-source tool that verifies cloud configuration against declared invariants using three formal reasoning engines (CEL, Z3, Soufflé). It reads configuration snapshots without credentials and traverses the full configuration graph to prove whether compound paths to sensitive resources exist. The graph analysis described in this article is done by Stave's Soufflé and Z3 engines: exhaustive reachability across IAM trust chains, resource-based policies, and cross-account relationships.

Top comments (0)