本文へスキップ
Skillpedia
分析とスプレッドシート35k · #7829

detecting-exfiltration-over-dns-with-zeek

できること

このツールはDNSログを分析し、盗まれたデータを隠している可能性のある不審な通信を見つけます。ドメイン名のパターンや問い合わせの量に普段と違う点がないかを調べ、攻撃の可能性を特定します。

使う場面

  • ✓インターネットを使ってDNS経由でデータが盗まれていないか調査するときに使います。
  • ✓攻撃の可能性がある不審なインターネット通信を確認するときに使います。
  • ✓ネットワークログから、隠れた悪意のある活動を見つけ出すときに使います。

スキルのリンク

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-exfiltration-over-dns-with-zeek/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-exfiltration-over-dns-with-zeek/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のDNSログを分析して、DNSクエリに隠されたデータを盗み出そうとする試みがないか教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールはDNSの記録を調べ、非常に長いドメイン名やランダムな文字の並び(高エントロピー)を探します。また、同じ送信元から送られた異なるクエリの数を数え、問い合わせの量が異常かどうかを確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Detecting Exfiltration over DNS with Zeek

Overview

DNS tunneling and exfiltration is a technique used by attackers to bypass firewalls and DLP controls by encoding stolen data into DNS query subdomains. Legitimate DNS queries have predictable entropy and length patterns, while exfiltration queries contain encoded data with high Shannon entropy, unusually long subdomain labels, and high volumes of unique subdomains per parent domain.

This skill analyzes Zeek dns.log files (TSV format) to detect exfiltration indicators. The agent computes Shannon entropy for each subdomain component, identifies queries exceeding the 63-character DNS label limit, counts unique subdomains per parent domain, and flags domains that exceed configurable thresholds. These techniques detect tools like dnscat2, iodine, dns2tcp, and custom DNS tunneling implementations.

When to Use

  • When investigating security incidents that require detecting exfiltration over dns with zeek
  • 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

  • Python 3.9 or later with math and collections modules (stdlib)
  • Zeek dns.log files in TSV format with standard field headers
  • Network capture data processed by Zeek 5.0+ or later
  • Understanding of DNS protocol structure and query types

Steps

  1. Parse Zeek dns.log headers: Read the TSV file, extract the #fields header line to identify column positions for ts, id.orig_h, query, qtype_name, rcode_name, and answers.

  2. Extract and decompose queries: For each DNS query, split the FQDN into subdomain labels and parent domain. Skip queries to known safe domains and internal zones.

  3. Compute Shannon entropy: Calculate the information entropy of each subdomain label. Legitimate subdomains typically have entropy below 3.5, while encoded/encrypted data produces entropy above 4.0.

  4. Detect long labels: Flag DNS labels exceeding 52 characters (approaching the 63-character maximum). Long labels are a strong indicator of data tunneling.

  5. Count unique subdomains per domain: Track how many distinct subdomains each parent domain receives. Domains with more than 50 unique subdomains within the log window are suspicious.

  6. Identify query volume anomalies: Calculate queries-per-minute per source IP per domain. Exfiltration tools generate sustained high-volume query streams that differ from normal browsing.

  7. Score and rank domains: Combine entropy, label length, uniqueness count, and query volume into a composite risk score. Rank domains by score and output the top suspicious domains.

  8. Generate detection report: Produce a JSON report with flagged domains, their evidence indicators, originating source IPs, and recommended response actions.

Expected Output

{
  "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"]
    }
  ]
}
よくある質問

この文脈での「エントロピー」とは何ですか?

ドメイン名がどれだけランダムで予測しにくいかを表す指標です。通常のドメイン名は予測しやすい一方、データを隠したものはよりランダムに見えます。

「DNSログ」とは何ですか?

Webサイト名(google.comなど)をコンピューターが理解できる数値のアドレスに変換する、インターネットの電話帳のようなものです。このツールは、その電話帳とのやり取りを分析します。

「データの持ち出し(data exfiltration)」とは何ですか?

システムやネットワークから情報を盗み出して外部に送信することです。検知を逃れるために偽装されることが多いです。

詳細

作者による元の説明

Detect DNS-based data exfiltration by analyzing Zeek dns.log for high-entropy subdomains, oversized TXT/NULL records, and anomalous query volume or patterns. Use when investigating suspected DNS tunneling, covert C2 over DNS, or data exfiltration hidden in DNS queries against network traffic captured by Zeek.

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#7829
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル