BlackRoad-Security/blackroad-incident-response
GitHub: BlackRoad-Security/blackroad-incident-response
一款轻量级安全事件响应管理工具,提供 Playbook 自动分配、时间线跟踪、IOC 管理和报告生成等端到端事件生命周期管理能力。
Stars: 0 | Forks: 0
# blackroad-incident-response
[](https://github.com/BlackRoad-Security/blackroad-incident-response/actions/workflows/ci.yml)
端到端事件生命周期管理:创建事件、自动分配 Playbook、跟踪时间线、记录 IOC、衡量驻留时间并生成报告。
## 功能特性
- 🚨 **事件类型**:勒索软件、网络钓鱼、违规、DDoS、内部威胁、供应链
- 📋 **自动分配 Playbook**:根据事件类型自动匹配的最佳实践响应步骤
- ⏱ **时间线跟踪**:每个事件的仅追加按时间顺序操作日志
- 🔍 **IOC 管理**:将 IOC 与事件关联
- 📊 **驻留时间指标**:遏制时间、解决时间
- 📄 **报告生成**:包含完整时间线的格式化事件报告
- 💾 **SQLite**:自包含,零配置
## 快速开始
```
# 加载演示事件
python incident_response.py demo
# 创建勒索软件事件
python incident_response.py create ransomware critical "file-server-01,file-server-02"
# 列出所有事件
python incident_response.py list
# 将事件分配给分析师
python incident_response.py assign alice@company.com
# 添加 IOC
python incident_response.py add-ioc "185.220.101.45" ip
# 添加时间线条目
python incident_response.py timeline "Systems isolated from network" "IT-Admin"
# 标记为已遏制
python incident_response.py contain
# 生成报告
python incident_response.py report
# 测量驻留时间
python incident_response.py dwell
# 列出可用 playbooks
python incident_response.py playbooks
# 查看统计信息
python incident_response.py stats
```
## 事件类型
| 类型 | Playbook 步骤 | 关键联系人 |
|------|---------------|--------------|
| `ransomware` | 8 步:隔离 → 范围确定 → 通知 → 保全 → 恢复 | CISO, 法务, IT, FBI |
| `phishing` | 6 步:撤回邮件 → 识别受害者 → 重置凭证 | CISO, HR, 法务 |
| `breach` | 6 步:确认 → 遏制 → 通知监管机构 | 隐私官, 法务 |
| `ddos` | 5 步:检测 → CDN 防护 → 清洗 | NOC, ISP, CDN |
| `insider` | 自定义步骤 | HR, 法务, CISO |
| `supply_chain` | 自定义步骤 | CISO, 采购 |
## API
```
from incident_response import IncidentResponseDB
db = IncidentResponseDB("incidents.db")
# 创建事件
inc = db.create_incident("ransomware", "critical",
["server-01", "server-02"],
title="Ryuk ransomware detected")
# 添加时间线
db.add_timeline_entry(inc.id, "Systems isolated", "IT-Admin")
# 添加 IOC
db.add_ioc(inc.id, "185.220.101.45", "ip")
# 标记已遏制
db.mark_contained(inc.id)
# 测量驻留时间
dwell = db.calculate_dwell_time(inc.id)
print(f"Time to contain: {dwell['time_to_contain_human']}")
# 生成报告
print(db.generate_report(inc.id))
```
## 运行测试
```
pip install pytest
pytest test_incident_response.py -v
```
标签:CSV输出, DDoS, FTP漏洞扫描, IOC管理, Playbook, Python, SQLite, 事件追踪, 供应链攻击, 内部威胁, 剧本, 勒索软件, 威胁情报, 安全管理, 安全编排, 安全规则引擎, 安全运营, 库, 应急响应, 开发者工具, 扫描框架, 文档安全, 无后门, 时间线跟踪, 生命周期管理, 逆向工具, 驻留时间