mcpField
T
triaging-security-incident-with-ir-playbook

triaging-security-incident-with-ir-playbook

github.com/mukul975セキュリティ35.2k117 回インストール8 週間前に更新
リポジトリ

triaging-security-incident-with-ir-playbook について

SOC アナリストがアラートを評価し、初動対応を調整するためのセキュリティインシデント・トリアージスキルです。情報の補完、インシデント分類、重大度判定、プレイブック選択、チームへのエスカレーション、記録を支援します。

主な機能

  1. 01受信アラートの確認と情報補完
  2. 02インシデント種別と重大度の分類
  3. 03対応プレイブックの選択と開始
  4. 04優先度に応じたチーム割り当てとエスカレーション
  5. 05判断と引き継ぎの記録

活用シーン

  1. 01新しい SIEM または EDR アラートの評価
  2. 02複数インシデントの優先順位付け
  3. 03確認済みインシデントの対応チームへの割り当て
  4. 04自動トリアージルールの検証や調整

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill triaging-security-incident-with-ir-playbook

インストール後、Claude Code で/triaging-security-incident-with-ir-playbookを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

LICENSE
assets/
template.md
references/
api-reference.md
standards.md
workflows.md
scripts/
agent.py
process.py

詳細

IR プレイブックによるセキュリティインシデントのトリアージ

使用する場面

  • SIEM、EDR、その他の検知ソースから新しいセキュリティアラートを受信した場合
  • SOC アナリストが、アラートが対応を要する真陽性かどうかを判断する必要がある場合
  • インシデントの重大度を分類し、チームを割り当てる必要がある場合
  • 複数のインシデントが同時に発生し、優先順位付けが必要な場合
  • 自動トリアージルールの検証または調整が必要な場合

前提条件

  • アラート相関機能を備えた SIEM プラットフォーム(Splunk、Elastic、QRadar、Sentinel)
  • インシデント対応プレイブックライブラリ(インシデントの種類別)
  • CISO が承認した重大度分類マトリクス
  • オンコールローテーションとエスカレーション手順
  • インシデント追跡用のチケット管理システム(ServiceNow、Jira、TheHive)
  • IOC のエンリッチメント用脅威インテリジェンスフィード

ワークフロー

ステップ 1:アラートを受信して確認する
# Query Splunk for new critical/high severity alerts
index=notable status=new severity IN ("critical","high")
| table _time, rule_name, src, dest, severity, description
| sort -_time

# Query TheHive for new cases
curl -s -H "Authorization: Bearer $THEHIVE_API_KEY" \
  "https://thehive.local/api/v1/query?name=list-alerts" \
  -H "Content-Type: application/json" \
  -d '{"query":[{"_name":"listAlert"},{"_name":"filter","_field":"status","_value":"New"}]}'

# Acknowledge alert in SIEM to prevent duplicate triage
curl -X POST "https://splunk.local:8089/services/notable_update" \
  -H "Authorization: Bearer $SPLUNK_TOKEN" \
  -d "ruleUIDs=$RULE_UID&status=1&comment=Triage+initiated+by+analyst"
ステップ 2:アラートデータをエンリッチメントする
# Enrich source IP with VirusTotal
curl -s "https://www.virustotal.com/api/v3/ip_addresses/$SRC_IP" \
  -H "x-apikey: $VT_API_KEY" | jq '.data.attributes.last_analysis_stats'

# Check IP reputation with AbuseIPDB
curl -s "https://api.abuseipdb.com/api/v2/check?ipAddress=$SRC_IP&maxAgeInDays=90" \
  -H "Key: $ABUSEIPDB_KEY" -H "Accept: application/json" | jq '.data'

# Enrich file hash with threat intelligence
curl -s "https://www.virustotal.com/api/v3/files/$FILE_HASH" \
  -H "x-apikey: $VT_API_KEY" | jq '.data.attributes.last_analysis_stats'

# Query internal asset database for affected systems
curl -s "https://cmdb.local/api/assets?ip=$DEST_IP" \
  -H "Authorization: Bearer $CMDB_TOKEN" | jq '.asset_criticality, .owner, .environment'
ステップ 3:インシデントの種類を分類する
# Map alert to incident category using playbook lookup
# Categories: Malware, Phishing, Unauthorized Access, Data Exfiltration,
# DoS/DDoS, Insider Threat, Ransomware, Account Compromise, Web Attack

# Check if alert matches known playbook trigger conditions
grep -i "$ALERT_SIGNATURE" /opt/ir/playbooks/trigger_conditions.yaml

# Determine incident type from MITRE ATT&CK technique
curl -s "https://attack.mitre.org/api/techniques/$TECHNIQUE_ID" | jq '.name, .tactic'
ステップ 4:重大度レベルを割り当てる
# Severity matrix factors:
# 1. Asset criticality (Critical/High/Medium/Low)
# 2. Data sensitivity (PII/PHI/PCI/Confidential/Public)
# 3. Number of affected systems
# 4. Active vs historical threat
# 5. Confirmed vs suspected compromise

# Automated severity calculation
python3 -c "
severity_score = 0
# Asset criticality: Critical=4, High=3, Medium=2, Low=1
severity_score += 4  # Critical server
# Data sensitivity: PII/PHI=4, PCI=3, Confidential=2, Public=1
severity_score += 3  # PCI data
# Scope: Enterprise=4, Department=3, Single system=2, Single user=1
severity_score += 2  # Single system
# Threat status: Active=4, Recent=3, Historical=2, Potential=1
severity_score += 4  # Active threat

if severity_score >= 12: print('CRITICAL - P1')
elif severity_score >= 9: print('HIGH - P2')
elif severity_score >= 6: print('MEDIUM - P3')
else: print('LOW - P4')
print(f'Score: {severity_score}/16')
"
ステップ 5:プレイブックを選択して開始する
# Load appropriate playbook based on incident type
cat /opt/ir/playbooks/ransomware_playbook.yaml
cat /opt/ir/playbooks/phishing_playbook.yaml
cat /opt/ir/playbooks/unauthorized_access_playbook.yaml

# Create incident ticket in TheHive
curl -X POST "https://thehive.local/api/v1/case" \
  -H "Authorization: Bearer $THEHIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "IR-2024-XXX: [Incident Type] - [Brief Description]",
    "description": "Triage summary and initial findings",
    "severity": 3,
    "tlp": 2,
    "pap": 2,
    "tags": ["ransomware", "triage-complete"],
    "customFields": {
      "playbook": {"string": "ransomware_v2"},
      "affected_systems": {"integer": 5}
    }
  }'
ステップ 6:対応チームを割り当てる
# Check on-call schedule
curl -s "https://pagerduty.com/api/v2/oncalls?schedule_ids[]=$SCHEDULE_ID" \
  -H "Authorization: Token token=$PD_TOKEN" | jq '.oncalls[].user.summary'

# Page incident responders based on severity
# P1/Critical: Page IR lead + senior analysts + CISO
# P2/High: Page IR lead + available analysts
# P3/Medium: Assign to next available analyst
# P4/Low: Queue for business hours processing

curl -X POST "https://events.pagerduty.com/v2/enqueue" \
  -H "Content-Type: application/json" \
  -d '{
    "routing_key": "'$PD_ROUTING_KEY'",
    "event_action": "trigger",
    "payload": {
      "summary": "P1 Security Incident: Ransomware detected on PROD-DB-01",
      "severity": "critical",
      "source": "SIEM-Splunk",
      "custom_details": {"incident_id": "IR-2024-042", "playbook": "ransomware_v2"}
    }
  }'
ステップ 7:トリアージの判断を記録して引き継ぐ
# Update incident ticket with triage summary
curl -X PATCH "https://thehive.local/api/v1/case/$CASE_ID" \
  -H "Authorization: Bearer $THEHIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "InProgress",
    "customFields": {
      "triage_analyst": {"string": "analyst_name"},
      "triage_time": {"date": '$(date +%s000)'},
      "severity_justification": {"string": "Critical asset + active threat + PCI data"}
    }
  }'

主な概念

概念説明
真陽性実際のセキュリティインシデントを正しく特定したアラート
偽陽性無害なアクティビティを悪意のあるものとして誤って検知したアラート
重大度分類影響度と緊急度に基づくインシデントの優先順位付け
プレイブックの選択インシデントの種類に基づいて適切な対応手順を選ぶこと
IOC のエンリッチメント脅威インテリジェンスソースの情報を指標に追加すること
エスカレーションしきい値重大度の引き上げや管理者へのエスカレーションを促す基準
トリアージ SLA初期評価の目標時間(重大インシデントでは通常 15~30 分)

ツールとシステム

ツール目的
Splunk/Elastic/QRadarSIEM アラートの相関分析とクエリ
TheHive/SIRPインシデントケースの管理とプレイブックの追跡
VirusTotal/AbuseIPDBIOC のレピュテーション確認とエンリッチメント
PagerDuty/OpsGenieオンコール管理とアラート通知
MITRE ATT&CK攻撃手法の分類とマッピング
Cortex XSOARトリアージワークフローを自動化する SOAR プラットフォーム

よくあるシナリオ

  1. ブルートフォースアラート:単一の IP から複数のログイン失敗が発生しています。IP のレピュテーションを確認し、地理的位置を調べ、アカウントが侵害されたか確認します。失敗に終わった場合は P3 を割り当てます。
  2. エンドポイントでのマルウェア検知:AV/EDR がマルウェアを隔離しました。隔離が成功したことを確認し、ラテラルムーブメントの有無を調べます。永続化が検知された場合は P2 を割り当てます。
  3. 不審なアウトバウンドトラフィック:不明な外部 IP への大規模なデータ転送が発生しています。既知のクラウドサービスかどうかを確認し、データ分類を確かめます。情報流出が確認された場合は P1 を割り当てます。
  4. 報告されたフィッシングメール:ユーザーが不審なメールを報告しています。IOC を抽出し、他のユーザーにも届いているか確認します。認証情報が入力されていた場合は P2 を割り当てます。
  5. 権限昇格:ユーザーが予期せず管理者権限を取得しました。承認済みの変更かどうかを確認し、悪用の有無を調べます。不正な権限昇格の場合は P1 を割り当てます。

出力形式

  • 重大度の根拠を記載したトリアージ判断文書
  • プレイブックとチームを割り当てたインシデントチケット
  • ケースに添付する IOC エンリッチメントの概要
  • 適切な関係者へのエスカレーション通知
  • アラートデータに基づくイベントの初期タイムライン

コメント