Cyber security

Automated Emulation – Building A Customizable Breach And Attack Simulation Lab With AWS And Terraform

Automated Emulation is a simple terraform template creating a customizable and automated Breach and Attack Simulation lab. It automically builds the following resources hosted in AWS:

  • One Linux server deploying Caldera, Prelude Operator Headless, and VECTR
  • One Windows Client (Windows Server 2022) auto-configured for Caldera agent deployment, Prelude pneuma, and other Red And Blue tools

See the Features and Capabilities section for more details.

Key Differences

This lab differs from other popular Cyber Ranges in its design and philosophy. No secondary tools like Ansible are necessary. Feel free to use them if you like. But they aren’t required for configuration management.

Instead of using 3rd party configuration management tools, this lab uses terraform providers (AWS SDK) and builtin AWS features (user data).

You don’t have to rely on a secondary agent or deal with outdated libraries or networking issues with agentless push or updating a secondary tool that causes issues over time.

This increases stability, consistency, and speed for building and configuring cloud resources. Use terraform, bash, and powershell to build and configure.

A small user-data script is pushed into the system and runs. Individual configuration management scripts are uploaded to an S3 bucket.

The master script instructs the system which smaller scripts to run which builds the system. With good documentation, the location of these scripts should make it easy to add and customize.

See the Features and Capabilities section for more details.

Requirements And Setup

Tested With:

  • Mac OS 13.4
  • terraform 1.5.7

Clone This Repository:

git clone https://github.com/iknowjason/AutomatedEmulation

Credentials Setup

Generate an IAM programmatic access key that has permissions to build resources in your AWS account. Setup your .env to load these environment variables. You can also use the direnv tool to hook into your shell and populate the .envrc. Should look something like this in your .env or .envrc:

export AWS_ACCESS_KEY_ID="VALUE"
export AWS_SECRET_ACCESS_KEY="VALUE"

Build And Destroy Resources

Run Terraform Init

Change into the AutomatedEmulation working directory and type:

terraform init

Run Terraform Plan Or Apply

terraform apply -auto-approve

or

terraform plan -out=run.plan
terraform apply run.plan

Destroy Resources

terraform destroy -auto-approve

View Terraform Created Resources

The lab has been created with important terraform outputs showing services, endpoints, IP addresses, and credentials. To view them:

terraform output
Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

2 weeks ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

3 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

3 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

3 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

3 weeks ago