Network diagram
Dual-VPC design
The two-VPC layout is a deliberate architectural decision, not just a networking convenience.- TeamServer VPC
- Redirector VPC
CIDR:
10.50.0.0/16 (default; configurable via vpc_cidr)The TeamServer VPC hosts all C2 servers, the Guacamole portal, and the Windows workstation. No C2 server has a public IP address — they are reachable only from within the VPC or from the Redirector VPC over VPC peering.Guacamole is the single publicly-accessible instance in this VPC. Its Elastic IP is the operator’s entry point for browser-based access to all lab machines.An optional dedicated VPC is created by default (use_default_vpc = false). If you hit the AWS VPC limit, set use_default_vpc = true to place the lab into your account’s default VPC instead.VPC peering
A single VPC peering connection links the two VPCs:- Route from Redirector VPC → TeamServer VPC (for proxied C2 callbacks)
- Route from TeamServer VPC → Redirector VPC (for internal connectivity and management)
EC2 instances
redStack deploys six EC2 instances across the two VPCs.TeamServer VPC instances
Mythic C2 server
Mythic C2 server
| Property | Value |
|---|---|
| Instance type | t3.medium (default) |
| AMI | Debian 12 (latest) |
| Public IP | None |
| EBS volume | 30 GB gp3, encrypted |
| Role tag | c2-backend |
/opt/Mythic with the Apollo agent and HTTP C2 profile pre-installed as Docker containers. The Mythic web UI is available internally on port 7443. Mythic auto-starts on boot by default (enable_mythic_autostart = true).The HTTP C2 port (80) on this instance is accessible only from the Redirector VPC CIDR (10.60.0.0/16) — not from the public internet.Sliver C2 server
Sliver C2 server
| Property | Value |
|---|---|
| Instance type | t3.small (default) |
| AMI | Debian 12 (latest) |
| Public IP | None |
| EBS volume | 20 GB gp3, encrypted |
| Role tag | c2-backend |
31337 (gRPC). A pre-generated C2 profile (redstack-c2-profile.json) with the correct X-Request-ID token is written to /home/admin/ during deployment — import it once per deployment with c2profiles import.Havoc C2 server
Havoc C2 server
| Property | Value |
|---|---|
| Instance type | t3.medium (default) |
| AMI | Debian 12 (latest) |
| Public IP | None |
| EBS volume | 20 GB gp3, encrypted |
| Role tag | c2-backend |
The Havoc build takes longer than other components. Wait at least 10 minutes after
terraform apply before connecting to the Havoc server or desktop.Guacamole server
Guacamole server
| Property | Value |
|---|---|
| Instance type | t3.small (default) |
| AMI | Debian 12 (latest) |
| Public IP | Elastic IP (persistent) |
| EBS volume | 20 GB gp3, encrypted |
| Role tag | operator-access |
https://<GUAC_ELASTIC_IP>/guacamole.When enable_external_vpn = true, Guacamole also serves as the WireGuard client and MASQUERADE gateway for routing internal lab traffic through the OpenVPN tunnel on the redirector.Windows operator workstation
Windows operator workstation
| Property | Value |
|---|---|
| Instance type | t3.medium (default) |
| AMI | Windows Server 2022 English Full Base (latest) |
| Public IP | None |
| EBS volume | 50 GB gp3, encrypted |
| Role tag | operator-workstation |
Mythic C2 (SSH), Sliver C2 (SSH), Havoc C2 (SSH), Apache Redirector (SSH), Guacamole Server (SSH)).The Windows Administrator password is generated by AWS and decrypted automatically using your SSH private key (ssh_private_key_path). It is included in terraform output deployment_info.Redirector VPC instance
Apache redirector
Apache redirector
| Property | Value |
|---|---|
| Instance type | t3.micro (default) |
| AMI | Debian 12 (latest) |
| Public IP | Elastic IP (persistent) |
| EBS volume | 20 GB gp3, encrypted |
| Role tag | c2-redirector |
mod_rewrite, mod_proxy, mod_proxy_http, mod_headers, and mod_ssl enabled. It is the only instance that accepts connections from the public internet on ports 80 and 443.SSH access (port 22) is restricted to localPub_ip only. HTTP/HTTPS is open to 0.0.0.0/0 for implant callbacks. All traffic from the TeamServer VPC CIDR is permitted for internal lab connectivity.Traffic flow
Operator access flow
C2 callback flow
URI prefix routing table
| URI prefix | Backend | Path forwarding |
|---|---|---|
/cdn/media/stream/ | Mythic | Prefix stripped before forwarding |
/cloud/storage/objects/ | Sliver | Prefix stripped before forwarding |
/edge/cache/assets/ | Havoc | Full path preserved (Havoc validates URI in listener config) |
URI prefixes are baked into implants at build time. Customize them with
mythic_uri_prefix, sliver_uri_prefix, and havoc_uri_prefix in terraform.tfvars before running terraform apply. Changing them after deployment requires rebuilding all payloads.Security design
IMDSv2 on all instances
Every EC2 instance enforces IMDSv2 (http_tokens = "required"). Requests to the instance metadata service must use the session-oriented token method — the older IMDSv1 path is blocked. This prevents SSRF attacks from abusing the metadata endpoint.
Encrypted EBS volumes
All root EBS volumes are encrypted at rest (encrypted = true). This applies to all six instances across both VPCs.
Security group rules
TeamServer VPC
- Mythic HTTP/HTTPS: Redirector VPC CIDR only (
10.60.0.0/16) - Sliver/Havoc: Internal VPC traffic only
- Guacamole: HTTPS from
localPub_ip; SSH fromlocalPub_ip - Windows: RDP from internal VPC only (via Guacamole)
- All instances: Full egress allowed
Redirector VPC
- Port 22 (SSH):
localPub_iponly - Port 80/443 (HTTP/HTTPS):
0.0.0.0/0(implant callbacks) - All traffic from TeamServer VPC CIDR (VPC peering traffic)
- Full egress allowed
Auto-generated credentials
All passwords are generated at deploy time by Terraform’srandom_password resource:
- Lab password — 16 characters, alphanumeric plus
-_.~!@, used for SSH and Guacamole admin access across all Linux instances - Windows Administrator password — generated by AWS, decrypted automatically using
ssh_private_key_path - C2 header token — 32-character hex token auto-generated by
random_idifc2_header_valueis not set
Hostname resolution
Terraform injects private IP addresses into the user data scripts for every instance. At boot, each machine writes the following entries to/etc/hosts (Linux) or C:\Windows\System32\drivers\etc\hosts (Windows):
OpenVPN mode (HTB / VulnLab / PG)
Whenenable_external_vpn = true, redStack adds a WireGuard tunnel between Guacamole and the redirector, and runs an OpenVPN client (ext-vpn.service) on the redirector.
source_dest_check is disabled on their ENIs to allow packet forwarding. The redirect-gateway option is filtered on the OpenVPN client to prevent it from overwriting the VPC peering routes that C2 callbacks depend on.
WireGuard keys are generated on Guacamole at boot — no pre-deployment key exchange is required.
Next steps
Prerequisites
Install the required tools and configure your AWS credentials before deploying.
Terraform variables
Review all configurable variables — VPC CIDRs, instance types, URI prefixes, and VPN settings.
Deploy
Run
terraform apply and bring the full lab online.Redirector security layers
Deep-dive into the three Apache security layers:
redirect.rules, header validation, and URI routing.