Build Tools VM Manually

Requirements

  • Python3.6+ is required.

  • Terraform >= 0.14 installed and in your $PATH.

  • The AWS CLI installed and in your $PATH, and an AWS account with sufficient privileges to create and destroy resources. - AWS Named profile configured <https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html>

Install common packages

sudo apt-get update && sudo apt install -y ssh vim net-tools curl git python3-pip unzip

Install awscli

  • Download the package

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
  • Unzip the installer

unzip awscliv2.zip
  • Run the install program

sudo ./aws/install

Install terraform

  • Terraform Prerequisites

sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
  • Add the HashiCorp GPG key

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
  • Add the official HashiCorp Linux repository

sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
  • Update to add the repository, and install the Terraform CLI

sudo apt-get update && sudo apt-get install terraform

Install Cloudgoat

  • Use git to clone the Cloudgoat repo to home directory and change to the new directory

git clone https://github.com/VectraCommunity/cloudgoat.git ~/cloudgoat && cd ~/cloudgoat
  • Install the Cloudgoat dependencies

pip3 install -r requirements.txt && chmod u+x cloudgoat.py

Install Pacu

  • Use git to clone the Pacu repo to home directory and change to the new directory

git clone https://github.com/VectraCommunity/pacu.git ~/pacu && cd ~/pacu
  • Install the Pacu dependencies

pip3 install -r requirements.txt

Add AWS Policy

  • The lab may require a policy document for AWS role creation. You can download a policy locally using wget

wget https://raw.githubusercontent.com/VectraCommunity/labresources/main/sample_assume_trust_policy.json