Luke4721/threat_intel_pipeline

GitHub: Luke4721/threat_intel_pipeline

自动化威胁情报处理管道,提升安全响应速度。

Stars: 0 | Forks: 0

# 威胁情报聚合器:自主式安全运营中心(SOC)管道 ## 商业价值 安全运营中心(SOC)在处理大量误报中感到力不从心。威胁情报聚合器是一个生产级管道,旨在自动化对损害指标(IOC)的初步分类。通过从顺序处理转向并发架构,并叠加一个代理式LLM进行综合分析,该工具大幅缩短了安全分析师的平均响应时间(MTTR)。 ## 核心架构 * **异步摄取(`collector.py`):** 使用 `asyncio` 和 `aiohttp` 进行非阻塞、并发的API调用到VirusTotal。提取手术式情报(CIDR块、声誉比率)同时丢弃膨胀的JSON开销。 * **持久状态账本(`database.py`):** 使用 `sqlite3` 进行本地状态管理。实现 `INSERT OR REPLACE`(插入或替换)约束,以确保IOC活动的历史记录无重复。 * **LLM综合层(`reporter.py`):** 集成 `google-genai` SDK(Gemini 2.5 Flash)作为自动化的Tier 1分析师。评估持久账本并生成包含计算出的Block/Monitor/Ignore指令的行政 `triage_report.md` 报告。 ## 前置条件 * Python 3.10+ * [VirusTotal API密钥](https://www.virustotal.com/) * [Google Gemini API密钥](https://aistudio.google.com/) ## 部署与执行 **1. 环境初始化** 克隆仓库并将依赖项隔离,以防止系统冲突: ``` python -m venv venv # Windows: venv\Scripts\activate | macOS/Linux: source venv/bin/activate pip install aiohttp python-dotenv google-genai pip freeze > requirements.txt 2. Credential Management Create a .env file in the root directory. Ensure this is ignored by version control. Plaintext VT_API_KEY=your_virustotal_api_key_here GEMINI_API_KEY=your_gemini_api_key_here 3. Pipeline Execution Execute Phase 1 to asynchronously fetch and store intelligence: Bash python collector.py Execute Phase 2 to trigger the LLM analysis and generate the Markdown report: Bash python reporter.py Extensibility The pipeline currently processes IOCs defined within the orchestrator. For enterprise scale, collector.py can be modified to ingest line-delimited targets.txt files or connect directly to a SIEM webhook for real-time analysis. Your storefront is now as sharp as the blade itself. Lock it into GitHub ```
标签:逆向工具