hunting-for-domain-fronting-c2-traffic
About hunting-for-domain-fronting-c2-traffic
A security-hunting skill for identifying domain-fronting C2 traffic in proxy and web gateway logs. It combines SNI and Host mismatches with certificate and CDN details to produce structured indicators.
Key features
- 01Parse proxy logs for SNI and Host fields
- 02Find SNI-Host mismatches
- 03Inspect TLS certificate details
- 04Identify CDN providers from certificates and IP ranges
- 05Score alerts by domain reputation difference
Use cases
- 01Investigate suspected domain-fronting activity
- 02Develop detection rules and threat-hunting queries
- 03Assess monitoring coverage for related techniques
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ mukul975/ anthropic-cybersecurity-skills --skill hunting-for-domain-fronting-c2-trafficAfter installing, type/hunting-for-domain-fronting-c2-trafficin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
LICENSEreferences/api-reference.mdscripts/agent.pyDetails
From the project READMEHunting for Domain Fronting C2 Traffic
Overview
Domain fronting (MITRE ATT&CK T1090.004) is a technique where attackers use different domain names in the TLS SNI field and the HTTP Host header to disguise C2 traffic behind legitimate CDN-hosted domains. This skill detects domain fronting by parsing proxy/web gateway logs for SNI-Host header mismatches, analyzing TLS certificates for CDN provider identification, flagging connections where the SNI points to a high-reputation domain but the Host header targets an attacker-controlled domain, and correlating with known CDN provider IP ranges.
When to Use
- When investigating security incidents that require hunting for domain fronting c2 traffic
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Web proxy or secure web gateway logs with SNI and Host header fields
- Python 3.8+ with pyOpenSSL and cryptography libraries
- TLS inspection enabled on proxy for Host header visibility
- CDN provider IP range lists (CloudFront, Azure CDN, Cloudflare)
Steps
- Parse proxy logs for connections with both SNI and Host header fields
- Compare SNI domain against HTTP Host header for mismatches
- Extract TLS certificate Subject and SAN fields using pyOpenSSL
- Identify CDN-hosted connections via certificate issuer and IP ranges
- Flag high-confidence domain fronting where SNI and Host differ on CDN IPs
- Score alerts based on domain reputation differential
- Generate detection report with network flow context
Expected Output
JSON report containing detected domain fronting indicators with SNI-Host pairs, certificate details, CDN provider identification, confidence scores, and MITRE ATT&CK technique mapping.