hunting-for-domain-fronting-c2-traffic
它能做什么
这个工具用于查找试图隐藏在知名网站(如内容分发网络 CDN)背后的可疑网络流量。它通过比对你的电脑在连接网站时发送的不同信息来实现这一点。
适用场景
- ✓当你怀疑有人在隐藏恶意通信时。
- ✓在检查网络日志、排查异常活动时。
- ✓检查你的安全工具能否捕获这类隐蔽流量时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-domain-fronting-c2-traffic/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我在代理日志中查找隐藏的流量。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具会比对安全连接(TLS/SSL)开始时发送的网站名称(SNI)与浏览器声明要访问的网站名称(Host 头)。如果两者不同,并且看起来是在借用一个合法网站来隐藏恶意网站,工具就会发出警报。
技术内容(原始 SKILL.md)
作者在 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.
常见问题
什么是“域前置”(domain fronting)?
这是攻击者用来伪装恶意软件的命令与控制(C2)流量的一种技术,让流量看起来像是访问某个合法的知名网站,例如 CDN 服务。
什么是 SNI 和 Host 头?
SNI(服务器名称指示)是浏览器在安全连接(TLS/SSL)开始时发送的信息,用来说明想访问哪个网站。Host 头则在稍后的 HTTP 通信中发送,同样表明要访问的网站。
为什么比对 SNI 和 Host 头很重要?
如果 SNI 指向 CDN 域名(如 `cdn.example.com`),而 Host 头指向另一个可疑域名(如 `malware.attacker.com`),这就是有人在利用“域前置”隐藏通信的强烈信号。
详情
作者的原始描述
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.
热度
- GitHub 星标
- 35k
- 排名
- #7959
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。