How def-sayan/learn-ansible-vulnerable-lab-env works
This repository builds an intentionally vulnerable Active Directory lab in AWS: Terraform provisions isolated hosts and generates Ansible inventory, then Ansible configures the domain, attack paths, and gated flags. The main user journey is operator → provision → configure → connect to the pivot and practice the documented attacks. The graph preserves the README’s major lab capabilities; source excerpts were limited, so role-to-playbook wiring and finer internal call relationships are not asserted.
Main entry points: playbooks Deployment Stages · main.tf Terraform Resources · all.yml Lab Variables · outputs.tf Inventory Generation
Components 20
AWS Provisioning
- Terraform Resources
terraform/main.tf - Windows Bootstrap
terraform/templates/windows_userdata.ps1.tpl - Inventory Generation
terraform/outputs.tf
Ansible Configuration
- Lab Deployment
site.yml - Deployment Stages
playbooks
Lab Scenarios
- Domain Controller
roles/domain_controller - Domain Members
roles/domain_member - AD Content
roles/ad_content - ACL DCSync
roles/vuln_acl_dcsync - AS-REP Roasting
roles/vuln_asrep - Kerberoasting
roles/vuln_kerberoast - ADCS ESC1
roles/vuln_adcs_esc1 - Enterprise CA
roles/adcs_ca - Gated Flags
roles/flags
Access and State
- Ansible Inventory
inventory/hosts.ini.example - Linux Pivot
roles/linux_pivot - Lab Variables
inventory/group_vars/all.yml
Other components
- Operator
- AWS
- Lab Learner
Connections 21
- Operator → Terraform Resources: runs provisioning
- Terraform Resources → AWS: creates infrastructure
- Terraform Resources → Windows Bootstrap: uses template
- Terraform Resources → Inventory Generation: generates inventory
- Inventory Generation → Ansible Inventory: writes hosts
- Operator → Lab Deployment: runs deployment
- Lab Deployment → Deployment Stages: imports stages
- Deployment Stages → Domain Controller: configures domain
- Deployment Stages → Domain Members: joins hosts
- Deployment Stages → AD Content: plants AD content
- Deployment Stages → ACL DCSync: plants weakness
- Deployment Stages → AS-REP Roasting: plants weakness
- Deployment Stages → Kerberoasting: plants weakness
- Deployment Stages → ADCS ESC1: plants ESC1
- Deployment Stages → Enterprise CA: installs CA
- Deployment Stages → Gated Flags: places flags
- Deployment Stages → Linux Pivot: configures pivot
- Lab Variables → AD Content: declares lab data
- Lab Variables → Gated Flags: declares flag values
- Lab Learner → Linux Pivot: connects to
- Lab Learner → Domain Controller: practices attacks