AWS Pen-Testing Laboratory deployed as IaC with Terraform on AWS. It deploys a Kali Linux instance accessible via ssh & wire guard VPN. Vulnerable instances in a private subnet.
NOTE:
Changelog
Diagram
Components
Features Added
How-To
aws configure
Deploy
Enable/disable vulnerable instances to be deployed setting 0
or 1
in variables.tf
:
variable “deploment-control” {
type = map
default = {
#”instance” = 0 or 1, to disable or enable
“metasploitable3” = 1
“dvca” = 0
}
description = “Control which EC2 instances are deployed, 0 for none or 1”
}
Use terraform for deploy infrastructure
terraform init
terraform plan
terraform apply -auto-approve
Outputs
Terraform outputs will show following entries:
Usage
Either connect to Kali via ssh or wireguard:
KALI_IP= # configure kali public ip
ssh -i kali.pem -o StrictHostKeyChecking=no -o IdentitiesOnly=yes kali@${KALI_IP}
KALI_IP= # configure kali public ip
scp -i kali.pem -o StrictHostKeyChecking=no IdentitiesOnly=yes kali@${KALI_IP}:/home/kali/client_vpn.wg .
####
(local_kali)$ sudo apt-get install –y wireguard
(local_kali)$ sudo gedit /etc/wireguard/wg0.conf # copy contents of client_vpn.wg
(local_kali)$ sudo chmod 700 /etc/wireguard/wg0.conf
(local_kali)$ sudo wg-quick up wg0
(local_kali)$ ping 10.0.0.5 # test connectivity with kali instance in AWS
Destroy
terraform destroy -auto-approve
Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…
This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…
GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…
Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…
The free and open-source security platform SecHub, provides a central API to test software with…
Don't worry if there are any bugs in the tool, we will try to fix…