Skip to content
mvelazc0Public

About

BadZure automates the deployment of intentionally misconfigured Entra ID tenants and Azure subscriptions, populating them with diverse entities and configurable, traversable attack paths.

Topics

Resources

Stars

530 stars

Watchers

15 watching

Forks

Repository files navigation

BadZure

BlackHat Arsenal 2024 BlackHat Arsenal 2026 Open_Threat_Research Community Documentation

BadZure logo

BadZure deploys intentionally misconfigured Entra ID tenants and Azure subscriptions so security teams can explore, exploit, and detect cloud attack paths in a real environment. It uses Terraform to populate a tenant with users, groups, applications, and Azure resources, then layers deliberate misconfigurations on top to produce complete privilege-escalation paths that span the identity and infrastructure planes.

Every attack path begins at a compromised foothold and ends at a high-privilege target. BadZure provides the foothold credentials, so you start post-compromise and focus on the escalation itself.

📖 Full documentation: www.badzure.com

Who it's for

You might be one of these, or several:

  • 🗡️ Red teamers: rehearse Entra ID and Azure tradecraft in a safe, disposable tenant.
  • 🎯 Detection engineers & threat hunters: generate attack telemetry to build and validate detections.
  • 🟣 Purple teams: reproduce a specific technique end to end and watch it from both sides.
  • 🔬 Security researchers: explore cloud attack primitives and discover new ones.
  • 🎓 Trainers & CTF authors: run practical cloud security labs and capture the flag challenges.

Attack paths

BadZure provides two ways to author an attack path: atomic (one named technique template from a catalog of seven) and chained (an explicit graph built from lower-level primitives). A chained path can reproduce one catalog behavior or combine several into a custom route. The seven atomic templates span the identity plane (ApplicationOwnershipAbuse, ApplicationAdministratorAbuse, CloudAppAdministratorAbuse) and the resource plane (ManagedIdentityAbuse, KeyVaultSecretTheft, StorageCertificateTheft, CosmosDBSecretTheft). See the technique catalog for details and interactive graphs of each.

Quick start

Requirements

  • Azure CLI and Terraform
  • An Azure subscription with an Entra ID tenant. Creating one provides both. Azure compute resources incur standard charges until you destroy the lab.

Install and run

git clone https://github.com/mvelazc0/BadZure
cd BadZure
python -m venv venv && source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt

# Deploying requires Global Administrator in Entra ID and Owner on the subscription.
az login

python BadZure.py check   --config badzure.yml   # prove attack paths reachable (offline)
python BadZure.py report  --config badzure.yml   # render interactive graphs (offline)
python BadZure.py build   --config badzure.yml   # deploy the lab
python BadZure.py show                           # inspect what was created
python BadZure.py destroy --verbose              # tear it all down

See Installation and Your First Lab for the full walkthrough, and the Configuration reference for every option.

Author

Contributors

References

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

About

BadZure automates the deployment of intentionally misconfigured Entra ID tenants and Azure subscriptions, populating them with diverse entities and configurable, traversable attack paths.

Topics

Resources

Stars

530 stars

Watchers

15 watching

Forks

Releases

Packages

Used by

Contributors

Languages