trilwu/apttrail

GitHub: trilwu/apttrail

从 Maltrail 提取 APT 威胁指标并转换为 STIX、YARA、Sigma、Suricata、MISP 等多种安全工具可直接消费的标准格式。

Stars: 2 | Forks: 1

# APTtrail - APT 威胁情报源收集器 **APTtrail** 是一个自动化威胁情报收集器,用于将来自 [Maltrail](https://github.com/stamparm/maltrail) 仓库的指标处理为多种标准格式。 [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/6a2fbd9829223227.svg)](https://github.com/trilwu/apttrail/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ## 🚀 功能 - **多格式导出**:JSON、CSV、STIX 2.1、Suricata、YARA、MISP 和 Sigma。 - **Git 集成**:自动更新源仓库并提取提交时间戳。 - **优化**:生成高性能的 Suricata 规则(regex 优化)。 - **类型安全**:完全类型化的 Python 代码库,配合 Pydantic 验证。 - **Docker 化**:开箱即用的容器镜像。 ## 📦 安装 ### 从源码安装 ``` git clone https://github.com/trilwu/apttrail.git cd apttrail pip install -e . ``` ### 使用 Docker ``` docker build -t apttrail . docker run -v $(pwd)/feeds:/app/feeds apttrail --json-only ``` ## 🛠 用法 基本用法(收集所有情报源): ``` apttrail ``` 自定义输出目录: ``` apttrail --output-dir /path/to/feeds ``` 指定格式: ``` apttrail --json-only # JSON only apttrail --csv-only # CSV only apttrail --stix-only # STIX 2.1 bundle apttrail --misp-only # MISP event JSON apttrail --sigma-only # Sigma detection rules apttrail --yara-only # YARA rules ``` 启用时间戳收集(较慢,使用 `git blame`): ``` apttrail --collect-timestamps ``` ## 📊 输出格式 | 格式 | 文件 | 描述 | |--------|------|-------------| | **JSON** | `apttrail_threat_feed.json` | 包含元数据的完整结构化数据 | | **CSV** | `apttrail_threat_feed.csv` | 精简的指标列表 | | **STIX** | `apttrail_threat_feed_stix.json` | STIX 2.1 Bundle | | **Suricata** | `apttrail_threat_feed.rules` | IDS 检测规则 | | **YARA** | `apttrail_threat_feed.yar` | 文件扫描规则 | | **MISP** | `apttrail_threat_feed_misp.json` | MISP Event 格式 | | **Sigma** | `apttrail_threat_feed.yaml` | 通用检测规则 | ## 🤝 贡献 请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 了解指南。 ## 📜 许可证 MIT 许可证。详情请见 [LICENSE](LICENSE)。 ## 🙏 致谢 - 由 Miroslav Stampar 开发的 [Maltrail](https://github.com/stamparm/maltrail),提供了出色的数据源。
标签:APT检测, Docker, IDS规则, IoC, Maltrail, Metaprompt, Python, STIX, Suricata, YARA, 云资产可视化, 威胁情报, 威胁源, 安全防御评估, 开发者工具, 指标提取, 数据转换, 无后门, 现代安全运营, 网络安全, 网络安全研究, 请求拦截, 逆向工具, 隐私保护