BrizoSec/sec4710
GitHub: BrizoSec/sec4710
ATHF 是一个基于 Python 和 Markdown 的智能威胁狩猎框架,为安全团队提供狩猎记录持久化、结构化流程和 AI 辅助分析能力。
Stars: 0 | Forks: 0
# Agentic Threat Hunting Framework (ATHF)

[](https://pypi.org/project/agentic-threat-hunting-framework/)
[](https://pypi.org/project/agentic-threat-hunting-framework/)
[](https://www.python.org/downloads/)
[](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/LICENSE)
[](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/stargazers)
**[快速开始](#-quick-start)** • **[安装说明](#installation)** • **[文档](#documentation)** • **[示例](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/SHOWCASE.md)**
*为您的威胁狩猎计划赋予记忆与自主能力。*
**Agentic Threat Hunting Framework (ATHF)** 是您威胁狩猎计划的记忆和自动化层。它为您的狩猎提供结构、持久性和上下文 - 让每一次过去的调查都能被人类和 AI 访问。
ATHF 可与任何狩猎方法论(PEAK、TaHiTI 或您自己的流程)配合使用。它不是替代品;它是让您现有流程具备 AI 就绪能力的层级。
## 什么是 ATHF?
ATHF 为威胁狩猎计划提供结构和持久性。它是一个基于 markdown 的框架,它可以:
- 使用 LOCK 模式(Learn → Observe → Check → Keep)记录狩猎
- 维护一个可搜索的过去调查存储库
- 使 AI 助手能够参考您的环境和先前的工作
- 适用于任何 SIEM/EDR 平台
- **新功能:** 包含 AI 驱动的研究和假设生成 agent (v0.3.0+)
## 问题所在
大多数威胁狩猎计划在一次狩猎结束后就会丢失有价值的上下文。笔记散落在 Slack 或工单中,查询语句写一次就被遗忘,而经验教训只存在于分析师的脑海中。
即使是 AI 工具,如果无法访问您的环境、数据或过去的狩猎,每次也只能从零开始。
ATHF 通过为您的狩猎提供结构、持久性和上下文来改变这一点。
**阅读更多:** [docs/why-athf.md](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/why-athf.md)
## LOCK 模式
每次威胁狩猎都遵循相同的基本循环:**Learn → Observe → Check → Keep**。

- **Learn(学习):** 从威胁情报、警报或异常中收集上下文
- **Observe(观察):** 形成关于对手行为的假设
- **Check(检查):** 使用有针对性的查询来测试假设
- **Keep(保留):** 记录发现和经验教训
**为什么使用 LOCK?** 它足够小巧便于使用,同时又足够严谨以便 agent 解析。通过以这种格式捕获每次狩猎,ATHF 使 AI 助手能够回忆起先前的工作,并基于过去的结果建议优化的查询。
**阅读更多:** [docs/lock-pattern.md](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/lock-pattern.md)
## Agentic 狩猎的五个级别
ATHF 定义了一个简单的成熟度模型。每个级别都建立在前一个级别的基础之上。
**大多数团队将处于级别 1–2。除此之外的所有内容都是可选的成熟度提升。**

| 级别 | 能力 | 您将获得什么 |
|-------|-----------|--------------|
| **0** | Ad-hoc | 狩猎存在于 Slack、工单或分析师笔记中 |
| **1** | 已记录 | 使用 LOCK 的持久狩猎记录 |
| **2** | 可搜索 | AI 读取并回忆您的狩猎 |
| **3** | 生成式 | AI 通过 MCP 工具执行查询,进行研究 |
| **4** | Agentic | 自主 agent 进行监控和行动,生成假设 |
**级别 1:** 一天内投入运行
**级别 2:** 一周内投入运行
**级别 3:** 2-4 周(可选)
**级别 4:** 1-3 个月(可选)
**阅读更多:** [docs/maturity-model.md](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/maturity-model.md)
## 🚀 快速开始
### 选项 1:从 PyPI 安装(推荐)
```
# 安装 ATHF
pip install agentic-threat-hunting-framework
# 初始化你的 hunt program
athf init
# NEW: 在 hunting 前进行研究(5-skill methodology)
athf research new --topic "LSASS dumping" --technique T1003.001
# 创建你的第一个 hunt(link to research)
athf hunt new --technique T1003.001 --title "LSASS Credential Dumping" --research R-0001
```
### 选项 2:从源码安装(开发)
```
# 从 source 克隆并安装
git clone https://github.com/Nebulock-Inc/agentic-threat-hunting-framework
cd agentic-threat-hunting-framework
pip install -e .
# 初始化并开始 hunting
athf init
athf hunt new --technique T1003.001
```
### 选项 3:纯 Markdown(免安装)
```
# Clone the repository
git clone https://github.com/Nebulock-Inc/agentic-threat-hunting-framework
cd agentic-threat-hunting-framework
# 复制 template 并开始记录
mkdir -p hunts
cp athf/data/templates/HUNT_LOCK.md hunts/H-0001.md
# 使用你的环境自定义 AGENTS.md
# 添加你的 SIEM、EDR 和数据源
```
**选择您的 AI 助手:** Claude Code、GitHub Copilot 或 Cursor - 任何可以读取您存储库文件的工具。
**完整指南:** [docs/getting-started.md](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/getting-started.md)
## 🔧 CLI 命令
ATHF 包含一个功能齐全的 CLI,用于管理您的狩猎。以下是快速参考:
### 初始化工作区
```
athf init # Interactive setup
athf init --non-interactive # Use defaults
```
### 研究与假设生成(v0.3.0 新增)
```
# 进行全面的 pre-hunt 研究(15-20 分钟)
athf research new --topic "LSASS dumping" --technique T1003.001
# 针对紧急 hunts 的快速研究(5 分钟)
athf research new --topic "Pass-the-Hash" --depth basic
# 从 threat intel 生成 AI 驱动的 hypothesis
athf agent run hypothesis-generator --threat-intel "APT29 targeting SaaS"
# 列出 research 和 agents
athf research list
athf agent list
```
### 创建狩猎
```
athf hunt new # Interactive mode
athf hunt new \
--technique T1003.001 \
--title "LSASS Dumping Detection" \
--platform windows \
--research R-0001 # Link to research document
```
### 列出与搜索
```
athf hunt list # Show all hunts
athf hunt list --status completed # Filter by status
athf hunt list --directory test # Filter by environment (test/production)
athf hunt list --output json # JSON output
athf hunt search "kerberoasting" # Full-text search
athf hunt search "credential" --directory production # Search with directory filter
athf research search "credential" # Search research docs
```
### 验证与统计
```
athf hunt validate # Validate all hunts
athf hunt validate H-0001 # Validate specific hunt
athf hunt stats # Show statistics
athf hunt coverage # MITRE ATT&CK coverage
athf research stats # Research metrics
```
### ATT&CK 数据管理(v0.11.0 新增)
```
# 安装 STIX 支持(可选)
pip install 'athf[attack]'
# 下载实时的 ATT&CK 数据(包含完整 metadata 的 835+ techniques)
athf attack update
# 检查 provider 状态
athf attack status
# 查找 technique metadata
athf attack lookup T1003.001
# 列出某个 tactic 的 techniques
athf attack techniques credential-access
```
如果没有 `mitreattack-python`,ATHF 会使用硬编码的 v14 回退方案(14 个战术,近似计数)。如果安装了它,您将获得完整的技术元数据:平台、数据源、子技术以及准确的计数。
### MCP Server(v0.11.0 新增)
```
# 安装 MCP 依赖
pip install 'athf[mcp]'
# 启动 MCP 服务器(用于 Claude Code、Copilot、Cursor 等)
athf mcp serve --workspace /path/to/hunts
```
在 `~/.claude/mcp-servers.json` 中配置:
```
{
"athf": {
"command": "athf-mcp",
"env": { "ATHF_WORKSPACE": "/path/to/your/hunts" }
}
}
```
独立的 `athf-mcp` 入口点会从 cwd 或 `ATHF_WORKSPACE` 环境变量自动检测您的工作区。对于显式路径,请使用 `athf mcp serve --workspace /path`。
暴露 17 个工具:狩猎管理、语义搜索、ATT&CK 覆盖率、研究、调查和 AI 驱动的假设生成 — 所有这些都可以直接从您的 AI 编码助手中访问。
**完整文档:** [CLI 参考](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/CLI_REFERENCE.md)
## 📺 查看实际运行效果

观看 ATHF 的实际运行:在 60 秒内初始化工作区、创建狩猎并探索您的威胁狩猎目录。
**[查看示例狩猎 →](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/SHOWCASE.md)**
## 安装
有关安装选项(PyPI、源码或纯 markdown),请参阅上方的[快速开始](#-quick-start)部分。
**前置条件:**
- Python 3.8-3.13(适用于 CLI 选项)
- 您最喜欢的 AI 代码助手
## 文档
### 核心概念
- [为什么会有 ATHF](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/why-athf.md) - 问题与解决方案
- [LOCK 模式](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/lock-pattern.md) - 所有狩猎的结构
- [成熟度模型](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/maturity-model.md) - 五个级别的解释
- [入门指南](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/getting-started.md) - 逐步引导的入门教程
### 特定级别指南
- [级别 1:文档化狩猎](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/maturity-model.md#level-1-documented-hunts)
- [级别 2:可搜索记忆](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/maturity-model.md#level-2-searchable-memory)
- [级别 3:生成式能力](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/level4-agentic-workflows.md)
- [级别 4:Agentic 工作流](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/level4-agentic-workflows.md)
### 集成与定制
- [安装与开发](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/INSTALL.md) - 设置、分支定制、测试
- [MCP 目录](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/integrations/MCP_CATALOG.md) - 可用的工具集成
- [快速入门指南](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/tree/main/integrations/quickstart/) - 特定工具的设置
- [使用 ATHF](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/USING_ATHF.md) - 采用与定制
## 🎖️ 精选狩猎
### H-0001:macOS 信息窃取程序检测
检测到 Atomic Stealer 通过 AppleScript 收集 Safari cookie。
**结果:** 1 个真阳性,主机在数据外泄前被隔离。
**关键洞察:** 基于行为的检测优于基于特征的检测。进程签名验证识别出了尝试收集数据的未签名恶意软件。
[查看完整狩猎 →](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/hunts/H-0001.md) | [查看更多示例 →](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/SHOWCASE.md)
## 为什么这很重要
您可能想知道它如何与 [PEAK](https://www.splunk.com/en_us/blog/security/peak-threat-hunting-framework.html) 等框架交互。PEAK 为您提供了一种可靠的狩猎方法。ATHF 建立在这一基础之上,为您提供结构、记忆和连续性。PEAK 指导工作。ATHF 确保您捕获工作成果,将其组织起来,并在未来的狩猎中重复使用。
Agentic 威胁狩猎不是要取代分析师。而是要构建能够做到以下几点的系统:
- 记住以前做过的事情
- 从过去的成功和错误中学习
- 通过上下文回忆支持人类判断
当您的框架具备记忆时,您就不会再因为人员流动或遗忘的笔记而丢失知识。当您的 AI 助手能够引用这些记忆时,它就成为了力量倍增器。
## 🛠️ 开发与定制
ATHF 的设计初衷就是为了让您的组织进行分叉(fork)和定制。
**请参阅 [docs/INSTALL.md#development--customization](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/INSTALL.md#development--customization) 了解:**
- 为开发设置您的 fork
- 用于代码质量的 Pre-commit hooks
- 测试和类型检查
- 定制示例
- CI/CD 集成
快速开始:
```
pip install -e ".[dev]" # Install dev dependencies
pre-commit install # Set up quality checks
pytest tests/ -v # Run tests
```
## 👤 作者
由 **Sydney Marrone** 创建 © 2025
**从小处着手。记录一次狩猎。添加结构。构建记忆。**
记忆是倍增器。自主能力是推动力。
一旦您的程序具备了记忆能力,其他一切皆有可能。
祝您狩猎愉快!
标签:LLM Agent, Python, 无后门, 知识管理, 网络安全, 网络调试, 自动化, 逆向工具, 防御加固, 隐私保护