Nebulock-Inc/agentic-threat-hunting-framework

GitHub: Nebulock-Inc/agentic-threat-hunting-framework

一个为威胁狩猎活动提供结构化记录、持久化记忆和 AI 就绪能力的 Python 框架,解决狩猎知识散落流失、无法被 AI 有效利用的问题。

Stars: 203 | Forks: 29

# 智能体威胁狩猎框架 (ATHF) ![ATHF Logo](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/a4488d5a66074824.png) [![PyPI version](https://img.shields.io/pypi/v/agentic-threat-hunting-framework)](https://pypi.org/project/agentic-threat-hunting-framework/) [![PyPI downloads](https://img.shields.io/pypi/dm/agentic-threat-hunting-framework)](https://pypi.org/project/agentic-threat-hunting-framework/) [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/LICENSE) [![GitHub stars](https://img.shields.io/github/stars/Nebulock-Inc/agentic-threat-hunting-framework?style=social)](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)** *赋予您的威胁狩猎项目记忆与自主能力。* **智能体威胁狩猎框架 (ATHF)** 是您威胁狩猎项目的记忆与自动化层。它为您的狩猎活动提供结构、持久性和上下文——使每一次过去的调查都能被人类和 AI 访问。 ATHF 适用于任何狩猎方法论(PEAK、TaHiTI 或您自己的流程)。它不是替代品;它是让您现有流程具备 AI 就绪能力的层级。 ## 什么是 ATHF? ATHF 为威胁狩猎项目提供结构和持久性。这是一个基于 Markdown 的框架,它: - 使用 LOCK 模式(Learn 学习 → Observe 观察 → Check 检查 → Keep 保留)记录狩猎活动 - 维护一个可搜索的历史调查库 - 使 AI 助手能够引用您的环境和过往工作 - 适用于任何 SIEM/EDR 平台 - **新增:** 包含 AI 驱动的研究和假设生成智能体 (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 保留**。 ![The LOCK Pattern](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/26eb707a0a074826.png) - **Learn (学习):** 从威胁情报、警报或异常中收集上下文 - **Observe (观察):** 形成关于对手行为的假设 - **Check (检查):** 通过针对性查询测试假设 - **Keep (保留):** 记录发现和经验教训 **为什么是 LOCK?** 它足够精简以便使用,又足够严谨以便智能体解析。通过以此格式捕获每一次狩猎,ATHF 使 AI 助手能够回忆过往工作,并基于过去的结果建议优化后的查询。 **了解更多:** [docs/lock-pattern.md](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/lock-pattern.md) ## 智能体狩猎的五个等级 ATHF 定义了一个简单的成熟度模型。每个级别都建立在前一个级别的基础上。 **大多数团队将处于 Level 1–2。除此之外的所有内容都是可选的成熟度进阶。** ![The Five Levels](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/59611ff8a5074828.png) | Level | Capability | What You Get | |-------|-----------|--------------| | **0** | Ad-hoc | 狩猎记录存在于 Slack、工单或分析师笔记中 | | **1** | Documented | 使用 LOCK 的持久化狩猎记录 | | **2** | Searchable | AI 读取并回忆您的狩猎记录 | | **3** | Generative | AI 通过 MCP 工具执行查询,进行研究 | | **4** | Agentic | 自主智能体监控并行动,生成假设 | **Level 1:** 一天内可运行 **Level 2:** 一周内可运行 **Level 3:** 2-4 周(可选) **Level 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 程序 athf init # 新功能:在 hunting 前进行研究 (5-skill methodology) athf research new --topic "LSASS dumping" --technique T1003.001 # 创建你的第一个 hunt (链接到 research) athf hunt new --technique T1003.001 --title "LSASS Credential Dumping" --research R-0001 ``` ### 选项 2:从源码安装(开发模式) ``` # Clone 并从源码安装 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 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 research (15-20 分钟) athf research new --topic "LSASS dumping" --technique T1003.001 # 针对紧急 hunt 的快速 research (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 ``` **完整文档:** [CLI 参考](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/CLI_REFERENCE.md) ## 📺 实战演示 ![ATHF Demo](https://raw.githubusercontent.com/Nebulock-Inc/agentic-threat-hunting-framework/main/assets/athf-cli-workflow.gif) 观看 ATHF 的实际操作:初始化工作区、创建狩猎活动,并在 60 秒内探索您的威胁狩猎目录。 **[查看示例狩猎 →](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/SHOWCASE.md)** ## 安装说明 请参阅上方的 [快速入门](#-quick-start) 部分了解安装选项(PyPI、源码或纯 Markdown)。 **前置条件:** - 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) - 分步引导 ### 特定级别指南 - [Level 1:文档化狩猎](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/maturity-model.md#level-1-documented-hunts) - [Level 2:可搜索记忆](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/maturity-model.md#level-2-searchable-memory) - [Level 3:生成式能力](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/level4-agentic-workflows.md) - [Level 4:智能体工作流](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 cookies。 **结果:** 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 确保您捕获工作、组织工作,并在未来的狩猎中重用它。 智能体威胁狩猎不是要取代分析师。而是要构建能够: - 记住以前做过什么的系统 - 从过去的成功和错误中学习 - 通过上下文回忆支持人类判断 当您的框架拥有记忆时,您就不会再因为人员流动或遗忘的笔记而丢失知识。当您的 AI 助手能够引用这些记忆时,它就成为了力量倍增器。 ## 💬 社区与采用 - **GitHub Discussions:** [提问、分享狩猎经验](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/discussions) - **Issues:** [报告 Bug 或请求功能](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/issues) - **LinkedIn:** [Nebulock Inc.](https://www.linkedin.com/company/nebulock-inc) - 关注获取更新 **在您的组织中使用 ATHF:** ATHF 是一个供内部化的框架,而不是一个供扩展的平台。分叉它,定制它,让它成为您的。请参阅 [USING_ATHF.md](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/USING_ATHF.md) 获取采用指南。您的狩猎记录属于您——分享是可选的,但我们非常感激。 **仓库:** [https://github.com/Nebulock-Inc/agentic-threat-hunting-framework](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework) 目标是帮助每个威胁狩猎团队从临时的记忆模式转变为结构化的智能体能力。 ## 🛠️ 开发与定制 ATHF 旨在被分叉并为您的组织进行定制。 **请参阅 [docs/INSTALL.md#development--customization](https://github.com/Nebulock-Inc/agentic-threat-hunting-framework/blob/main/docs/INSTALL.md#development--customization) 了解:** - 设置您的分叉以进行开发 - 用于代码质量的 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 **从小处着手。记录一次狩猎。添加结构。构建记忆。** 记忆是倍增器。智能体是动力。 一旦您的程序拥有了记忆,一切皆有可能。 祝狩猎愉快!
标签:Cloudflare, EDR集成, FTP漏洞扫描, HTTP工具, MITRE ATT&CK, Pypi, Python框架, SecOps, SIEM集成, Web报告查看器, 云安全架构, 代理式AI, 大模型安全, 安全编排, 安全运营, 扫描框架, 持续学习, 插件系统, 文档结构分析, 知识管理, 网络安全, 网络安全审计, 自主智能体, 记忆系统, 逆向工具, 防御加固, 隐私保护