Skip to content
Misconfiguration Write-up Intermediate

Domain Fronting Via Cloudfront Alternate Domains

The write-up shows that any domain with a CNAME record pointing to a CloudFront distribution can be used as a front for command-and-control traffic, because the TLS SNI can name a reputable domain while the Host header names the attacker's distribution. An attacker could therefore send beacon traffic through high-reputation domains and evade proxy categorisation and network monitoring.

mdsec.co.uk

Published on mdsec.co.uk

Our best in class red team can deliver a holistic cyber attack simulation to provide a true evaluation of your organisation’s cyber resilience.](https://www.mdsec.co.uk/our-services/adversary-simulation/) - [{{media:1}}

Admin, on mdsec.co.uk

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the CDN routes requests by the inner Host header while network filters only see the outer TLS server name, so the two can disagree.

Impact

Traffic could reach attacker infrastructure through reputable domains, evading proxy categorisation; however, an RFC-compliant proxy that rewrites the Host header, or TLS interception, blocks the technique, though the Sophos gateway tested did not rewrite it.

What the attacker needed

Attacker-controlled CloudFront distribution; a domain with a CNAME to CloudFront; proxy that does not rewrite Host header

How it was found

  1. Find domains whose CNAME records point to the CloudFront CDN, for example through search dorks or DNS bruteforcing.
  2. Confirm the CNAME is set for a chosen domain.
  3. Point a CloudFront distribution at the attacker's server and retrieve a test file through the fronted domain.
  4. Use the fronted domain inside a Cobalt Strike beacon profile for egress.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Domain fronting hides the real destination of a connection behind a large shared content delivery network. The connection looks like it is going to a trusted site, but an inner header tells the CDN to forward it to the attacker's server. This lets malicious traffic slip past filters that only judge a connection by the domain name.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.