mcpField
P
performing-cve-prioritization-with-kev-catalog

performing-cve-prioritization-with-kev-catalog

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

performing-cve-prioritization-with-kev-catalog について

CVEの優先順位付けを行う脆弱性管理チーム向けのスキルです。CISA KEV、EPSS、CVSSに資産の重要度とネットワーク露出度を加え、評価とレポート作成を進めます。

主な機能

  1. 01CISA KEVカタログの解析
  2. 02EPSSとCVSSデータの補完
  3. 03資産重要度とネットワーク露出度の評価
  4. 04優先度と修正期限の分類
  5. 05優先順位レポートの生成

活用シーン

  1. 01脆弱性スキャン結果とKEVの照合
  2. 02リスクに基づく修正順序の策定
  3. 03KEV掲載脆弱性の修正期限の追跡
  4. 04CI/CDパイプラインでの脆弱性評価の自動化

インストール

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

$npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill performing-cve-prioritization-with-kev-catalog

インストール後、Claude Code で/performing-cve-prioritization-with-kev-catalogを入力して読み込まれたか確認します。

同梱ファイル

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

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

詳細

KEV カタログを使用した CVE の優先順位付け

概要

Binding Operational Directive(BOD)22-01 に基づいて策定された CISA Known Exploited Vulnerabilities(KEV)カタログは、実環境で積極的に悪用されており、重大なリスクを伴う CVE をまとめた更新され続けるリストです。2026 年初頭時点で、カタログには 1,484 件を超えるエントリが登録されており、2025 年だけでも 245 件が新たに追加され、20% 増加しました。このスキルでは、KEV カタログを EPSS(Exploit Prediction Scoring System)や CVSS とともに脆弱性の優先順位付けワークフローに組み込み、理論上の深刻度だけではなく、悪用が確認されている脆弱性を優先するリスクベースのアプローチを構築する方法を説明します。

使用する状況

  • KEV カタログを使用した CVE の優先順位付けを含むセキュリティ評価を実施するとき
  • 関連するセキュリティイベントへのインシデント対応手順に従うとき
  • 定期的なセキュリティテストや監査活動を実施するとき
  • 実地テストを通じてセキュリティ制御を検証するとき

前提条件

  • 脆弱性スキャン結果へのアクセス(Qualys、Nessus、Rapid7 など)
  • CVE 識別子と NVD に関する知識
  • CVSS スコアリング(v3.1 と v4.0)の理解
  • CISA KEV、EPSS、NVD エンドポイントへの API アクセス
  • requests および pandas ライブラリを備えた Python 3.8 以降

主要な概念

CISA KEV カタログの構造

各 KEV エントリには以下が含まれます。

  • CVE ID:CVE 識別子(例:CVE-2024-3094)
  • ベンダー/プロジェクト:影響を受けるベンダーと製品名
  • 脆弱性名:脆弱性の簡潔な説明
  • 追加日:CISA がカタログに追加した日付
  • 簡単な説明:技術的な説明の概要
  • 必要な対応:推奨される修復対応
  • 期限:連邦政府機関(FCEB)が修復を完了する期限
  • 既知のランサムウェアキャンペーンでの使用:ランサムウェアグループによる悪用の有無
BOD 22-01 の修復期限
CVE の公開日修復期限
2021 年以降KEV への掲載から 2 週間
2021 年より前KEV への掲載から 6 か月
多要素の優先順位付けモデル
要素重みデータソース根拠
CISA KEV への掲載30%CISA KEV JSON フィード積極的な悪用が確認済み
EPSS スコア25%FIRST EPSS API悪用確率の予測
CVSS 基本スコア20%NVD API v2.0脆弱性固有の深刻度
資産の重要度15%CMDB/資産インベントリビジネスへの影響の背景
ネットワークへの露出10%ネットワークアーキテクチャ攻撃対象領域へのアクセスしやすさ
KEV + EPSS の判断マトリックス
KEV 掲載EPSS > 0.5CVSS >= 9.0優先度SLA
はい任意任意P1-緊急48 時間
いいえはいはいP1-緊急48 時間
いいえはいいいえP2-重大7 日
いいえいいえはいP2-重大7 日
いいえいいえいいえ(>= 7.0)P3-高14 日
いいえいいえいいえ(>= 4.0)P4-中30 日
いいえいいえいいえ(< 4.0)P5-低90 日

ワークフロー

ステップ 1:KEV カタログを取得して解析する
import requests
import json
from datetime import datetime

KEV_URL = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"

def fetch_kev_catalog():
    """Download and parse the CISA KEV catalog."""
    response = requests.get(KEV_URL, timeout=30)
    response.raise_for_status()
    data = response.json()

    catalog = {}
    for vuln in data.get("vulnerabilities", []):
        cve_id = vuln["cveID"]
        catalog[cve_id] = {
            "vendor": vuln.get("vendorProject", ""),
            "product": vuln.get("product", ""),
            "name": vuln.get("vulnerabilityName", ""),
            "date_added": vuln.get("dateAdded", ""),
            "description": vuln.get("shortDescription", ""),
            "action": vuln.get("requiredAction", ""),
            "due_date": vuln.get("dueDate", ""),
            "ransomware_use": vuln.get("knownRansomwareCampaignUse", "Unknown"),
        }

    print(f"[+] Loaded {len(catalog)} CVEs from CISA KEV catalog")
    print(f"    Catalog version: {data.get('catalogVersion', 'N/A')}")
    print(f"    Last updated: {data.get('dateReleased', 'N/A')}")
    return catalog

kev = fetch_kev_catalog()
ステップ 2:EPSS スコアで情報を補完する
EPSS_API = "https://api.first.org/data/v1/epss"

def get_epss_scores(cve_list):
    """Fetch EPSS scores for a batch of CVEs."""
    scores = {}
    batch_size = 100
    for i in range(0, len(cve_list), batch_size):
        batch = cve_list[i:i + batch_size]
        cve_param = ",".join(batch)
        response = requests.get(EPSS_API, params={"cve": cve_param}, timeout=30)
        if response.status_code == 200:
            for entry in response.json().get("data", []):
                scores[entry["cve"]] = {
                    "epss": float(entry.get("epss", 0)),
                    "percentile": float(entry.get("percentile", 0)),
                }
    return scores
ステップ 3:優先順位付けエンジンを構築する
import pandas as pd

def prioritize_vulnerabilities(scan_results, kev_catalog, epss_scores):
    """Apply multi-factor prioritization to scan results."""
    prioritized = []

    for vuln in scan_results:
        cve_id = vuln.get("cve_id", "")
        cvss_score = float(vuln.get("cvss_score", 0))
        asset_criticality = float(vuln.get("asset_criticality", 3))
        exposure = float(vuln.get("network_exposure", 3))

        in_kev = cve_id in kev_catalog
        kev_data = kev_catalog.get(cve_id, {})
        epss_data = epss_scores.get(cve_id, {"epss": 0, "percentile": 0})
        epss_score = epss_data["epss"]

        # Composite risk score calculation
        risk_score = (
            (1.0 if in_kev else 0.0) * 10 * 0.30 +
            epss_score * 10 * 0.25 +
            cvss_score * 0.20 +
            (asset_criticality / 5.0) * 10 * 0.15 +
            (exposure / 5.0) * 10 * 0.10
        )

        # Assign priority level
        if in_kev or (epss_score > 0.5 and cvss_score >= 9.0):
            priority = "P1-Emergency"
            sla_days = 2
        elif epss_score > 0.5 or cvss_score >= 9.0:
            priority = "P2-Critical"
            sla_days = 7
        elif cvss_score >= 7.0:
            priority = "P3-High"
            sla_days = 14
        elif cvss_score >= 4.0:
            priority = "P4-Medium"
            sla_days = 30
        else:
            priority = "P5-Low"
            sla_days = 90

        prioritized.append({
            "cve_id": cve_id,
            "cvss_score": cvss_score,
            "epss_score": round(epss_score, 4),
            "epss_percentile": round(epss_data["percentile"], 4),
            "in_cisa_kev": in_kev,
            "ransomware_use": kev_data.get("ransomware_use", "N/A"),
            "kev_due_date": kev_data.get("due_date", "N/A"),
            "risk_score": round(risk_score, 2),
            "priority": priority,
            "sla_days": sla_days,
            "asset": vuln.get("asset", ""),
            "asset_criticality": asset_criticality,
        })

    df = pd.DataFrame(prioritized)
    df = df.sort_values("risk_score", ascending=False)
    return df
ステップ 4:優先順位付けレポートを生成する
def generate_report(df, output_file="kev_prioritized_report.csv"):
    """Generate summary report from prioritized vulnerabilities."""
    print("\n" + "=" * 70)
    print("VULNERABILITY PRIORITIZATION REPORT - KEV + EPSS + CVSS")
    print("=" * 70)

    print(f"\nTotal vulnerabilities analyzed: {len(df)}")
    print(f"KEV-listed vulnerabilities:    {df['in_cisa_kev'].sum()}")
    print(f"Ransomware-associated:         {(df['ransomware_use'] == 'Known').sum()}")

    print("\nPriority Distribution:")
    print(df["priority"].value_counts().to_string())

    print("\nTop 15 Highest Risk Vulnerabilities:")
    top = df.head(15)[["cve_id", "cvss_score", "epss_score", "in_cisa_kev",
                        "risk_score", "priority"]]
    print(top.to_string(index=False))

    df.to_csv(output_file, index=False)
    print(f"\n[+] Full report saved to: {output_file}")

ベストプラクティス

  1. CISA は週に複数回新しいエントリを追加するため、KEV カタログを毎日更新します
  2. KEV を必ず EPSS と照合します。CVE の EPSS が高くても、まだ KEV に掲載されていない場合があります
  3. CVSS スコアにかかわらず、KEV に掲載されたすべての CVE を P1-緊急として扱います
  4. 「既知のランサムウェアキャンペーンでの使用」としてフラグが付いた KEV エントリに特に注意します
  5. CI/CD パイプラインで、KEV と脆弱性スキャン結果を自動的に照合します
  6. FCEB のコンプライアンス要件に備え、KEV の期限を別途追跡します
  7. 脅威ハンティングの先行指標として KEV を活用します。CVE が追加されたら、自組織の環境で過去に悪用されていないか確認します

よくある落とし穴

  • KEV や EPSS のデータを確認せず、CVSS スコアだけに頼る
  • KEV カタログを十分な頻度で更新しない(CISA は週に複数回更新します)
  • KEV に登録されていない CVE は安全だと見なす。まだカタログに登録されていないだけで、悪用されている可能性があります
  • 最も緊急度の高い脅威を示す「ランサムウェアでの使用」フィールドを無視する
  • コンプライアンスのためだけに KEV を使用し、全体的なリスク管理に組み込まない

関連スキル

  • prioritizing-vulnerabilities-with-cvss-scoring
  • building-vulnerability-data-pipeline-with-api
  • implementing-threat-intelligence-scoring
  • implementing-vulnerability-remediation-sla

コメント