hunting-for-domain-fronting-c2-traffic

Detect domain fronting C2 traffic by comparing TLS SNI and HTTP Host headers in proxy logs.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill hunting-for-domain-fronting-c2-traffic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunting-for-domain-fronting-c2-traffic
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/threat-hunting/hunting-for-domain-fronting-c2-traffic
Command: npx skills add https://github.com/xalgord/xalgorix --skill hunting-for-domain-fronting-c2-traffic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyopenssl, cryptography.

What problem does it solve?

Attackers hide command-and-control traffic behind trusted CDN domains using domain fronting (MITRE ATT&CK T1090.004), making malicious connections look like legitimate CDN traffic. This Skill gives SOC analysts a structured hunt procedure to surface SNI versus Host header mismatches that reveal fronted C2 channels.

Core Features & Use Cases

  • SNI-Host Mismatch Detection: Parse proxy and secure web gateway logs to flag connections where the TLS SNI and HTTP Host header differ.
  • TLS Certificate Inspection: Use pyOpenSSL to extract certificate Subject and SAN fields and identify CDN providers via issuer and IP ranges.
  • Confidence Scoring & Reporting: Score alerts by domain reputation differential and output a JSON report with ATT&CK technique mapping.
  • Use Case: A SOC analyst suspects Cobalt Strike beacons are fronting through a CDN. Run this hunt against proxy logs to find connections where the SNI points to a high-reputation CDN domain but the Host header targets an attacker-controlled domain.

Quick Start

Hunt for domain fronting C2 traffic in my proxy logs by comparing SNI and Host headers and inspecting TLS certificates with pyOpenSSL.

Frequently Asked Questions about hunting-for-domain-fronting-c2-traffic

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect domain fronting C2 traffic in proxy logs?

Parse proxy or secure web gateway logs for connections containing both SNI and Host header fields, then flag mismatches where the SNI points to a high-reputation CDN domain but the Host header targets a different domain. Score alerts by domain reputation differential to reduce false positives.

How to inspect TLS certificates with pyOpenSSL for threat hunting?

Use pyOpenSSL to extract the certificate Subject and SAN fields from observed TLS connections, then correlate the issuer and destination IP against known CDN provider ranges such as CloudFront, Azure CDN, and Cloudflare to identify CDN-hosted fronting.

Does domain fronting detection work without TLS inspection?

No. Without TLS inspection on the proxy, the HTTP Host header is encrypted inside the TLS session and the SNI-Host mismatch is invisible, so the hunt silently produces zero findings. TLS inspection must be enabled for Host header visibility.

Why does SNI-based domain fronting detection fail with ECH?

Encrypted Client Hello (ECH) encrypts the SNI entirely, removing the SNI-versus-Host mismatch signal. In that case, pivot to JA3/JARM TLS fingerprinting combined with destination CDN IP and ASN reputation analysis.

What causes false positives in domain fronting detection?

Legitimate applications and CDNs sometimes split SNI and Host headers, and health-check or monitoring probes can trigger mismatch alerts. Tune by scoring on domain reputation differential rather than alerting on mismatch alone.