Every request that reaches the Apache redirector passes through three sequential security layers. A request must clear all three to reach a C2 backend. Requests that fail at any layer receive the CloudEdge CDN decoy page or aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/BaddKharma/redStack/llms.txt
Use this file to discover all available pages before exploring further.
403 Forbidden response — they are never proxied to Mythic, Sliver, or Havoc.
Layer 1 — redirect.rules (scanner blocking)
/etc/apache2/redirect.rules is included in both the HTTP and HTTPS VirtualHosts:
RewriteCond directives that match requests from known AV vendors, security scanner IP ranges, and TOR exit nodes.
Modifications from the original
| Change | Reason |
|---|---|
All 302 redirects replaced with 403 Forbidden | Avoids redirect chains that could leak your actual C2 domain |
Setup directives stripped (Define REDIR_TARGET, RewriteEngine On, RewriteOptions Inherit) | These conflict with the VirtualHost-level configuration already in place |
| AWS and Azure IP blocks commented out | Those ranges include your own C2 server IPs. Leaving them active would block legitimate callbacks from AWS-hosted implant targets |
Check the installed rule count
Update redirect.rules manually
The file is downloaded once at instance boot. To pull the latest version at any time:Scanner blocking is controlled by the
enable_redirector_htaccess_filtering Terraform variable. It defaults to true (enabled) and is automatically set to false in closed-environment mode (HTB/VL/PG). In closed mode, redirect.rules is replaced with a comment-only placeholder and no IP blocking is applied.Layer 2 — header validation
Requests that pass scanner blocking must include a specific HTTP header with the correct token. Without it, Apache falls through to theDocumentRoot (/var/www/html/decoy/) and serves the CloudEdge CDN maintenance page.
Header configuration
| Setting | Default | Terraform variable |
|---|---|---|
| Header name | X-Request-ID | c2_header_name |
| Token value | Auto-generated at deploy time | c2_header_value (leave empty to auto-generate) |
How it works in Apache
Each proxy rule in both VirtualHosts is conditional on the header:RewriteRule is skipped. With no matching rule, the request falls through to the decoy page. The check is repeated independently for each C2 backend.
Testing header validation
Layer 3 — URI prefix routing
A request with a valid header is routed to the C2 backend whose URI prefix matches the request path. Each framework uses a distinct CDN-style prefix to blend in with normal web traffic.Default URI prefix table
| URI prefix | Backend | Terraform variable | How the path is forwarded |
|---|---|---|---|
/cdn/media/stream/ | Mythic | mythic_uri_prefix | Prefix stripped — Mythic receives the remainder |
/cloud/storage/objects/ | Sliver | sliver_uri_prefix | Prefix stripped — Sliver receives the remainder |
/edge/cache/assets/ | Havoc | havoc_uri_prefix | Full path preserved — Havoc receives /edge/cache/assets/... |
Mythic and Sliver — prefix stripped
For Mythic and Sliver, Apache strips the URI prefix before forwarding:/cdn/media/stream/update reaches Mythic as a POST to /update.
