This repository contains scripts and instructions to automate the deployment of a comprehensive pentesting lab environment on AWS, featuring a KVM host, Windows Domain Controllers (GOAD), member servers, and a vulnerable Ubuntu web server.
This lab involves three distinct infrastructure layers. Pay attention to which system each command should run on:
| Component | Description | IP/Location |
|---|---|---|
| Attacker Machine | Your local workstation where you run Terraform, SSH, and pentesting tools | Your local machine |
| EC2 Instance (KVM Host) | AWS EC2 instance running Ubuntu that hosts all VMs via KVM/QEMU | Public IP from Terraform |
| VMs on EC2 | Virtual machines running inside the EC2 instance | 192.168.100.x network |
- DC01 (192.168.100.10) - Primary Domain Controller (Windows Server 2019)
- DC02 (192.168.100.11) - Secondary Domain Controller (Windows Server 2019)
- SRV01 (192.168.100.20) - Member Server (Windows Server 2019)
- SRV02 (192.168.100.21) - Member Server (Windows Server 2016)
- WEB01 (192.168.100.30) - Vulnerable Web Server (Ubuntu 20.04)
To set up your pentest lab, please refer to the detailed RUN_GUIDE.md located in the pentest-lab/ directory. This guide will walk you through each step of the automation process.
.
├── pentest-lab/
│ ├── scripts/
│ │ ├── 01_initial_setup.sh
│ │ ├── 02_kvm_setup.sh
│ │ ├── 03_download_isos.sh
│ │ ├── 04_create_vms.sh
│ │ ├── 05_goad_ansible_setup.sh
│ │ ├── 06_web_vm_setup.sh
│ │ ├── start_lab.sh
│ │ ├── stop_lab.sh
│ │ └── get_lab_info.sh
│ ├── terraform/
│ │ └── (Terraform configuration files created by 01_initial_setup.sh)
│ ├── ssh/
│ │ └── (SSH key pair created by 01_initial_setup.sh)
│ └── RUN_GUIDE.md
└── initial_readme.md
- Start here: Read the
pentest-lab/RUN_GUIDE.mdcarefully. - Follow the instructions in
RUN_GUIDE.mdto execute the automation scripts step-by-step.
- Cost Management: The lab is configured with auto-shutdown features and cost alerts. Remember to stop your EC2 instance when not in use to minimize costs.
- Manual Steps: Some steps, particularly Windows OS installation on VMs via VNC, require manual intervention. The
RUN_GUIDE.mdprovides detailed instructions for these. - Security: This lab is designed to be vulnerable for pentesting practice. Do not expose it to the public internet without proper understanding and additional security measures.
Refer to the troubleshooting sections within the RUN_GUIDE.md and the original pentest_lab_guide.md for common issues.