A community-driven offensive cloud security training ground
Master cloud exploitation through high-fidelity, real-world vulnerability scenarios
Beaver Dam Community is a security community focused on offensive cloud security.
As cloud environments rapidly expand, security threats evolve alongside them. However, there's a significant gap in safe, hands-on learning environments for real cloud vulnerabilities. Most existing vulnerability labs focus on on-premise environments or fail to cover cloud-specific attack vectors like IAM privilege escalation, metadata service abuse, and cross-service trust relationship exploitation.
GnawLab was created to bridge this gap:
- Reproduce real-world cloud vulnerability scenarios in actual cloud environments
- Provide CTF-style hands-on learning experiences
- Offer progressive difficulty levels from beginner to advanced
- Enable easy deployment and cleanup with Terraform
Just as beavers build dams piece by piece, we build cloud security knowledge step by step.
GnawLab currently contains 14 deployable AWS scenarios and 3 planned scenarios. An available scenario includes Terraform infrastructure and scenario-specific setup, walkthrough, and cleanup documentation.
| Category | Scenario | Difficulty | Status | Attack path |
|---|---|---|---|---|
| 01-beginner | s3-data-heist | Easy | ✅ Available | Leaked IAM credentials → S3 enumeration and data exfiltration |
| ebs-snapshot-theft | Easy | ✅ Available | Exposed EBS snapshot → attacker EC2 instance → data extraction | |
| metadata-pivot | Medium | ✅ Available | SSRF → IMDS credentials → S3 data exfiltration | |
| secrets-extraction | Easy | ✅ Available | Command injection → ECS task credentials → Secrets Manager | |
| policy-rollback | Medium | ✅ Available | IAM policy version rollback → privilege escalation | |
| credential-chain | Hard | 🚧 Planned | Multi-service credential chaining and escalation | |
| ec2-role-hijack | Hard | 🚧 Planned | PassRole → EC2 launch with a privileged role | |
| lambda-backdoor | Hard | 🚧 Planned | PassRole → privileged Lambda code execution | |
| 02-shadow-api | legacy-bridge | Easy | ✅ Available | SSRF into a legacy API → IMDSv1 credentials → S3 exfiltration |
| code-judge-escape | Hard | ✅ Available | Pickle RCE → Docker socket → IMDSv2 → ECS Exec | |
| 03-supply-chain | cicd-eic-pivot | Medium | ✅ Available | Atlantis CI/CD abuse → IAM credentials → EC2 Instance Connect |
| golden-drift | Medium | ✅ Available | AMI name confusion → SSM pointer poisoning → ASG compromise | |
| dam-breaks | Medium | ✅ Available | Cognito credentials → CodeBuild override → ECS task role | |
| 04-ai-security | bedrock-kb-poisoning | Hard | ✅ Available | RAG corpus poisoning → indirect prompt injection → unauthorized presigned URL |
| 05-zero-trust | watchdog-trap | Hard | ✅ Available | SSTI/RCE → internal tool pivot → CI/CD and ECS compromise |
| 06-misconfiguration | obfuscated-policy | Easy | ✅ Available | IAM action wildcard obfuscation → detector bypass → S3 access |
| 07-cve | hidden-track | Medium | ✅ Available | ExifTool CVE-2021-22204 → Lambda credentials → S3 version recovery |
Difficulty values and detailed prerequisites are maintained in each scenario's README and setup guide.
- Terraform >= 1.5.0
- AWS CLI v2
- An AWS account with permissions to create the resources listed by the selected scenario
- Any additional tools listed in that scenario's
setup.md
Caution
These scenarios intentionally deploy vulnerable resources and may incur AWS charges. Deploy them only in an account you control, restrict access as described in the setup guide, and remove all resources when finished.
Most scenarios default to the GnawLab AWS CLI profile and the us-east-1 region:
aws configure --profile GnawLab
aws sts get-caller-identity --profile GnawLabYou can select another profile where supported by passing a Terraform variable, for example -var="profile=my-admin-profile". watchdog-trap instead uses the standard AWS credential chain (default profile or environment variables); see its setup guide.
Read the scenario's README.md and setup.md before deploying. For example:
cd scenarios/aws/01-beginner/01-single-hop/s3-data-heist
cat setup.md
cd terraform
terraform init
terraform plan
terraform applyInspect the scenario-specific outputs after deployment:
terraform outputOutput names, participant starting points, required post-deployment steps, and deployment times vary by scenario. Follow the selected scenario's setup guide rather than assuming credentials are always returned. For example, watchdog-trap recommends its automated deploy.sh flow.
Read the scenario's cleanup.md first. Some challenges create participant-managed resources that must be removed before Terraform can destroy the lab infrastructure.
# Run any scenario-specific pre-cleanup steps first.
cd terraform
terraform destroyConfirm that the destroy completed successfully and check the AWS account for any remaining scenario resources.
- LinkedIn Group — Join the Beaver Dam Community
- GitHub Issues — Report bugs or request features
We welcome contributions, whether they add a new scenario, fix a bug, or improve documentation.
See CONTRIBUTING.md for guidelines.
Licensed under the Apache License 2.0. These intentionally vulnerable scenarios are for educational use only. Use them responsibly and only in environments you own or have explicit permission to test.
