/cybersecurity-skills-zh:detecting-exfiltration-over-dns-with-zeekfrom cybersecurity-skills-zh
Detects DNS data exfiltration by analyzing Zeek dns.log for high-entropy subdomains and anomalous query patterns. Useful for threat hunting and network security monitoring.
Ships in cybersecurity-skills-zh. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
DNS 隧道与渗出(DNS tunneling/exfiltration)是攻击者绕过防火墙和 DLP(数据泄露防护)控制的技术,通过将窃取的数据编码到 DNS 查询的子域名中来实现。合法 DNS 查询的熵值和长度具有可预测的规律,而渗出查询的编码数据具有高香农熵(Shannon entropy)、异常长的子域名标签,以及每个父域名下大量唯一子域名。
本技能分析 Zeek dns.log 文件(TSV 格式)以检测渗出指标。智能体对每个子域名组件计算香农熵,识别超过 63 字符 DNS 标签限制的查询,统计每个父域名的唯一子域名数量,并标记超过可配置阈值的域名。这些技术可检测 dnscat2、iodine、dns2tcp 以及自定义 DNS 隧道工具。
解析 Zeek dns.log 头部:读取 TSV 文件,提取 #fields 头部行,确定 ts、id.orig_h、query、qtype_name、rcode_name 和 answers 的列位置。
提取并分解查询:对每个 DNS 查询,将 FQDN 拆分为子域名标签和父域名。跳过已知安全域名和内部区域的查询。
计算香农熵:计算每个子域名标签的信息熵。合法子域名的熵值通常低于 3.5,而编码/加密数据的熵值高于 4.0。
检测长标签:标记超过 52 字符的 DNS 标签(接近 63 字符上限)。长标签是数据隧道的强烈指标。
统计每域名唯一子域名数量:跟踪每个父域名收到的不同子域名数量。在日志窗口内超过 50 个唯一子域名的域名为可疑域名。
识别查询量异常:按源 IP 和域名计算每分钟查询数。渗出工具会产生持续的高频查询流,不同于正常的浏览行为。
评分并排名域名:将熵值、标签长度、唯一性数量和查询量合并为综合风险评分。按评分对域名排名并输出最可疑的域名。
生成检测报告:输出包含标记域名、证据指标、来源 IP 及建议响应操作的 JSON 报告。
{
"analysis_summary": {
"total_queries_analyzed": 145832,
"unique_domains": 3421,
"flagged_domains": 3,
"entropy_threshold": 3.5
},
"flagged_domains": [
{
"domain": "data.evil-c2.com",
"unique_subdomains": 892,
"avg_entropy": 4.72,
"max_label_length": 61,
"source_ips": ["10.0.1.45"],
"risk_score": 9.4,
"indicators": ["high_entropy", "long_labels", "high_subdomain_count"]
}
]
}
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub killvxk/cybersecurity-skills-zh --plugin cybersecurity-skills-zh735 skills in this plugin
/acquiring-disk-image-with-dd-and-dcfldd使用 dd 和 dcfldd 创建取证级逐位磁盘镜像,通过哈希验证保持证据完整性。/analyzing-active-directory-acl-abuse使用 ldap3 检测 Active Directory 中危险的 ACL 配置错误,识别 GenericAll、WriteDACL 和 WriteOwner 等滥用路径/analyzing-android-malware-with-apktool使用 apktool 进行反编译、jadx 恢复 Java 源码、androguard 进行权限分析,对 Android APK 恶意软件样本执行静态分析,包括清单检查和可疑 API 调用检测。Other plugins' skills for the same job