Incident Response & Digital Forensics について
インシデント対応とデジタルフォレンジックに取り組むセキュリティチーム向けの Claude スキルです。NIST SP 800-61 と SANS PICERL に沿って、対応手順、証拠収集、タイムライン分析、メモリ解析、事後報告を支援します。
主な機能
- 01インシデント対応手順書の作成
- 02証拠収集と保全記録
- 03フォレンジックタイムラインの作成
- 04Volatility 出力の解釈
- 05事後レポートの作成
活用シーン
- 01ランサムウェア対応手順書の準備
- 02フォレンジック証拠収集の記録
- 03ログや痕跡からタイムラインを作成
- 04インシデント報告用の調査結果整理
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ masriyan/ claude-code-cybersecurity-skill --skill incident-response-&-digital-forensicsインストール後、Claude Code で/incident-response-&-digital-forensicsを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
examples/example_usage.mdscripts/evidence_collector.pytimeline_builder.py詳細
インシデント対応とデジタルフォレンジック
目的
NIST SP 800-61 および SANS PICERL フレームワークに沿った、体系的なインシデント対応業務を Claude が支援できるようにします。Claude は IR プレイブックを生成し、証拠保全の連鎖を維持しながら証拠収集をガイドし、フォレンジックタイムラインを構築し、メモリフォレンジックの出力を解釈し、インシデント後のレポートを作成します。
アクティベーショントリガー
ユーザーが以下について尋ねると、このスキルが有効になります。
- インシデント対応プレイブックの作成(ランサムウェア、フィッシング、侵害など)
- 証拠収集と証拠保全の連鎖手順
- ログやアーティファクトからのフォレンジックタイムラインの構築
- Volatility を使用したメモリフォレンジック
- インシデント後レポートの作成
- DFIR(デジタルフォレンジックとインシデント対応)手順
- 封じ込めと根絶の戦略
- セキュリティインシデントの根本原因分析
- IR 指標、SLA の追跡、または経営層向けレポート
前提条件
pip install pyyaml jinja2 pandas python-dateutil
推奨 DFIR ツール:
Volatility 3— メモリフォレンジックフレームワークAutopsy / Sleuth Kit— ディスクフォレンジックplaso / log2timeline— スーパータイムラインの生成KAPE— 証拠収集(Windows)Velociraptor— エンタープライズ規模のエンドポイントフォレンジックFTK Imager— フォレンジックイメージの取得(Windows)dd / dcfldd / dc3dd— ディスクイメージの取得(Linux)
PICERL フレームワークの概要
すべての IR 対応は、PICERL のライフサイクルに従います。
| フェーズ | 主なアクション | スキルの出力 |
|---|---|---|
| Preparation | ツール、通信手段、アクセス権を確認する | 準備状況チェックリスト |
| Identification | インシデント、範囲、重大度を確認する | インシデントの分類 |
| Containment | システムを隔離し、拡大を防ぐ | 封じ込めアクションの一覧 |
| Eradication | 脅威を除去し、アクセスを遮断する | 根絶チェックリスト |
| Recovery | システムを復旧し、完全性を確認する | 復旧ランブック |
| Lessons Learned | インシデント後のレビュー | IR レポート+改善点 |
主な機能
1. IR プレイブックの作成
特定のインシデント種別に対応するプレイブックの作成をユーザーが求めた場合:
Claude は、役割を割り当てた詳細なプレイブックを以下の構成で生成します。
ランサムウェア対応プレイブック(例):
# IR Playbook: Ransomware Attack
Version: 2.0 | Owner: SOC Manager | Review: Quarterly
## Trigger Conditions
- Multiple encrypted files discovered (ransom extension detected)
- Ransom note found on file shares or desktop
- EDR alert for mass file modification activity
- User reports files inaccessible with unfamiliar extensions
## Severity Classification
- CRITICAL: Domain controller / backup infrastructure affected
- HIGH: Production servers / business-critical data affected
- MEDIUM: Isolated workstation, contained environment
---
## Phase 1: Identification (Target: 15 minutes)
**IR Lead:**
- [ ] Confirm incident is ransomware (verify encrypted files + ransom note)
- [ ] Determine initial infection vector (phishing? RDP? Supply chain?)
- [ ] Identify Patient Zero — first encrypted system
- [ ] Assess scope: How many systems? Which business units?
- [ ] Declare incident severity and notify stakeholders
- [ ] Open incident ticket and begin documentation
**Forensics:**
- [ ] DO NOT REBOOT infected systems (preserve volatile evidence)
- [ ] Capture memory dump: `winpmem_mini_x64_rc2.exe output.raw`
- [ ] Collect running processes: `tasklist /v > processes.txt`
- [ ] Collect network connections: `netstat -ano > netstat.txt`
## Phase 2: Containment (Target: 30 minutes)
**Network Team:**
- [ ] Isolate affected systems (pull network cable or quarantine in VLAN)
- [ ] Block identified C2 IPs/domains at perimeter firewall
- [ ] Disable RDP externally if RDP was the initial vector
- [ ] Preserve network capture if encryption is still occurring
**Active Directory:**
- [ ] Identify all accounts used by the ransomware (service accounts, domain accounts)
- [ ] Reset passwords for all potentially compromised accounts
- [ ] Revoke active sessions for affected accounts
- [ ] Check for newly created privileged accounts
## Phase 3: Eradication
- [ ] Identify all persistence mechanisms (registry, services, scheduled tasks)
- [ ] Remove all malicious artifacts
- [ ] Verify no backdoors remain (check with Autoruns, process scanning)
- [ ] Patch the exploited vulnerability if one was used
## Phase 4: Recovery
- [ ] Restore from clean backup (verified pre-infection)
- [ ] Validate backup integrity before restoration
- [ ] Rebuild from gold image if backup compromised
- [ ] Verify data integrity after restoration
- [ ] Phased return to production
## Phase 5: Lessons Learned (Within 2 weeks)
- [ ] Full incident timeline documented
- [ ] Root cause identified and remediated
- [ ] Detection gaps addressed
- [ ] CSOC playbook updated
- [ ] Management report delivered
その他、対応しているプレイブックの種類:
- フィッシングキャンペーンへの対応
- データ侵害/持ち出し
- ビジネスメール詐欺(BEC)
- 内部脅威
- DDoS 攻撃
- アカウント侵害/パスワードスプレー
- サプライチェーン侵害
- クラウドの設定ミス/侵害
2. 証拠収集と証拠保全の連鎖
ユーザーがフォレンジック証拠の収集を求めた場合:
揮発性の順序(最も揮発性が高いもの → 最も低いもの):
1. CPU registers and cache
2. Routing tables, ARP cache, process table
3. Memory (RAM) — ALWAYS capture first
4. Temporary file systems, swap space
5. Running processes and open files
6. Network connections and open ports
7. Disk images
8. Log files (local + remote SIEM)
9. Physical media
証拠収集コマンド:
# Windows — Live acquisition
winpmem_mini_x64_rc2.exe memory.raw # Memory dump
tasklist /svc > processes.txt # Running processes
netstat -ano > connections.txt # Network connections
wmic process get caption,processid,parentprocessid,commandline > process_full.txt
reg export HKLM reg_hklm.reg # Registry
dir /s /a "C:\Users\*\AppData\Roaming\*" > appdata.txt
# Linux — Live acquisition
sudo avml /tmp/memory.lime # Memory dump (avml)
ps auxf > processes.txt # Process tree
netstat -tulnap > connections.txt # Network connections
cat /proc/*/cmdline | strings > process_cmdlines.txt
ls -la /tmp/ /var/tmp/ /dev/shm/ > temp_dirs.txt
crontab -l -u root > crontabs.txt
find / -mtime -7 -type f > recently_modified.txt # Modified in last 7 days
証拠保全の連鎖テンプレート:
## Evidence Chain of Custody Form
| Field | Value |
|-------|-------|
| Evidence ID | IR-2025-001-E01 |
| Incident ID | IR-2025-001 |
| Description | Memory dump from HOSTNAME (192.168.1.100) |
| Collected by | [Analyst Name] |
| Collection time | 2025-05-28 14:30 UTC |
| Collection method | winpmem_mini_x64_rc2.exe |
| MD5 hash | [hash of evidence file] |
| SHA256 hash | [hash of evidence file] |
| Storage location | \nas\ir\IR-2025-001\evidence\ |
| Chain of custody | Analyst → Evidence Locker → Lab |
**Access Log:**
| Date/Time | Person | Purpose | Signature |
|-----------|--------|---------|-----------|
| 2025-05-28 14:30 | [Analyst] | Initial collection | [Sig] |
3. フォレンジックタイムライン分析
ユーザーがインシデントタイムラインの作成を求めた場合:
-
利用可能なすべてのソースからタイムスタンプを収集します。
- Windows イベントログ(セキュリティ、システム、アプリケーション、PowerShell)
- Web サーバーのアクセスログ
- ファイアウォール/プロキシログ
- メールサーバーのログ(配信、開封確認)
- ファイルシステムのタイムスタンプ(変更、アクセス、属性変更、作成)
- レジストリの LastWrite タイムスタンプ
- Prefetch のタイムスタンプ(実行の証拠)
-
UTC に正規化します — 変換前にシステムのタイムゾーンを確認します
-
スーパータイムラインを生成します。
python scripts/timeline_builder.py --logs ./collected_logs/ --output timeline.csv python scripts/timeline_builder.py --logs ./logs/ --format html --start "2025-05-20" --end "2025-05-28" -
キルチェーンの進行を特定します。
## Incident Timeline — [Incident ID]
[T-72h] 2025-05-25 09:15 UTC — DELIVERY
Phishing email received: "Invoice_May2025.pdf.exe" from spoofed sender
Mail log: SMTP delivery to [email protected] from 185.x.x.x
[T-48h] 2025-05-26 14:22 UTC — EXECUTION
User executed attachment: Event 4688 (process creation)
Parent: outlook.exe → Child: powershell.exe -enc [base64]
[T-48h] 2025-05-26 14:22 UTC — C2 ESTABLISHED
Outbound connection: 203.x.x.x:443 (beacon_interval: 60s)
DNS query: malicious-c2.evil.com → 203.x.x.x
[T-24h] 2025-05-27 02:00 UTC — LATERAL MOVEMENT
PsExec from WORKSTATION01 to SERVER02 (admin$)
Event 4624 (login type 3) on SERVER02 from WORKSTATION01
[T-2h] 2025-05-27 12:30 UTC — DATA EXFILTRATION
Large POST request (450MB) to dropbox-like service
[T-0h] 2025-05-28 14:00 UTC — DETECTION
SOC analyst detected anomalous outbound transfer
4. メモリフォレンジック
ユーザーが Volatility の出力を共有した場合、またはメモリフォレンジックについて尋ねた場合:
Volatility 3 の必須コマンド:
# Process listing
python vol.py -f memory.raw windows.pslist
python vol.py -f memory.raw windows.pstree # Show parent-child
python vol.py -f memory.raw windows.psscan # Find hidden processes
# Network connections
python vol.py -f memory.raw windows.netscan
python vol.py -f memory.raw windows.netstat
# DLL and module analysis
python vol.py -f memory.raw windows.dlllist --pid [PID]
python vol.py -f memory.raw windows.modscan # All loaded modules
# Malware detection
python vol.py -f memory.raw windows.malfind # Injected code
python vol.py -f memory.raw windows.hollowfind # Process hollowing
# Registry from memory
python vol.py -f memory.raw windows.registry.hivelist
python vol.py -f memory.raw windows.registry.printkey --key "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
# File artifacts
python vol.py -f memory.raw windows.filescan
python vol.py -f memory.raw windows.dumpfiles --physaddr [addr]
不審なメモリの兆候:
- 対応するディスク上のファイルがないプロセス(プロセスホロウイング)
- 親プロセスが通常と異なる
explorer.exeまたはsvchost.exe - システムプロセス(lsass.exe、csrss.exe)からのネットワーク接続
windows.malfindによってフラグ付けされた実行可能メモリ領域- 注入されたシェルコード領域に積み重なった THREADS
5. インシデント後レポート
ユーザーが経営層向けまたはコンプライアンス向けの IR レポートを求めた場合:
# Post-Incident Report — [Incident ID]
**Classification:** CONFIDENTIAL
**Incident Type:** [Ransomware / Data Breach / etc.]
**Severity:** [Critical / High / Medium]
**Incident Window:** [Start] to [End] UTC
**Systems Affected:** [Count and names]
**Data Impact:** [Data at risk / confirmed exfiltrated]
**Report Date:** [Date]
**Report Author:** [IR Lead]
---
## 1. Executive Summary
[3-4 sentences: what happened, how it happened, impact, and current status]
## 2. Incident Timeline
[Key events table with timestamps]
## 3. Root Cause Analysis
**Initial Vector:** [Phishing / Unpatched service / Credential theft / etc.]
**Root Cause:** [Specific technical cause]
**Contributing Factors:**
- [Factor 1: e.g., no MFA on VPN]
- [Factor 2: e.g., delayed patch deployment]
## 4. Impact Assessment
- **Systems Compromised:** [List]
- **Data Accessed/Exfiltrated:** [Description + quantity]
- **Business Impact:** [Downtime hours, revenue impact, regulatory]
- **Customer/Partner Impact:** [If applicable]
## 5. Containment & Remediation Actions
[Chronological list of actions taken]
## 6. Compliance Notification Requirements
- **GDPR:** [Required if EU personal data — 72-hour notification to DPA]
- **HIPAA:** [Required if PHI — notify HHS within 60 days]
- **PCI-DSS:** [Required if cardholder data — notify card brands immediately]
- **State breach laws:** [Applicable laws and timelines]
## 7. Recommendations
| Priority | Recommendation | Owner | Due Date |
|----------|---------------|-------|---------|
| Critical | Deploy MFA for all remote access | IT | 2025-06-01 |
| High | Accelerate patch cycle for internet-facing systems | IT | 2025-06-15 |
| Medium | Implement email attachment sandboxing | Security | 2025-07-01 |
## 8. Lessons Learned
[What worked, what didn't, process improvements]
スクリプトリファレンス
timeline_builder.py
python scripts/timeline_builder.py --logs ./collected_logs/ --output timeline.csv
python scripts/timeline_builder.py --logs ./logs/ --format html --start "2025-05-20" --end "2025-05-28"
スキル連携
| 条件 | 関連スキル |
|---|---|
| SOC からアラートを受信 → IR を開始 | ← スキル 11(CSOC オートメーション) |
| マルウェアサンプルを収集 → 分析 | → スキル 05(マルウェア分析) |
| IOC を抽出 → 環境内をハンティング | → スキル 06(脅威ハンティング) |
| ログの詳細分析が必要 | → スキル 12(ログ分析) |
参考資料
- NIST SP 800-61 Rev. 2 — コンピューターセキュリティインシデント対応
- SANS インシデント対応プロセス
- Volatility 3 ドキュメント
- Velociraptor ドキュメント
- DFIR.training リソースハブ
- The Art of Memory Forensics(書籍)
v3.0 の機能強化(2026 年アップデート)
クラウドおよびアイデンティティ時代の IR:
- クラウド IR — AWS CloudTrail、Azure Activity/Entra のサインインおよび監査ログ、GCP Audit ログを取得してトリアージします。修復の前に、揮発性のクラウド状態(スナップショット、IAM キーの無効化)を保全します。
- アイデンティティおよび SaaS の侵害 — トークンの窃取/リプレイ、OAuth 同意の悪用、フェデレーション信頼への攻撃に対応します。セッション/更新トークンを失効させ、署名キーをローテーションし、条件付きアクセスを確認します。
- 最新のツールキット — 大規模なフリートからの収集には Velociraptor、Windows のタイムラインを迅速に作成するには EVTX に対する Hayabusa/Chainsaw + Sigma、トリアージ用イメージには KAPE を使用します。
- ランサムウェア特有の対応 — 二重/三重恐喝、暗号化前の情報流出を示す証拠、ESXi/Linux の対象範囲、イミュータブルバックアップに基づく復旧の検証を特定します。
- ビジネスメール詐欺 — 受信トレイルールやメール転送の悪用、アプリパスワードによる永続化、メールボックス監査ログの確認に対応します。
プロセスルール(優先順位の変更なし): NIST SP 800-61/SANS PICERL に従い、証拠保全の連鎖を維持します。クラウド/OT の状況では、サービスの継続性/安全性と証拠の保全を比較検討します(OT については → スキル 18)。