mcpField
C
CSOC Operations & Playbook Automation

CSOC Operations & Playbook Automation

github.com/masriyanセキュリティ530137 回インストール1 週間前に更新
リポジトリ

CSOC Operations & Playbook Automation について

サイバーセキュリティ運用センター向けの Claude スキルです。アラートのトリアージ、インシデント対応プレイブックの作成、エスカレーション設計を支援し、自動処理の記録と人による承認も重視します。

主な機能

  1. 01SIEM アラートのトリアージと分類
  2. 02インシデント対応プレイブック作成
  3. 03エスカレーションと通知フロー設計
  4. 04シフト引き継ぎレポート作成
  5. 05SOC 指標と KPI の分析
  6. 06自動処理への人による承認設定

活用シーン

  1. 01SIEM アラートの初期評価
  2. 02一般的なインシデント向け SOAR プレイブック作成
  3. 03重大インシデントのエスカレーション経路設計
  4. 04シフト引き継ぎと運用指標の整理

インストール

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

$npx skills add https://github.com/masriyan/claude-code-cybersecurity-skill --skill csoc-operations-&-playbook-automation

インストール後、Claude Code で/csoc-operations-&-playbook-automationを入力して読み込まれたか確認します。

同梱ファイル

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

examples/
example_usage.md
scripts/
alert_triager.py
report_generator.py

詳細

CSOC 運用とプレイブックの自動化

目的

Claude がサイバーセキュリティオペレーションセンター(CSOC)チームを支援し、アラートの構造化されたトリアージ、プレイブックの自動作成、エスカレーションワークフローの設計、シフト引き継ぎレポートの作成、SOC メトリクスの分析を行えるようにします。Claude は、アナリストがそのまま実行するか、SOAR プラットフォームに合わせて調整できる運用成果物を生成します。


起動条件

次の内容をユーザーが尋ねたときに、このスキルが起動します。

  • SIEM アラートまたはセキュリティイベントのトリアージ
  • SOC アナリスト向けインシデント対応プレイブックの作成
  • エスカレーションワークフローと通知経路の設計
  • SOC のシフト引き継ぎレポートの作成
  • SOC メトリクス(MTTD、MTTR、FPR)の計算
  • SOC の反復作業の自動化
  • Splunk SOAR、Palo Alto XSOAR、ServiceNow へのプレイブック変換
  • SOC アナリストの意思決定支援とランブック
  • アラート疲れの軽減策
  • アラートの相関付けと重複排除

前提条件

pip install pyyaml jinja2 requests python-dateutil

プラットフォーム連携:

  • Splunk SOAR — プレイブックの自動化
  • Palo Alto XSOAR — SOAR プラットフォーム
  • TheHive — オープンソースのインシデント対応プラットフォーム
  • ServiceNow — ITSM チケット管理
  • PagerDuty / OpsGenie — アラート通知とオンコール対応

主な機能

1. アラートトリアージの自動化

ユーザーが SIEM アラートを提示してトリアージを求めた場合:

トリアージ判断フレームワーク:

Step 1: Parse alert data
  - Source: SIEM, EDR, WAF, IDS, email security, cloud audit logs
  - Extract: timestamp, source IP, destination, user, process, alert type

Step 2: Asset criticality lookup
  - Is the asset business-critical? (production DB, domain controller, payment system)
  - Is the user privileged? (admin, developer, finance)
  - What is the asset's network exposure?

Step 3: Threat context enrichment
  - IP reputation: Check against blocklists (AbuseIPDB, VirusTotal, Shodan)
  - Hash reputation: VirusTotal lookup for file hashes
  - Domain reputation: Phishtank, URLhaus, MX Toolbox
  - User risk score: Recent activity anomalies, recent password resets

Step 4: Apply triage matrix

アラートトリアージマトリクス:

アラートの信頼度資産の重要度推奨アクションSLA
高重大直ちに Tier 2/3 へエスカレーション — インシデントを宣言15 分
高高Tier 1 の優先調査30 分
高中Tier 1 の標準調査1 時間
高低Tier 1 の標準キュー4 時間
中重大Tier 1 の優先調査30 分
中高Tier 1 の標準調査2 時間
中低標準キュー。パターンが見られた場合に調査8 時間
低すべて記録と注記を残して自動クローズ24 時間

トリアージ分析の出力形式:

## Alert Triage Summary

**Alert ID:** [ID]
**Alert Type:** [Type — e.g., Brute Force Login]
**Source:** [Source IP/User/Host]
**Time:** [UTC timestamp]
**SIEM Rule:** [Rule name that triggered]

**Asset Assessment:**
- Asset: [Hostname/IP]
- Criticality: [Critical / High / Medium / Low]
- Role: [e.g., Production Database Server]

**Threat Context:**
- Source IP Reputation: [Malicious / Suspicious / Clean / Unknown]
- Source IP Location: [Country, ASN]
- Known threat actor: [Yes/No — if yes, attribution]
- Related IOCs found: [Yes/No]

**Verdict:** [True Positive / False Positive / Undetermined]
**Triage Action:** [Escalate to Tier 2 / Investigate / Close / Watch]
**Recommended Playbook:** [Playbook name]
**Priority:** [P1 Critical / P2 High / P3 Medium / P4 Low]

**Analyst Notes:**
[Notes from triage]
# Automated triage with script
python scripts/alert_triager.py --alerts alerts.json --output triage_results.json
python scripts/alert_triager.py --alerts siem_export.csv --playbook default --auto-assign
2. インシデントプレイブックの作成

ユーザーが SOC プレイブックの作成を求めた場合:

プレイブック YAML テンプレート(SOAR 互換):

# CSOC Playbook: Phishing Email Response
# Compatible with: Splunk SOAR, XSOAR, TheHive
# Last updated: 2025-05-28

name: phishing_email_response
version: "2.0"
trigger:
  alert_types:
    - "Email Security - Phishing Detected"
    - "User Reported Phishing"
  severity: [medium, high, critical]

variables:
  - name: sender_email
    type: string
  - name: recipient_email
    type: string
  - name: email_subject
    type: string
  - name: attachment_hash
    type: string
    required: false

tasks:
  - id: "1-extract-artifacts"
    name: "Extract Email Artifacts"
    type: automated
    actions:
      - Extract sender, recipients, subject, body, attachments
      - Defang all URLs and IPs found in email body
      - Calculate SHA256 of all attachments
      - Extract email headers (SPF, DKIM, DMARC results)
    output:
      - sender_ip
      - sender_domain
      - urls_in_body
      - attachment_hashes

  - id: "2-enrich-indicators"
    name: "Enrich IOCs with Threat Intelligence"
    type: automated
    depends_on: ["1-extract-artifacts"]
    actions:
      - VirusTotal lookup: sender_ip, attachment_hashes, urls_in_body
      - URLhaus lookup: all URLs
      - AbuseIPDB lookup: sender_ip
      - Check internal blocklists
    output:
      - vt_results
      - url_classification
      - ip_reputation

  - id: "3-assess-impact"
    name: "Assess Who Clicked / Opened Attachment"
    type: manual
    depends_on: ["2-enrich-indicators"]
    analyst_actions:
      - "Check email security gateway: did anyone click the link?"
      - "Check proxy logs: any traffic to phishing domain?"
      - "Check EDR: any process execution from attachment?"
    decision_point:
      - condition: "User clicked link OR opened attachment"
        action: escalate_to_incident
      - condition: "No user interaction confirmed"
        action: continue_to_containment

  - id: "4-contain"
    name: "Email and Infrastructure Containment"
    type: hybrid
    actions:
      - Block sender domain in email gateway
      - Block phishing URLs in web proxy and DNS
      - Block attachment hash in EDR/AV
      - Pull email from all mailboxes (if email platform supports)
      - If user clicked: isolate endpoint (→ IR Playbook)

  - id: "5-notify"
    name: "User and Management Notification"
    type: automated
    templates:
      user_notification: |
        Subject: Action Required — Phishing Email in Your Inbox
        You recently received a phishing email (Subject: {{email_subject}}).
        If you clicked any links or opened attachments, please contact the SOC immediately.
        Contact: [email protected] | x4444
      management_notification: |
        CSOC Alert: Phishing campaign targeting [department] detected.
        [N] employees received the email. Status: [contained/investigating].

  - id: "6-close"
    name: "Close and Document"
    type: manual
    actions:
      - Document all IOCs in MISP/threat intel platform
      - Update email security rules
      - Create security awareness notification if targeted campaign
      - Complete incident ticket with findings
    metrics:
      - alert_received_time
      - triage_completed_time
      - contained_time

トリガー条件に対応するプレイブックの種類:

プレイブックトリガー
フィッシング対応メールセキュリティアラート、ユーザーからの報告
ランサムウェア対応大量のファイル暗号化、EDR の振る舞いアラート
データ流出DLP アラート、大量の外向き転送
ブルートフォースN 分間に M 回のログイン失敗
内部脅威DLP、通常と異なるアクセスパターン、人事部門からの通知
アカウント侵害不可能な移動、新しいデバイスからのログイン
マルウェアアラートAV/EDR アラート、メール添付ファイルの検出
DDoS 対応トラフィック量の急増、サービスの性能低下
不正アクセス制限されたリソースへのアクセス
脆弱性の検出スキャナーによる検出、脅威インテリジェンスとの一致
3. エスカレーションワークフローの設計

ユーザーからエスカレーションワークフローの設計を依頼された場合:

## CSOC Escalation Workflow

### Severity Definitions
| Level | CVSS / Impact | Response Time | Team |
|-------|--------------|---------------|------|
| P1 — Critical | 9.0–10.0 or system breach | 15 minutes | Tier 3 + IR Lead + Management |
| P2 — High | 7.0–8.9 or data at risk | 30 minutes | Tier 2 + Tier 3 standby |
| P3 — Medium | 4.0–6.9 | 2 hours | Tier 1 → Tier 2 if unresolved |
| P4 — Low | 0.1–3.9 | 8 hours | Tier 1 |

### Escalation Paths

P1 Incident: Tier 1 Analyst → [immediately] → Tier 3 Lead (call) Tier 3 Lead → [within 5 min] → SOC Manager (call) SOC Manager → [within 15 min] → CISO + Legal (if data breach)

P2 Incident: Tier 1 Analyst → [after 30 min unresolved] → Tier 2 Analyst (ticket escalation) Tier 2 Analyst → [after 2 hours unresolved] → Tier 3 Lead (chat notification)

Out-of-hours escalation: On-call Tier 2 via PagerDuty → 15 min acknowledge → escalate to Tier 3


### Notification Templates

**Slack Critical Alert Template:**

🚨 P1 SECURITY INCIDENT DECLARED 🚨 Type: {{incident_type}} Affected: {{affected_systems}} Time Detected: {{detection_time}} UTC IR Lead: @{{ir_lead}} Bridge: [link to war room] Ticket: {{ticket_id}} ACTION REQUIRED: All IR team members join the bridge now.


**Email Escalation Template:**

Subject: [P{{severity}}] Security Incident — {{incident_type}} — {{ticket_id}}

CSOC has declared a security incident.

Incident ID: {{ticket_id}} Type: {{incident_type}} Severity: {{severity}} Detected: {{detection_time}} UTC Current Status: {{status}} Affected Systems: {{affected_systems}}

Current Actions: {{current_actions}}

Required Actions: {{required_actions}}

Next Update: {{next_update_time}}

SOC Contact: [email protected] | +1-555-SOC-HELP


### 4. Shift Handover Report Generation

**When the user asks to generate a shift report:**

```bash
python scripts/alert_triager.py --report shift --shift night --date 2025-05-28 --output report.md

シフト引き継ぎレポートのテンプレート:

# CSOC Shift Handover Report
**Shift:** Night (22:00–06:00 UTC)
**Date:** 2025-05-28
**Outgoing Analyst:** [Name]
**Incoming Analyst:** [Name]

---

## Shift Summary
| Metric | Count |
|--------|-------|
| Total Alerts | 142 |
| True Positives | 8 |
| False Positives | 118 |
| Undetermined | 16 |
| Incidents Declared | 2 |
| Average Triage Time | 12 minutes |
| SLA Compliance | 94.4% |

## Open Incidents (Require Immediate Attention)
| ID | Type | Severity | Status | Owner | Next Action |
|----|------|----------|--------|-------|-------------|
| INC-2025-089 | Phishing Campaign | P2 | Investigating | [Name] | Awaiting EDR report |
| INC-2025-090 | Suspicious Login | P3 | Monitoring | [Name] | 24h watch, escalate if repeat |

## Alerts Closed This Shift
- 118 False Positives auto-closed (brute force from known scanners, pen test activity)
- 12 True Positives resolved (malware blocked by AV, no further action needed)

## Ongoing Watches (No Action Yet Required)
- Increased scan activity from 198.51.100.0/24 — monitoring trend
- User [email protected] multiple failed VPN logins — watching for successful auth

## Tool/System Issues
- Splunk indexer latency 45 min this shift — events delayed, may affect investigation timing
- EDR console intermittently slow — reported to IT ops (ticket: OPS-4421)

## Recommended Actions for Next Shift
1. Follow up on INC-2025-089: EDR report expected from endpoint team by 08:00
2. Review [email protected] VPN activity — if successful login from new location, triage
3. Watch for continued scanning from 198.51.100.x block
5. SOC のメトリクスと KPI の追跡

ユーザーから SOC のメトリクスや KPI 分析について尋ねられた場合:

主な SOC メトリクス:

メトリクス計算式目標
MTTD(平均検知時間)Avg(detection_time − attack_start_time)< 1 hour
MTTR(平均対応時間)Avg(response_complete − detection_time)< 4 hours
MTTC(平均封じ込め時間)Avg(contain_time − detection_time)< 1 hour
誤検知率FP / (FP + TP) × 100< 20%
アラートからチケットへの変換率Tickets / Total Alerts< 5% (healthy)
SLA 遵守率Alerts within SLA / Total Alerts> 95%
アナリストの対応能力アナリスト 1 人が 1 シフトで処理するアラート数傾向を追跡
エスカレーション率Tier 2/3 にエスカレーションされたチケット / 全チケット数< 20%

月次 KPI ダッシュボードのテンプレート:

## SOC Monthly Metrics Report — May 2025

### Volume
- Total Alerts: 4,215
- True Positives: 287 (6.8%)
- False Positives: 3,928 (93.2%)
- Incidents Declared: 14

### Response Performance
- MTTD: 23 minutes (↓ from 31 min last month) ✓
- MTTR: 3.2 hours (↑ from 2.8 hours) ⚠
- SLA Compliance: 96.1% ✓

### Top Alert Categories
1. Brute Force Attempts: 1,842 (94% FP from scanner IPs)
2. Malware Detected: 412 (78% TP)
3. Data Loss Prevention: 287 (32% TP)
4. Privilege Escalation: 156 (65% TP)

### Recommendations
1. Allowlist known scanner IPs to reduce brute force FP volume (-40% alert load)
2. MTTR increased due to EDR tool latency — investigate performance

スクリプトのリファレンス

alert_triager.py
python scripts/alert_triager.py --alerts alerts.json --output triage_results.json
python scripts/alert_triager.py --alerts siem_export.csv --playbook default --auto-assign
report_generator.py
python scripts/report_generator.py --shift night --date 2025-05-28 --output report.md
python scripts/report_generator.py --metrics monthly --date 2025-05 --output metrics.json

スキルの連携

条件関連スキル
アラートに詳細な調査が必要→ Skill 07(インシデント対応)
アラートのコンテキストを把握するためのログの詳細分析→ Skill 12(ログ分析)
アラートのパターンに基づく脅威ハンティング→ Skill 06(脅威ハンティング)
すべての検知スキルからアラートがここに集約される← すべての検知スキル

参考資料


v3.0 の強化点(2026 年版)

AI を活用した、メトリクス主導の SOC:

  • AI 支援によるトリアージ — LLM を使用してアラートを要約し、重複をグループ化し、脅威インテリジェンスで情報を補完し、アナリストによる初期判断案を作成します。封じ込めアクションを実行する前に、必ず人間が確認する手順を設けます(安全なエージェント設計についてはスキル 16 を参照してください)。
  • Detection-as-code と SOAR — プレイブックと検知ルールをテストとともにバージョン管理します。チケットを人間が確認する前に、自動で情報を補完します(WHOIS、VT、GeoIP、資産/ID コンテキスト)。
  • アラートのチューニングサイクル — ルールごとの誤検知率を追跡します。誤検知率がしきい値を超えた場合は、アラート疲れを防ぐために抑制やチューニングを自動で提案します。
  • MITRE D3FEND — 各プレイブックの封じ込め/根絶の手順を D3FEND の対策に対応付け、ATT&CK の網羅範囲を補完します。
  • メトリクス — MTTD、MTTA、MTTR、滞留時間、ATT&CK の戦術ごとの検知範囲を報告します。シフトをまたいだ推移も追跡します。

精密性の原則: 自動化されたすべてのアクションを記録し、可能な限り取り消せるようにし、重大度に応じた承認手順を設けます。取り消せないアクションには、人間による明示的な承認が必要です。

コメント