#
Getting Started
This document covers the infrastructure setup for emulating ATT&CK Evaluations - CL0P, LockBit, & DPRK (2024).
Getting Started Overview AWS Cost Estimate MacOS Instances
Prerequisites Installation Linux macOS
Deploy Infrastructure with Terraform Amazon Marketplace Subscriptions Windows 11 Deploy environment
Configure Infrastructure with Ansible Deploy Attack Platform Software
#
Overview
ATT&CK Evaluations used the Amazon Web Services (AWS) cloud platform.
#
AWS Cost Estimate
A rough estimated cost for the environment is approximately $2500 per month, assuming the hosts are run 24/7. To further reduce costs, EC2 instances should be shutdown and stopped when not in active use.
Specific costs for the AWS resources used can vary greatly depending on your specific AWS account agreements, region, savings plans, reservations, how frequently the systems are online, and other cost reduction techniques you use.
#
MacOS Instances
MacOS instances currently account for roughly a third of the standard overall cost of the ER6 Infrastructure, despite representing only two (2) of 31 instances. This is due an AWS requirement for provisioning MacOS on Dedicated Hosts:
Mac instances are available only as bare metal instances on Dedicated Hosts, with a minimum allocation period of 24 hours before you can release the Dedicated Host. You can launch one Mac instance per Dedicated Host. You can share the Dedicated Host with the AWS accounts or organizational units within your AWS organization, or the entire AWS organization.
Note that stopping or terminating a Mac instance initiates a scrubbing workflow of the underlying Dedicated Host, during which the dedicated host enters a pending state and becomes unavailable. This scrubbing workflow includes tasks such as erasing the internal SSD, resetting NVRAM, and more. AWS provides an estimated time of 110 minutes to complete the scrubbing process for Apple Silicon macOS instances.
#
Prerequisites
It is assumed that you have access to, and a working knowledge of, the following concepts and tools:
- Existing AWS Account with permissions to perform required actions (create/manage resources including EC2 instances, VPCs, Internet Gateways, Security Groups, and related resources)
- Familiar with common system administration concepts for Windows, MacOS, and Linux
- Tools
#
Installation
#
Linux
On Linux, see Terraform and Ansible documentation.
#
macOS
On Mac, using Homebrew:
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
brew install ansible
#
Deploy Infrastructure with Terraform
Terraform is used to initialize the infrastructure.
#
Amazon Marketplace Subscriptions
You may be prompted to accept the Terms to subscribe for AWS Marketplace images. If prompted, follow the URL provided in the terminal then click the Subscribe button. Once the subscription process is complete, re-run the Terraform plan and apply commands below.
#
Windows 11
Windows 11 AMI
IMPORTANT: AWS does not currently provide a pre-built Windows 11 Amazon Machine Image (AMI), and the team is unable to share the image used for the evaluation. As a result, you will have to provide your own Windows 11 AMI for use in the environment. The following steps provide some general guidance on building your own Windows 11 AMI. Please review the Amazon and Microsoft terms of service to ensure you are compliant with all licensing guidelines.
- Packer is used to automate the build of a Windows 11 VM from the installation image.
- Packer uploads the virtual machine file to an AWS S3 bucket.
- AWS VM Import to convert the VM to an AMI.
AWS provides additional documentation on importing a Windows 11 VM.
By default, the included configuration uses Windows Server 2022 for all Windows 11 desktop systems to provide a functional system. This is for convenience, however it is not guaranteed that the emulation plan will operate as intended on Windows Server 2022 in instances where Windows 11 is expected.
#
Deploy environment
Create a Terraform settings file from the included template.
cp -a deploy.auto.tfvars.template deploy.auto.tfvars
Open the
deploy.auto.tfvars
in an editor, and configure with desired values.In
deploy.auto.tfvars
, uncomment and setaws-bucket-name
to the name of the S3 bucket you would like to use for storing Terraform state files. Note: AWS S3 bucket names have to be unique and resolvable by DNS.Edit the
backend.tf
file- Uncomment the
bucket
variable in theterraform.backend.s3
section (bottom). - Set the value to the name of the S3 bucket in the previous step.
- IMPORTANT: The value must be a string. You cannot use a variable in this section, you must hardcode the bucket name.
- Uncomment the
Run Terraform:
terraform init # 1. Initialize your Terraform environment terraform validate # 2. Validate your Terraform configuration terraform plan --out=tfplan # 3. Create a Terraform plan of your deployment terraform apply tfplan # 4. Execute the Terraform plan (estimated time to deploy: 15-30 minutes)
Generate VPN Profiles
make run create-vpn-profiles # Create OpenVPN profiles to connect to your infrastructure
The OpenVPN profiles will be stored as
.zip
files in thepublish/
subdirectory.All systems have been deployed! They still have to be configured, however time to celebrate! 🍕 🎊 🎆
#
Configure Infrastructure with Ansible
For this round, all post deployment configuration was performed via Ansible.
Use one of the VPN profiles generated in the previous step. Any profile will work.
Use the Terraform Makefile to configure the Ansible deployment. The following command copies the SSH key to the Ansible setup directory with the proper permissions.
make ansible-setup
Change to Ansible base directory.
cd ../../ansible
Run Ansible configuration.
make configure-range-from-scratch
Wait. Enjoy a hot chocolate or other delicious beverage ☕. Ensure your provisioning host will not sleep or disconnect from the VPN during the provisioning step. Depending on bandwidth, the deployment could take 1-3 hours to fully configure all infrastructure.
#
Deploy Attack Platform Software
Clone the ATTACK Evaluations Library to the corsair
and spitfire
(Kali Linux and Windows Jumpbox hosts). Follow the instructions to setup the red team tooling.