Communitygithub.com

インシデント対応のためのネットワークトラフィック分析

セキュリティインシデント発生時に、ネットワークトラフィックキャプチャとフローデータを分析し、攻撃者の活動を特定します。

インシデント対応のためのネットワークトラフィック分析 とは?

このスキルは、セキュリティインシデント対応において、パケットキャプチャ(PCAP)やフローデータ(NetFlow/IPFIX)、Zeekログなどのネットワーク証跡を分析し、攻撃者の活動を特定・追跡するための実践的な手法を提供します。C2通信のビーコン検出、横方向移動の追跡、データ窃取の定量化など、インシデント対応に不可欠なネットワークフォレンジックを体系的に実施できます。Wireshark、Zeek、Arkimeなどの主要なネットワーク分析ツールの具体的なコマンドやフィルタ例が豊富に含まれており、実戦で即座に活用できる点が特徴です。また、最終的な調査結果を構造化されたレポートとして出力するためのテンプレートも提供しており、インシデント対応チームが一貫性のある分析と報告を行うための基盤となります。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-network-traffic-for-incidents

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

インシデント対応のためのネットワークトラフィック分析 は何をしますか?

使用すべきケース

  • SIEMが異常なネットワークトラフィックパターンをアラートし、より深い調査が必要な場合
  • C2ビーコンが疑われ、パケットレベルでの確認が必要な場合
  • データ窃取の量や送信先をネットワーク証拠から定量化する必要がある場合
  • システム間の横方向移動をネットワーク接続から追跡する必要がある場合
  • IDS/IPSアラートをパケットレベルで検証し、確認または却下する必要がある場合

使用すべきでないケース: ホストベースのフォレンジック分析(プロセス実行、ファイルシステムアーティファクト)には使用しないでください。代わりにエンドポイントフォレンジックツールを使用してください。

前提条件

  • フルパケットキャプチャ(PCAP)インフラストラクチャ、またはオンデマンドキャプチャ機能(ネットワークタップ、SPANポート)
  • 分析ワークステーションにWiresharkがインストールされ、適切な表示フィルタに関する知識があること
  • ネットワークメタデータ生成のためのZeek(旧Bro)がデプロイされていること(conn.log、dns.log、http.log、ssl.log)
  • ネットワークデバイスからのNetFlow/IPFIX収集によるトラフィックフロー分析
  • VLAN構成、ファイアウォール配置、監視ポイントを示すネットワークアーキテクチャ図
  • 観測されたネットワーク指標を関連付けるための脅威インテリジェンスフィード

ワークフロー

ステップ1: ネットワークトラフィックのキャプチャまたは取得

調査に関連するトラフィックデータを入手します。

ライブキャプチャ(インシデントが継続中の場合):

# 特定ホストでフィルタリングしてインターフェースをキャプチャ
tcpdump -i eth0 -w capture.pcap host 10.1.5.42

# 特定の外部IPへのC2トラフィックをキャプチャ
tcpdump -i eth0 -w c2_traffic.pcap host 185.220.101.42

# ローテーション付きキャプチャ(1GBファイル、10個保持)
tcpdump -i eth0 -w capture_%Y%m%d%H%M.pcap -C 1000 -W 10

既存のインフラから:

  • フルパケットキャプチャアプライアンス(Arkime/Moloch、ExtraHop、Corelight)からPCAPをエクスポート
  • 調査期間のZeekログをZeekクラスタから取得
  • ネットワークデバイスからNetFlowデータをエクスポートし、高レベルなトラフィック分析を実施

ステップ2: C2通信の特定

コマンド&コントロールトラフィックパターンを検出します。

ビーコン検出(Zeek conn.log):

# 定期的な間隔で外部IPへの接続を抽出
cat conn.log | zeek-cut ts id.orig_h id.resp_h id.resp_p duration orig_bytes resp_bytes \
  | awk '$4 ~ /^185\.220/' | sort -t. -k1,1n -k2,2n

Wiresharkビーコン分析:

# 疑わしいC2 IPへのトラフィックでフィルタ
ip.addr == 185.220.101.42

# 非標準ポートへのHTTPSトラフィック
udp.port != 443 && ssl

# 不審なドメインへのDNSクエリ
ip.dst == 185.220.101.42

特定すべきビーコンの特性:

  • 接続間の一定の時間間隔(例:10~15%のジッターを含む60秒ごと)
  • リクエストとレスポンスのパケットサイズが一貫している
  • 正当なCDNやサービスに関連しない外部IPへのHTTPS
  • 高エントロピーなサブドメインを含むDNSクエリ(DNSトンネリングの兆候)

ステップ3: 横方向移動トラフィックの分析

内部システム間での攻撃者の移動を追跡します。

横方向移動検出の主要プロトコル:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SMB (TCP 445):     PsExec、ファイル共有アクセス、ランサムウェア拡散
RDP (TCP 3389):    リモートデスクトップセッション
WinRM (TCP 5985):  PowerShellリモート処理
WMI  (TCP 135):    リモートコマンド実行
SSH  (TCP 22):     Linuxの横方向移動
DCE/RPC (TCP 135): DCOMベースの横方向移動

Wiresharkフィルタ(横方向移動):

# SMB横方向移動
smb2 && ip.src == 10.1.5.42 && ip.dst != 10.1.5.42

# 侵害されたホストからのRDP接続
ip.dst == 10.1.5.42 && tcp.dstport == 3389

# Kerberosチケットリクエスト(Pass-the-Ticketの可能性)
kerberos.msg_type == 12 && ip.src == 10.1.5.42

# NTLM認証(Pass-the-Hashの可能性)
ntlmssp.auth.username && ip.src == 10.1.5.42

ステップ4: データ窃取の検出

ネットワーク外への不正なデータ転送を特定します。

# Zeek conn.logで大規模な送信転送を特定
cat conn.log | zeek-cut ts id.orig_h id.resp_h id.resp_p orig_bytes \
  | awk '$5 > 100000000' | sort -t$'\t' -k5 -rn

# DNSトンネリング検出(大量のTXTクエリ)
cat dns.log | zeek-cut query qtype | grep TXT | cut -f1 \
  | rev | cut -d. -f1,2 | rev | sort | uniq -c | sort -rn | head

# 異常なプロトコル使用(ICMPトンネリング、DNS over HTTPS)
cat conn.log | zeek-cut proto id.resp_p orig_bytes | awk '$1 == "icmp" && $3 > 1000'

Wiresharkフィルタ(データ窃取):

# 大規模なHTTP POSTアップロード
http.request.method == "POST" && tcp.len > 10000

# FTPデータ転送
ftp-data && ip.src == 10.0.0.0/8

# 大きなTXTレスポンスを含むDNS(トンネリング)
dns.resp.type == 16 && dns.resp.len > 200

ステップ5: IOCの抽出と関連付け

トラフィック分析からネットワークベースの指標を抽出します。

  • 侵害されたホストが接続した外部IPアドレス
  • インシデント期間中にDNS解決されたドメイン
  • HTTP/HTTPS経由でアクセスされたURL(SSLインスペクションが有効な場合)
  • TLS証明書の詳細(サブジェクト、発行者、シリアル番号、JA3/JA3Sハッシュ)
  • HTTPリクエストからのUser-Agent文字列
  • PCAP内でキャプチャされたファイル転送(WiresharkのExport Objects機能を使用して抽出)

ステップ6: ネットワークフォレンジック調査結果の文書化

分析結果を証拠参照付きの構造化レポートにまとめます。

  • 各調査結果について、特定のPCAPファイル、フレーム番号、タイムスタンプを参照
  • 主要な証拠のパケットキャプチャをスクリーンショットまたはエクスポートPDFとして含める
  • ネットワークアクティビティをインシデントタイムラインにマッピング
  • ネットワーク調査結果をエンドポイントフォレンジックからのホストベースの証拠と関連付ける

主要概念

用語定義
PCAP(パケットキャプチャ)ネットワークインターフェースからキャプチャした生のネットワークパケットを格納するファイル形式。オフライン分析に使用。
ビーコン侵害されたホストからC2サーバへの定期的なネットワーク接続。一貫したタイミング間隔で識別可能。
JA3/JA3SClientHelloおよびServerHelloパラメータに基づくTLSクライアントおよびサーバーのフィンガープリンティング手法。アプリケーションごとに一意。
NetFlow/IPFIXルーターやスイッチが収集するネットワークトラフィックメタデータ(送信元、宛先、ポート、バイト数、期間)。フルパケットキャプチャなしで利用可能。
DNSトンネリングDNSクエリとレスポンスにデータをエンコードして、データ窃取やC2通信をDNSプロトコル経由で行う技術。
ネットワークタップネットワークパフォーマンスに影響を与えずに監視用にネットワークトラフィックの正確なコピーを作成するハードウェアデバイス。
ZeekログZeekネットワーク分析フレームワークが生成する構造化メタデータログ。接続、DNS、HTTP、SSLなどをカバー。

ツールとシステム

  • Wireshark: パケットレベルでネットワークプロトコルを詳細に検査するためのオープンソースパケットアナライザ。
  • Zeek(旧Bro): ライブまたはキャプチャされたトラフィックから構造化メタデータログを生成するネットワーク分析フレームワーク。
  • Arkime(旧Moloch): 大規模ネットワークフォレンジックのためのオープンソースのフルパケットキャプチャおよび検索プラットフォーム。
  • NetworkMiner: PCAPファイルからファイル、画像、認証情報を抽出するためのネットワークフォレンジック分析ツール。
  • RITA(Real Intelligence Threat Analytics): Zeekログ用のオープンソースビーコン検出およびDNSトンネリング分析ツール。

一般的なシナリオ

シナリオ: C2ビーコンの確認とデータ窃取量の定量化

背景: EDRがワークステーション上で不審なプロセスを検出したが、窃取されたデータ量を特定できない。ネットワークチームがインシデント期間をカバーするフルパケットキャプチャアプライアンスからPCAPを提供。

アプローチ:

  1. 侵害されたホストIPから外部宛先へのトラフィックでPCAPをフィルタリング
  2. 接続タイミングパターンの分析によりC2チャネルを特定(ビーコン検出)
  3. C2接続からTLS証明書とJA3ハッシュを抽出し、IOCを生成
  4. インシデント期間中のC2インフラへの総転送バイト数を計算
  5. 追加のデータ窃取チャネル(DNSトンネリング、クラウドストレージアップロード)を確認
  6. WiresharkのExport Objects機能を使用して、キャプチャされた暗号化されていないファイルを抽出

落とし穴:

  • SSLインスペクションなしでC2がHTTPS経由で動作している場合に、HTTPトラフィックのみを分析してしまう
  • クエリあたりのデータ量が少ないためDNSトンネリングを見逃す(ただし時間経過とともに総量は大きい)
  • ネットワークタイムスタンプとエンドポイントタイムスタンプを関連付けない(タイムゾーンの不一致)
  • データ窃取に悪用される正当なクラウドサービス(OneDrive、Google Drive、Dropbox)を見落とす

出力形式

ネットワークトラフィック分析レポート
=================================
インシデント:         INC-2025-1547
分析者:               [氏名]
キャプチャソース:     Arkime フルパケットキャプチャ
分析期間:             2025-11-15 14:00 UTC - 2025-11-15 18:00 UTC
総PCAPサイズ:         4.7 GB

C2通信
送信元:               10.1.5.42 (WKSTN-042)
宛先:                 185.220.101.42:443 (HTTPS)
ビーコン間隔:         60秒 ± 12% ジッター
セッション数:         4時間で237接続
JA3ハッシュ:          a0e9f5d64349fb13191bc781f81f42e1
TLS証明書:            CN=update.evil[.]com (自己署名)
総送信データ:         147 MB (送信)
総受信データ:         2.3 MB (受信 - コマンド)

横方向移動
10.1.5.42 → 10.1.10.15 (SMB, TCP 445) - 14:35 UTC
10.1.5.42 → 10.1.10.20 (RDP, TCP 3389) - 14:42 UTC
10.1.5.42 → 10.1.1.5  (LDAP, TCP 389) - 15:10 UTC

データ窃取サマリー
プロトコル:           C2サーバへのHTTPS
容量:                 147 MB 送信
期間:                 14:23 UTC - 18:00 UTC
抽出されたファイル:   [暗号化されていないチャネルから復元可能な場合にリスト]

DNS分析
不審なクエリ:         0件のDNSトンネリング兆候
DGA検出:              0件のアルゴリズム生成ドメイン

証拠参照
PCAPファイル:        INC-2025-1547_capture.pcap (SHA-256: ...)
Zeekログ:            /logs/zeek/2025-11-15/ (conn.log, ssl.log, dns.log)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

関連スキル