hunting-for-domain-fronting-c2-traffic
What it does
This tool looks for suspicious internet traffic that tries to hide behind well-known websites, like content delivery networks (CDNs). It does this by comparing different pieces of information your computer sends when connecting to a site.
When to use it
- ✓When you suspect someone is hiding malicious communication.
- ✓While investigating network logs for unusual activity.
- ✓To check if your security tools are catching this type of hidden traffic.
Skill link
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-domain-fronting-c2-traffic/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Hunt for hidden traffic in our proxy logs.”
5 new skills a week. 1 minute to read.
How it works
The tool compares the website name sent at the start of a secure connection (SNI) with the website name your browser says it's accessing (Host header). If they are different and seem to be using a legitimate site to hide a malicious one, it raises an alert.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Hunting 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.
FAQ
What is 'domain fronting'?
It's a technique used by attackers to disguise command-and-control (C2) traffic from malware, making it look like it's going to a legitimate, well-known website, such as a CDN service.
What are 'SNI' and 'Host header'?
SNI (Server Name Indication) is information your browser sends at the beginning of a secure connection (TLS/SSL) to say which website it wants to reach. The Host header is sent a bit later, within the HTTP communication, and also indicates the desired website.
Why is comparing SNI and Host header important?
If the SNI points to a CDN domain (like `cdn.example.com`) and the Host header points to a different, suspicious domain (like `malware.attacker.com`), it's a strong sign that someone is trying to use 'domain fronting' to hide communication.
Details
Original description by the author
Detects domain fronting C2 traffic by analyzing SNI-vs-HTTP-Host-header mismatches in proxy logs and inspecting TLS certificate discrepancies with pyOpenSSL. Use when hunting for command-and-control traffic hidden behind legitimate CDN domains, or when investigating proxy/TLS logs for signs of domain fronting evasion.
Popularity
- GitHub stars
- 35k
- Ranking position
- #7959
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
35kGives your AI agent ready-made instructions for a specific task, so it does it better and faster.
abusing-shadow-credentials-for-privesc
35kTeaches your AI agent to write clear, well-structured text.
achieving-cmmc-level-2-compliance
35kHelps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
acquiring-disk-image-with-dd-and-dcfldd
35kHelps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.