DeRF Deployment
Deployment Steps
- Complete Prerequisites see below.
- Complete System Requirements see below.
- Clone the Github repo to your local system.
- Deploy the DeRF via Terraform from the
./env-prod
directory.
Prerequisites
- Cloud Accounts:
- One AWS Account:
- This is your targeted AWS Account where attacks will run.
- TWO GCP Projects:
- Deployment Project: A Google Cloud Project which will house the DeRF
aws-proxy-app
- Target Project: A Google Cloud Project which will be the target of attack techniques.
- Deployment Project: A Google Cloud Project which will house the DeRF
- One AWS Account:
- Terraform Variables
- Fill out the values the
TEMPLATE.tfvars
file located in./env-prod
directory. - Rename this file to be
derf.tfvars
- Terraform Variables:
- aws_account_id: The Account ID to deploy the target AWS resources in.
- gcp_deployment_project_id: The ID of the GCP Project to deploy the DeRF Framework components. This value may consist of both letters and numbers but never numbers alone.
- gcp_derf_project_id: The ID of the GCP Project to deploy target resources. This value may consist of both letters and numbers but never numbers alone.
- Fill out the values the
- Backend Configuration
- Fill out the values the
TEMPLATE.conf
file located in./env-prod
directory. - Rename this file to be
derf.conf
- Why run Terraform with a remote backend?
- Running a remote backend to an encrypted S3 bucket is recommended as AWS Access Keys are generated during this
Terraform Apply
and will otherwise be retained locally in the state file. - Backend configuration values:
- bucket: Name of the S3 bucket to store remote Terraform State. This should minimally be SSE-S3 encrypted.
- Example: "my-bucket-002984"
- region: The region your backend bucket is located in.
- bucket: Name of the S3 bucket to store remote Terraform State. This should minimally be SSE-S3 encrypted.
- Fill out the values the
System Requirements
The DeRF has been tested verified with Terraform version 1.6.0
. In order to manage multiple versions of Terraform on your system, install tfenv
command line tool, allowing you to switch between different versions of terraform.
- Install
tfenv
- Install Terraform version 1.6.0
- Set version 1.6.0 as your default version
During deployment, the gcloud
cli is invoked to trigger Cloud Build and deploy the aws-proxy-app
to Cloud Run. As a result, gcloud
will need to be installed on your local system in order to deploy The DeRF.
Download and install the gcloud
cli per instructions located here.
Troubleshooting
If you already have Terraform on your system, you may need to unlink the cask with the following command before tfenv
will take over Terraform installation.