Lab Environment Setup
Learning Objectives
Section titled “Learning Objectives”By the end of this lesson, you will be able to:
- Understand the recommended lab architecture.
- Create cloud accounts for hands-on practice.
- Build a safe penetration testing environment.
- Install required tools.
- Configure your local workstation.
- Prepare for every practical lab in this course.
Why Build a Lab Environment?
Section titled “Why Build a Lab Environment?”Cloud penetration testing is a practical skill.
Reading theory alone is not enough.
To become a professional Cloud Penetration Tester, you need an environment where you can safely:
- Learn cloud services.
- Deploy vulnerable resources.
- Practice reconnaissance.
- Identify security misconfigurations.
- Perform authorised security testing.
- Validate remediation techniques.
Throughout this course, you will build and improve your own professional cloud security lab.
Lab Design Principles
Section titled “Lab Design Principles”Our lab environment follows these principles:
- Safe
- Isolated
- Low Cost
- Repeatable
- Easy to Rebuild
- Enterprise Inspired
Always use dedicated training accounts or approved lab environments.
Recommended Lab Architecture
Section titled “Recommended Lab Architecture” Local Computer │ ┌───────────────┼────────────────┐ │ │ │ ▼ ▼ ▼ AWS Lab Azure Lab Google Cloud Lab │ │ │ └───────────────┼────────────────┘ │ Kubernetes Cluster │ Docker Containers & Applications │ Vulnerable Cloud ResourcesLab Components
Section titled “Lab Components”Throughout the course, you will use:
- AWS
- Microsoft Azure
- Google Cloud Platform
- Kali Linux
- Docker
- Kubernetes
- Git
- Terraform
- Visual Studio Code
Local Computer Requirements
Section titled “Local Computer Requirements”Recommended specifications:
| Component | Recommended |
|---|---|
| CPU | 4+ Cores |
| RAM | 16 GB or more |
| Storage | 100 GB Free SSD |
| Operating System | Windows 11, macOS or Linux |
| Internet | Stable Broadband |
Minimum:
- 8 GB RAM
- 50 GB Storage
Cloud Accounts
Section titled “Cloud Accounts”Create free or training accounts for:
Amazon Web Services
Section titled “Amazon Web Services”Use:
- AWS Free Tier
- AWS Academy
- AWS Skill Builder Sandbox
- Employer Training Account
Recommended services:
- IAM
- EC2
- S3
- VPC
- CloudTrail
- CloudWatch
- Lambda
- EKS
Microsoft Azure
Section titled “Microsoft Azure”Recommended:
- Azure Free Account
- Azure Student Subscription
- Employer Lab
Services:
- Azure AD
- Azure VM
- Storage Account
- Virtual Network
- Azure Kubernetes Service (AKS)
Google Cloud
Section titled “Google Cloud”Recommended:
- Google Cloud Free Tier
- Google Cloud Skills Boost
- Employer Lab
Services:
- Compute Engine
- Cloud Storage
- IAM
- GKE
- Secret Manager
Local Software Installation
Section titled “Local Software Installation”Install the following software before starting the labs.
Web Browser
Section titled “Web Browser”Recommended:
- Google Chrome
- Microsoft Edge
- Firefox
Visual Studio Code
Section titled “Visual Studio Code”Install:
- VS Code
- YAML Extension
- Docker Extension
- Kubernetes Extension
- Terraform Extension
- Git Extension
- Markdown Extension
Install Git.
Verify:
git --versionPython
Section titled “Python”Install Python 3.
Verify:
python --versionor
python3 --versionDocker Desktop
Section titled “Docker Desktop”Install Docker Desktop.
Verify:
docker versionKubernetes CLI
Section titled “Kubernetes CLI”Install kubectl.
Verify:
kubectl version --clientInstall Helm.
Verify:
helm versionCloud Command Line Tools
Section titled “Cloud Command Line Tools”Install the following CLIs.
AWS CLI
Section titled “AWS CLI”Verify:
aws --versionConfigure:
aws configureAzure CLI
Section titled “Azure CLI”Verify:
az versionLogin:
az loginGoogle Cloud CLI
Section titled “Google Cloud CLI”Verify:
gcloud versionLogin:
gcloud auth loginRecommended Security Tools
Section titled “Recommended Security Tools”Install the following tools.
Reconnaissance
Section titled “Reconnaissance”- Nmap
- ffuf
- Gobuster
Cloud Assessment
Section titled “Cloud Assessment”- ScoutSuite
- Prowler
- CloudFox
- Pacu
Container Security
Section titled “Container Security”- Trivy
- Kubescape
- kube-bench
- kube-hunter
General Utilities
Section titled “General Utilities”- jq
- curl
- wget
- OpenSSL
Kali Linux
Section titled “Kali Linux”You can use:
- Virtual Machine
- Dual Boot
- Windows WSL2
- Cloud Virtual Machine
Recommended tools already included:
- Nmap
- Burp Suite Community
- Metasploit Framework
- Wireshark
- Hydra
- SQLMap
- Gobuster
Virtualisation
Section titled “Virtualisation”Recommended software:
- VMware Workstation
- VirtualBox
- Hyper-V
Suggested virtual machines:
- Kali Linux
- Ubuntu Server
- Windows Server (optional)
Docker Environment
Section titled “Docker Environment”Install Docker Desktop.
Validate:
docker run hello-worldLearn:
- Images
- Containers
- Volumes
- Networks
- Registries
Kubernetes Lab
Section titled “Kubernetes Lab”Options:
Option 1
Section titled “Option 1”Minikube
Option 2
Section titled “Option 2”Kind (Kubernetes in Docker)
Option 3
Section titled “Option 3”Amazon EKS
Option 4
Section titled “Option 4”Azure Kubernetes Service
Option 5
Section titled “Option 5”Google Kubernetes Engine
Suggested Folder Structure
Section titled “Suggested Folder Structure”Create a dedicated workspace.
Cloud-Pentest-Lab/
├── AWS/├── Azure/├── GCP/├── Kubernetes/├── Docker/├── Scripts/├── Reports/├── Evidence/├── Screenshots/├── Terraform/├── Notes/└── Tools/Lab Accounts
Section titled “Lab Accounts”Create separate identities for:
- Administrator
- Security Engineer
- Developer
- Read-Only User
- Auditor
This allows you to practise IAM assessments and privilege testing safely.
Cost Optimisation Tips
Section titled “Cost Optimisation Tips”To reduce cloud costs:
- Use Free Tier resources.
- Delete unused virtual machines.
- Stop EC2 instances when not in use.
- Remove unused Kubernetes clusters.
- Delete unattached storage volumes.
- Use small instance types for labs.
- Destroy infrastructure after completing exercises.
Always review your cloud billing dashboard.
Security Guidelines
Section titled “Security Guidelines”Only test:
- Your own accounts.
- Approved training environments.
- Deliberately vulnerable labs.
- Employer-approved penetration testing environments.
Never test:
- Production systems without authorisation.
- Third-party cloud environments.
- Public cloud resources you do not own.
- Other students’ environments.
Backup Your Work
Section titled “Backup Your Work”Maintain:
- Git repository
- Lab notes
- Screenshots
- Reports
- Terraform code
- Scripts
Version control makes it easier to rebuild your environment.
Lab Validation Checklist
Section titled “Lab Validation Checklist”Before beginning the next module, confirm:
- AWS account created
- Azure account created
- Google Cloud account created
- AWS CLI installed
- Azure CLI installed
- Google Cloud CLI installed
- Git installed
- Docker installed
- kubectl installed
- Helm installed
- Python installed
- VS Code installed
- Kali Linux available
- Docker validated
- Kubernetes environment ready
- Cloud credentials configured
- Internet connectivity verified
Common Lab Issues
Section titled “Common Lab Issues”| Problem | Solution |
|---|---|
| CLI login fails | Re-authenticate and verify credentials |
| Docker not starting | Restart Docker Desktop and check virtualization settings |
| kubectl cannot connect | Verify kubeconfig and cluster context |
| AWS CLI authentication error | Run aws configure again |
| Azure login issue | Run az login |
| GCP authentication issue | Run gcloud auth login |
| Billing warning | Delete unused cloud resources |
Best Practices
Section titled “Best Practices”- Use separate lab accounts.
- Enable Multi-Factor Authentication (MFA).
- Rotate access credentials regularly.
- Keep operating systems updated.
- Use Infrastructure as Code whenever possible.
- Document every exercise.
- Destroy unused infrastructure after completing labs.
- Review cloud bills regularly.
Knowledge Check
Section titled “Knowledge Check”1. Why should you use dedicated cloud accounts for labs?
Section titled “1. Why should you use dedicated cloud accounts for labs?”Answer: Dedicated lab accounts isolate testing activities, reduce the risk of affecting production resources and make it easier to manage permissions and costs.
2. Why is Docker important for Cloud Penetration Testing?
Section titled “2. Why is Docker important for Cloud Penetration Testing?”Answer: Docker allows you to build, deploy and assess containerised applications, which are widely used in modern cloud environments.
3. Why should you use Infrastructure as Code (IaC) for your lab?
Section titled “3. Why should you use Infrastructure as Code (IaC) for your lab?”Answer: IaC enables you to create, rebuild and destroy cloud environments consistently, making labs repeatable and easier to manage.
4. Why should you regularly delete unused cloud resources?
Section titled “4. Why should you regularly delete unused cloud resources?”Answer: Removing unused resources reduces cloud costs, minimises your attack surface and keeps your lab environment organised.
5. What is the most important rule when performing cloud penetration testing?
Section titled “5. What is the most important rule when performing cloud penetration testing?”Answer: Only perform security testing against environments that you own or have explicit authorisation to assess.
What’s Next?
Section titled “What’s Next?”In the next lesson, we will review the Required Knowledge needed before starting cloud penetration testing, including networking, Linux, cloud fundamentals, scripting, security concepts and penetration testing methodology.
➡️ Next Lesson: Lesson 05 — Required Knowledge