Skip to content
/ GoldKAT Public

Automates the build, configuration, and deployment of a hardened Kali Linux AMI on AWS using Packer, Ansible, and Terraform.

License

Notifications You must be signed in to change notification settings

hexrom/GoldKAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoldKAT (Kali Ansible TF)

This project automates the creation of a hardened, ready-to-deploy Kali Linux Amazon Machine Image (AMI) — your "golden image" for red team operations or secure penetration testing in AWS. Using Packer for image builds, Ansible for configuration, and Terraform for deployment, it delivers a repeatable, infrastructure-as-code workflow to spin up production-ready Kali instances with zero manual steps.

Whether you're launching a lab environment or scaling offensive security operations in the cloud, this repo gives you a powerful, fully-automated pipeline from bare base to battle-tested box.

Creating an AWS EC2 Instance with Packer and Terraform

This guide explains how to use Packer and Terraform to create an Amazon Machine Image (AMI) and launch an EC2 instance on AWS.

Prerequisites

  • Terraform installed
  • Packer installed
  • AWS credentials configured (via environment variables or AWS CLI)

Build the AMI with Packer

Use the following command to create an AMI based on the Packer configuration file:

packer init kali.pkr.hcl
packer build kali.pkr.hcl

Note the AMI ID generated by Packer.

Deploy the AMI with Terraform

Replace variables.tf with the AMI ID generated by your Packer.

Initialize and Apply the Terraform Configuration

Run the following commands to initialize Terraform and create the Kali Linux EC2 instance:

terraform init
terraform apply

Confirm the changes when prompted.

Access the EC2 Instance

After Terraform completes provisioning, access the EC2 instance using SSH with the private key corresponding to the SSH key pair used in the Packer configuration:

ssh -i /path/to/your/ssh/private/kali-key kali@INSTANCE_IP

Replace /path/to/your/ssh/private/key.pem with the path to your private key and INSTANCE_IP with the actual public IP or DNS name of the EC2 instance.

About

Automates the build, configuration, and deployment of a hardened Kali Linux AMI on AWS using Packer, Ansible, and Terraform.

Topics

Resources

License

Stars

Watchers

Forks

Languages