develgroup/ai-incident-response-agent-toolkit
GitHub: develgroup/ai-incident-response-agent-toolkit
一款利用大语言模型在 AWS、Azure、GCP 和 Windows 环境中自动重建攻击路径、映射 MITRE ATT&CK 并辅助人工遏制决策的应急响应工具包。
Stars: 2 | Forks: 0

AI-Driven Incident Response Toolkit
Intelligence-Driven Cybersecurity · www.devel.group
## 这是什么
一个完整、可运行的 AI 事件响应工具包:
- **主操作规范 + 云/主机专家** —
`agents/ir-agent.system.md` + `agents/aws-ir.system.md` +
`agents/azure-ir.system.md` + `agents/gcp-ir.system.md` +
`agents/windows-ir.system.md`。每次调查都从同一个起点 A 开始,并利用双
来源规则向外验证。
- **富化微服务** — 针对 VirusTotal、AbuseIPDB、Shodan、
MalwareBazaar 和 YARA 的 Dockerized HTTP 封装
(`enrichment-agents/`)。
- **云 + 主机遥测工具** — boto3 (AWS)、Microsoft Graph / Sentinel
KQL (Azure)、Windows 事件日志 + Sysmon + 计划任务 + 进程
(Windows)。每个工具都有一个**示例模式**,从
`sample-telemetry/
/*.json` 读取数据,因此整个演示无需任何
云凭据即可运行。
- **攻击图构建器 + ATT&CK 映射器** — 将确认的事件转化为因果
图,并为每个节点标记 MITRE ATT&CK
(`ir_agent/graph/`)。
- **分阶段遏制运行手册** — 内置审批门控的参数化 YAML 操作
(`runbooks/aws`, `runbooks/azure`,
`runbooks/windows`)。
- **深色主题报告渲染器** — `report.html`,包含攻击图、
执行摘要、排序后的运行手册、ATT&CK 覆盖图以及 Devel
Group 品牌 (`ir_agent/report/`)。
- **MCP 就绪工具注册表** — 在
`config/tools.yaml` 中注册的每个工具距离成为 MCP server 清单只有一步之遥。
- **示例警报 + 合成入侵数据集** — AWS 泄露 IAM 密钥、
Azure AiTM token 重放、Windows PsExec 横向移动。
## 文档
| 文档 | 包含内容 |
|-----|--------------|
| [INSTALL.md](INSTALL.md) | git clone → docker compose up → 3 条命令内运行 `ir-agent investigate`。 |
| [EXERCISE.md](EXERCISE.md) | Villa 迷你 CTF — 基于生成的报告回答 5 个取证问题。 |
| [VILLA.md](VILLA.md) | Devel Group villa 宣讲 — 参会者能获得什么,如何带入他们自己的数据集。 |
| [CLAUDE.md](CLAUDE.md) | 提供给 Claude Code 的项目上下文 — 放入这个文件,Claude 就能立即了解该工具包。 |
## 快速开始 — 三条命令
```
git clone https://github.com/develgroup/ai-incident-response-agent-toolkit.git
cd ai-incident-response-agent-toolkit
cp .env.example .env # add ANTHROPIC_API_KEY (+ optional VT/AbuseIPDB/Shodan keys)
docker compose up -d
pip install -e .
# AWS 演示 — sample-mode(无需凭证)
ir-agent investigate --signal alerts/aws-guardduty-cred-exfil.json --sample
```
在任意浏览器中打开 `out/report.html`。
## CLI 参数
```
ir-agent investigate --signal
[--cloud {aws|azure|gcp|windows}] # forces routing
[--enrich ] # see below
[--sample | --live] # default --live
[--out ] # default ./out
```
`--enrich` 的值:
| 值 | 启用的内容 |
|-------|------------------|
| `all` (默认) | 所有五个富化提供者 (VT, AbuseIPDB, Shodan, MalwareBazaar, YARA)。 |
| `none` | 无富化 — 仅限遥测 + 推理。 |
| `virustotal,abuseipdb,shodan,...` | 逗号分隔的提供者 ID。 |
| `vt,ai,sh,mb` | 短别名 (vt=virustotal, ai=abuseipdb, sh=shodan, mb=malwarebazaar)。 |
示例:
```
# 强制 AWS,仅 VirusTotal 的 enrichment
ir-agent investigate --signal alerts/aws-guardduty-cred-exfil.json \
--sample --cloud aws --enrich virustotal
# Azure AiTM 演示
ir-agent investigate --signal alerts/azure-aitm-token-replay.json --sample
# Windows 主机(PsExec 横向移动)
ir-agent investigate --signal alerts/windows-psexec-lateral.json --sample
```
## 确定性演示(无需 Anthropic API 密钥)
本仓库附带了两个脚本,它们驱动与 LLM 完全相同的工具操作界面 — 适用于验证、
CI,或者在不消耗 token 的情况下展示输出:
```
python tools/run_demo.py # AWS leaked-key → snapshot exfil
python tools/run_demo_windows.py # Windows PsExec lateral movement
```
两者都会生成 `out/report.html` (或 `report_windows.html`) 以及匹配的
`report.json`。
## 仓库布局
```
ai-incident-response/
├── README.md · this file
├── INSTALL.md EXERCISE.md VILLA.md CLAUDE.md
├── LICENSE · Apache-2.0
├── docker-compose.yml · 5 enrichment microservices
├── .env.example · API keys + tenant pointers
├── pyproject.toml · the ir-agent CLI package
│
├── agents/ · System prompts (the operating contract)
│ ├── ir-agent.system.md · Master orchestrator contract
│ ├── orchestrator.system.md · Cloud/host-routing wrapper
│ ├── aws-ir.system.md · AWS specialist
│ ├── azure-ir.system.md · Azure / Entra ID / M365 specialist
│ ├── gcp-ir.system.md · GCP / Cloud Identity specialist
│ └── windows-ir.system.md · Windows host specialist
│
├── config/ · Four-layer stack
│ ├── tools.yaml · Tool registry (enrichment + telemetry + action)
│ ├── enrichment.yaml · Enrichment endpoints, rate limits, scoring
│ ├── mitre-attack-map.yaml · cloud-event / Windows-EventID → ATT&CK
│ ├── tenant.example.aws.yaml
│ ├── tenant.example.azure.yaml
│ └── tenant.example.windows.yaml
│
├── enrichment-agents/ · Dockerized recon / IOC agents
│ ├── virustotal/ abuseipdb/ shodan/ malwarebazaar/ yara/
│
├── ir_agent/ · Python package (CLI + orchestrator)
│ ├── cli.py · ir-agent investigate
│ ├── orchestrator.py · The tool-use loop
│ ├── config.py · Loads tenant + tools.yaml + --enrich filter
│ ├── llm/ · Anthropic SDK wrapper, prompt caching
│ ├── tools/
│ │ ├── enrichment/ · HTTP clients to the docker services
│ │ ├── telemetry/ · boto3 + MS Graph + Windows EventLog
│ │ └── action/ · Staged containment (aws/azure/windows)
│ ├── graph/ · Attack-graph builder, schema, MITRE mapper
│ └── report/ · Dark-themed Jinja2 report.html
│
├── runbooks/ · Containment runbook templates
│ ├── aws/ · revoke-access-key, block-ip-waf, isolate-instance, ...
│ ├── azure/ · revoke-sessions, remove-app-credential, ...
│ └── windows/ · isolate-host, kill-process, disable-account, ...
│
├── alerts/ · Sample Point A signals
│ ├── aws-guardduty-cred-exfil.json
│ ├── azure-aitm-token-replay.json
│ └── windows-psexec-lateral.json
│
├── sample-telemetry/ · Synthetic breach dataset
│ ├── aws/ · cloudtrail / guardduty / vpcflow / iam / config
│ ├── azure/ · signin / audit / activity / graph / officeactivity
│ └── windows/ · security_events / sysmon / scheduled_tasks / processes
│
└── tools/
├── run_demo.py · AWS deterministic demo
└── run_demo_windows.py · Windows deterministic demo
```
## 操作规范
每次调查都遵循 `agents/ir-agent.system.md` 中的规则:
1. **从起点 A 开始。** 一个警报,一个异常。绝不是从空白页开始。
2. **双来源规则。** 每个节点都必须由两个独立的来源确认,
否则标记为 `hypothesis`。
3. **引用一切。** 每个节点和边都引用其日志行、事件
ID 或工具响应。
4. **映射 MITRE ATT&CK。** 每个节点均标记有技术 ID + 名称。
5. **人类拥有不可逆操作的所有权。** 遏制是*分阶段*的 —
agent 永远不会自动执行破坏性更改。
## 采用路径
| 阶段 | 周数 | AI 负责 | 人类负责 |
|-------|-------|---------|-----------|
| **Assist** (协助) | 1–4 | 起草时间线;运行富化 | 验证每个节点,执行所有操作 |
| **Accelerate** (加速) | 第 2-3 个月 | 负责富化 + 图谱构建;规划遏制阶段 | 决策、审批、执行 |
| **Orchestrate** (编排) | 第 4 个月及以后 | 运行完整循环,预置遏制措施 | 在门控处进行审批 |
## 报告安全问题
请**不要**针对此工具包中的漏洞公开 GitHub issue。请发送邮件至
`security@devel.group` 提供详细信息,我们将在 72 小时内回复。
## 引用
如果此工具包对已发表的研究、培训材料或
公开的事件分析报告有所启发,欢迎引用:
```
@software{devel_ai_ir_toolkit,
title = {AI-Driven Incident Response Toolkit},
author = {Fern{\'a}ndez, Camilo and {Devel Group · Red Spears Labs}},
year = {2026},
url = {https://github.com/develgroup/ai-incident-response-agent-toolkit},
note = {Apache-2.0}
}
```
## 许可证
Apache-2.0 — 详见 [LICENSE](LICENSE)。欢迎贡献代码。专为
拉美银行业和金融科技构建,面向全球安全社区发布。
Devel Group · Red Spears Labs
情报驱动的网络安全
www.devel.group
标签:HTTP工具, 人工智能, 威胁情报, 安全运营, 库, 应急响应, 开发者工具, 扫描框架, 版权保护, 用户模式Hook绕过, 逆向工具