performing-cve-prioritization-with-kev-catalog

结合 CISA 已知被利用漏洞(KEV)目录、EPSS 和 CVSS,基于真实世界的漏洞利用证据对 CVE 修复工作进行优先级排序。

9 stars

Best use case

performing-cve-prioritization-with-kev-catalog is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

结合 CISA 已知被利用漏洞(KEV)目录、EPSS 和 CVSS,基于真实世界的漏洞利用证据对 CVE 修复工作进行优先级排序。

Teams using performing-cve-prioritization-with-kev-catalog should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/performing-cve-prioritization-with-kev-catalog/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/performing-cve-prioritization-with-kev-catalog/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/performing-cve-prioritization-with-kev-catalog/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How performing-cve-prioritization-with-kev-catalog Compares

Feature / Agentperforming-cve-prioritization-with-kev-catalogStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

结合 CISA 已知被利用漏洞(KEV)目录、EPSS 和 CVSS,基于真实世界的漏洞利用证据对 CVE 修复工作进行优先级排序。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 使用 KEV 目录执行 CVE 优先级排序

## 概述
CISA 已知被利用漏洞(KEV,Known Exploited Vulnerabilities)目录由约束性操作指令(BOD,Binding Operational Directive)22-01 建立,是一份持续更新的 CVE 列表,记录了已在现实环境中被主动利用、具有重大风险的漏洞。截至 2026 年初,该目录已包含超过 1,484 条记录,仅 2025 年就新增了 245 条,增长约 20%。本技能涵盖将 KEV 目录与 EPSS(漏洞利用预测评分系统,Exploit Prediction Scoring System)和 CVSS 整合到漏洞优先级工作流中,创建基于风险的方法,将已确认利用活动的漏洞优先级置于单纯理论严重性之上。

## 前置条件
- 访问漏洞扫描结果(Qualys、Nessus、Rapid7 等)
- 熟悉 CVE 标识符和 NVD
- 了解 CVSS 评分(v3.1 和 v4.0)
- 可访问 CISA KEV、EPSS 和 NVD API 端点
- Python 3.8+ 及 requests 和 pandas 库

## 核心概念

### 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.5 | CVSS >= 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 目录

```python
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():
    """下载并解析 CISA KEV 目录。"""
    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"[+] 已从 CISA KEV 目录加载 {len(catalog)} 个 CVE")
    print(f"    目录版本:{data.get('catalogVersion', 'N/A')}")
    print(f"    最后更新:{data.get('dateReleased', 'N/A')}")
    return catalog

kev = fetch_kev_catalog()
```

### 步骤 2:使用 EPSS 评分丰富数据

```python
EPSS_API = "https://api.first.org/data/v1/epss"

def get_epss_scores(cve_list):
    """批量获取一组 CVE 的 EPSS 评分。"""
    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:构建优先级排序引擎

```python
import pandas as pd

def prioritize_vulnerabilities(scan_results, kev_catalog, epss_scores):
    """对扫描结果应用多因素优先级排序。"""
    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"]

        # 综合风险分计算
        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
        )

        # 分配优先级
        if in_kev or (epss_score > 0.5 and cvss_score >= 9.0):
            priority = "P1-紧急"
            sla_days = 2
        elif epss_score > 0.5 or cvss_score >= 9.0:
            priority = "P2-严重"
            sla_days = 7
        elif cvss_score >= 7.0:
            priority = "P3-高危"
            sla_days = 14
        elif cvss_score >= 4.0:
            priority = "P4-中危"
            sla_days = 30
        else:
            priority = "P5-低危"
            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:生成优先级排序报告

```python
def generate_report(df, output_file="kev_prioritized_report.csv"):
    """从优先级排序的漏洞数据生成摘要报告。"""
    print("\n" + "=" * 70)
    print("漏洞优先级排序报告 — KEV + EPSS + CVSS")
    print("=" * 70)

    print(f"\n已分析漏洞总数:{len(df)}")
    print(f"KEV 收录的漏洞:{df['in_cisa_kev'].sum()}")
    print(f"与勒索软件关联:{(df['ransomware_use'] == 'Known').sum()}")

    print("\n优先级分布:")
    print(df["priority"].value_counts().to_string())

    print("\n前 15 个高风险漏洞:")
    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[+] 完整报告已保存到:{output_file}")
```

## 最佳实践
1. 每日更新 KEV 目录,因为 CISA 每周多次添加新条目
2. 始终将 KEV 与 EPSS 交叉比对;某个 CVE 可能 EPSS 高但尚未列入 KEV
3. 无论 CVSS 分数高低,将所有 KEV 收录的 CVE 视为 P1-紧急处理
4. 特别关注标记为"已知勒索软件利用"的 KEV 条目
5. 在 CI/CD 流水线中自动化 KEV 与漏洞扫描结果的比对
6. 单独追踪 KEV 截止日期以满足 FCEB 合规要求
7. 将 KEV 用作威胁猎人的领先指标;一旦 CVE 被添加,立即检查环境中的历史利用情况

## 常见陷阱
- 仅依赖 CVSS 分数而不检查 KEV 或 EPSS 数据
- KEV 目录更新频率不足(CISA 每周更新多次)
- 将非 KEV 的 CVE 视为安全的;它们可能已被利用但尚未被收录
- 忽视"勒索软件利用"字段,该字段标识最紧迫的威胁
- 仅将 KEV 用于合规,而不整合到整体风险管理中

## 相关技能
- prioritizing-vulnerabilities-with-cvss-scoring
- building-vulnerability-data-pipeline-with-api
- implementing-threat-intelligence-scoring
- implementing-vulnerability-remediation-sla

Related Skills

performing-yara-rule-development-for-detection

9
from killvxk/cybersecurity-skills-zh

通过识别可执行文件中的唯一字节模式、字符串和行为指标,开发精准的 YARA 恶意软件检测规则,同时将误报率降至最低。

performing-wireless-security-assessment-with-kismet

9
from killvxk/cybersecurity-skills-zh

使用 Kismet 通过被动射频监控进行无线网络安全评估,检测流氓接入点(Rogue AP)、隐藏 SSID、弱加密和未授权客户端。

performing-wireless-network-penetration-test

9
from killvxk/cybersecurity-skills-zh

执行无线网络渗透测试,通过捕获握手包、破解 WPA2/WPA3 密钥、检测流氓接入点以及使用 Aircrack-ng 和相关工具测试无线网络分段,评估 WiFi 安全性。

performing-windows-artifact-analysis-with-eric-zimmerman-tools

9
from killvxk/cybersecurity-skills-zh

使用 Eric Zimmerman 的开源 EZ Tools 套件(包括 KAPE、MFTECmd、PECmd、LECmd、JLECmd 和 Timeline Explorer)执行全面的 Windows 取证制品分析,解析注册表 hive、预取文件、事件日志和文件系统元数据。

performing-wifi-password-cracking-with-aircrack

9
from killvxk/cybersecurity-skills-zh

在授权无线安全评估中捕获 WPA/WPA2 握手包,并使用 aircrack-ng、hashcat 和字典攻击进行离线密码破解, 以评估密码短语强度和无线网络安全状况。

performing-web-cache-poisoning-attack

9
from killvxk/cybersecurity-skills-zh

在授权安全测试期间,通过未纳入缓存键的头部和参数毒化缓存响应,利用 Web 缓存机制向其他用户投递恶意内容。

performing-web-cache-deception-attack

9
from killvxk/cybersecurity-skills-zh

通过利用 CDN 缓存层与源服务器之间的路径规范化差异,执行 Web 缓存欺骗攻击,从而缓存并获取敏感的已认证内容。

performing-web-application-vulnerability-triage

9
from killvxk/cybersecurity-skills-zh

使用 OWASP 风险评级方法论对 DAST/SAST 扫描器的 Web 应用程序漏洞发现进行分类,区分真阳性和假阳性,并确定修复优先级。

performing-web-application-scanning-with-nikto

9
from killvxk/cybersecurity-skills-zh

Nikto 是一款开源 Web 服务器和 Web 应用程序扫描器,可针对超过 7,000 个潜在危险文件/程序进行测试,检查超过 1,250 个服务器的过期版本,并识别超过 270 个服务器的版本特定问题。

performing-web-application-penetration-test

9
from killvxk/cybersecurity-skills-zh

遵循 OWASP Web 安全测试指南(WSTG)方法论,对 Web 应用程序执行系统化安全测试,识别认证、授权、 输入验证、会话管理和业务逻辑中的漏洞。测试人员以 Burp Suite 作为主要拦截代理,结合手动测试技术 发现自动化扫描器遗漏的缺陷。适用于 Web 应用渗透测试、OWASP 测试、应用安全评估或 Web 漏洞测试等请求场景。

performing-web-application-firewall-bypass

9
from killvxk/cybersecurity-skills-zh

使用编码技术、HTTP 方法操控、参数污染和载荷混淆绕过 Web 应用防火墙保护,将 SQL 注入、XSS 及其他攻击载荷穿透 WAF 检测规则。

performing-vulnerability-scanning-with-nessus

9
from killvxk/cybersecurity-skills-zh

使用 Tenable Nessus 执行认证和未认证漏洞扫描,识别网络基础设施、服务器和应用程序中的已知漏洞、 错误配置、默认凭据和缺失补丁。扫描器将发现与 CVE 数据库和 CVSS 评分关联,生成优先级修复指导。 适用于漏洞扫描、Nessus 评估、补丁合规检查或自动化漏洞检测等请求场景。