jac-mon/threat-control-mapper
GitHub: jac-mon/threat-control-mapper
该工具将 MITRE ATT&CK 技术映射到 NIST 800-53 控制项,并通过 Sigma 规则分析检测覆盖缺口,帮助安全团队弥合检测工程与合规治理之间的鸿沟。
Stars: 0 | Forks: 0
# Threat-to-Control Mapper
一款命令行工具,用于将 MITRE ATT&CK 技术映射到 NIST 800-53 Rev 5 控制项,并利用用户提供的 Sigma 规则识别检测覆盖缺口。
该工具旨在弥合检测工程与治理、风险和合规 (GRC) 之间的鸿沟——旨在回答这样一个问题:*我的检测策略究竟满足了哪些合规控制项的要求?又在哪里存在盲区?*
## 解决的问题
安全团队编写检测规则。GRC 团队管理控制框架。这两项职能很少以结构化、可重复的方式进行交流。
该工具将这种关系实际落地:
- 给定一组 Sigma 检测规则,它们覆盖了哪些 ATT&CK 技术?
- 这种覆盖支持哪些 NIST 800-53 控制项?
- 检测缺口在哪里,进而导致哪些控制项未被覆盖?
该输出可同时用于为 POA&M 条目、持续监控报告以及检测工程优先级提供指导。
## 工作原理
```
Sigma Rules (.yaml)
+
ATT&CK → 800-53 Mapping (.yaml)
↓
detection_compliance.py (CLI)
↓
Console Summary + Gap Report (.md)
```
1. 将您的 Sigma 规则放入 `sigma_rules/` 目录
2. 针对单个技术或所有技术运行 `detection_compliance.py`
3. 查看缺口报告,以识别哪些 800-53 控制项缺乏检测支持
## 项目结构
```
threat-control-mapper/
├── mappings/
│ └── attck_to_80053.yaml # ATT&CK technique → NIST 800-53 control mappings
├── sigma_rules/
│ └── *.yaml # User-supplied Sigma detection rules
├── scripts/
│ └── detection_compliance.py # CLI tool
├── reports/
│ └── gap_report.md # Auto-generated output (see example below)
├── requirements.txt
└── README.md
```
## 设置
```
git clone https://github.com/[your-username]/threat-control-mapper.git
cd threat-control-mapper
pip install -r requirements.txt
```
## 用法
**分析单个技术:**
```
python scripts/detection_compliance.py --technique T1059.001
```
**分析映射文件中的所有技术:**
```
python scripts/detection_compliance.py --all
```
**生成 Markdown 格式的缺口报告:**
```
python scripts/detection_compliance.py --all --output reports/gap_report.md
```
## 输出示例
```
============================================================
THREAT-TO-CONTROL MAPPER — RESULTS
============================================================
[✅ COVERED] T1059.001 — PowerShell
Tactic: Execution
Controls: AU-2, AU-12, CM-6, CM-7, SI-4
Rules: PowerShell Encoded Command Execution
[❌ GAP] T1078 — Valid Accounts
Tactic: Defense Evasion, Persistence, Privilege Escalation, Initial Access
Controls: AC-2, AC-3, AC-7, IA-2, IA-5, AU-2, SI-4
Rules: None — detection gap identified
```
完整的 Markdown 报告包含一份执行摘要表、各技术的控制项明细,以及按优先级排列的建议检查清单。
## 添加您的 Sigma 规则
将任何符合 Sigma 标准的 `.yaml` 文件放入 `sigma_rules/` 目录。该工具会读取 `tags` 字段以提取 ATT&CK 技术 ID:
```
tags:
- attack.execution
- attack.t1059.001 # ← This is what the tool uses for mapping
```
只要您的规则遵循标准的 Sigma 标签格式,它就会被自动识别。
## 扩展映射文件
`mappings/attck_to_80053.yaml` 目前涵盖 10 项高优先级技术。要添加更多内容:
```
- technique_id: T1055
technique_name: Process Injection
tactic: Defense Evasion, Privilege Escalation
controls:
- id: SI-4
name: System Monitoring
rationale: Monitors for anomalous process memory behavior
- id: AU-12
name: Audit Record Generation
rationale: Captures process creation and access events
```
映射的依据应参考 NIST SP 800-53 Rev 5 中的具体控制目标。
## 相关框架
- [MITRE ATT&CK v14](https://attack.mitre.org/)
- [NIST SP 800-53 Rev 5](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final)
- [Sigma 规范](https://github.com/SigmaHQ/sigma/wiki/Specification)
## 数据来源与参考
本项目中 ATT&CK 到 NIST 800-53 的映射源自由 [威胁知情防御中心 (CTID)](https://ctid.mitre.org/) 维护的官方数据集。
| 资源 | 描述 |
|----------|-------------|
| [CTID 映射浏览器](https://center-for-threat-informed-defense.github.io/mappings-explorer/external/nist/) | 用于所有 ATT&CK → 800-53 映射的实时可搜索界面 |
| [attack-control-framework-mappings (分支)](https://github.com/jac-mon/attack-control-framework-mappings) | 本项目基于其构建的分叉参考数据集 |
| [NIST SP 800-53 Rev 5](https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final) | 源控制框架 |
| [MITRE ATT&CK v14](https://attack.mitre.org/) | 源威胁框架 |
| [Sigma 规范](https://github.com/SigmaHQ/sigma/wiki/Specification) | 用作工具输入的检测规则格式 |
## 作者
Jac-Mon | [LinkedIn](https://www.linkedin.com/in/jacquelinemontano/)
标签:GRC, Python, 安全合规, 安全运营, 扫描框架, 无后门, 网络代理, 逆向工具, 防御覆盖度分析