Domains & Upstream#

Each hostname served by InfraGuard has a corresponding domains.<hostname> block that defines where legitimate traffic is proxied and how the domain behaves.

Schema#

domains:
  cdn.example.com:
    upstream: "${CS_UPSTREAM}"          # backend URL
    profile_path: "profiles/my.profile" # optional: C2/phishing profile file
    profile_type: "cobalt_strike"       # profile parser to use

    drop_action:
      type: "redirect"                  # redirect | proxy | static | 404
      target: "https://jquery.com"

    allowed_paths:                      # optional: restrict to these paths only
      - "/jquery-3.7.1.min.js"
      - "/cdn-cgi/*"
      - "~^/[a-z]{8}$"                  # regex (prefix with ~)

    content_routes: []                  # payload delivery routes (see Payload Delivery)

profile_type Values#

ValueParserProfile file required
cobalt_strikeMalleable C2Yes — .profile
mythicMythic HTTPXYes — .json
brute_ratelBRC4 config JSONYes — .json
sliverSliver HTTP configYes — .yaml
havocHavoc listener YAMLYes — .yaml
nighthawkNighthawk listener JSONYes — .json
poshc2PoshC2 config YAMLYes — .yaml
gophishBuilt-in GoPhish patternsNo
evilginxOptional phishlet YAMLOptional
cuddlephishBuilt-in OAuth patternsNo
phishing_clubBuilt-in passthroughNo
passthroughNo profile filteringNo

drop_action Types#

TypeBehavior
redirectHTTP 302 to target URL
proxySilently proxy to target (mimics the cover site)
staticServe a static HTML file at target path
404Return 404 with no body

Path Restriction with allowed_paths#

When allowed_paths is set, requests to any path not matched are treated as if they failed filtering (score += drop_score). This prevents enumeration of backend paths.

allowed_paths:
  - "/track/*"            # glob: matches /track/abc, /track/abc/def
  - "/submit"             # exact match
  - "~^/t/[a-f0-9]{16}$" # regex (prefix with ~): 16-char hex ID

Patterns are evaluated in order; first match wins.

campaign_token (Phishing Domains)#

Gate phishing pages behind a per-campaign token embedded in email links:

campaign_token:
  enabled: true
  token_param: "t"            # ?t=<token> in the email link
  tokens:
    - "${CAMPAIGN_TOKEN_Q1}"
    - "${CAMPAIGN_TOKEN_Q2}"
  # HMAC alternative — rotate token without config change:
  # hmac_secret: "${CAMPAIGN_HMAC_SECRET}"
  # hmac_ttl_seconds: 604800
  score_on_missing: 0.8       # score added when ?t= is absent

Analysts who discover the URL via CT logs or threat feeds cannot load the page without the token.