Diogo-Damasceno/threat-intel

GitHub: Diogo-Damasceno/threat-intel

一个轻量级威胁情报平台,提供 IOC 的存储、自动类型检测、智能去重、批量导入和 REST API 查询功能。

Stars: 0 | Forks: 0

# 威胁情报平台 (TIP) 🌐 用于存储、查询和共享**入侵指标 (IOCs)** —— 包括 IPs、domains、URLs、hashes (MD5/SHA1/SHA256) 和恶意 emails —— 的平台。具备**类型自动检测**、过滤搜索、批量导入和 **API REST**(纯标准库,无依赖)。 ## 功能 - IOC 类型的**自动检测** - 智能去重(更新 `last_seen`/confidence 而非重复添加) - 字段:`threat`、`source`、`confidence` (0–100)、`tags`、`first_seen`、`last_seen` - 按类型、威胁和最低 confidence 进行**搜索** - 从文件**批量导入**(每行一个 IOC,忽略 `#` 注释) - **API REST**:`/health`、`/stats`、`/lookup`、`/search`、`POST /ioc` - 基于 **SQLite** 持久化存储 ## 安装说明 ``` git clone https://github.com/Diogo-Damasceno/threat-intel.git cd threat-intel pip install -e . ``` ## 使用说明 (CLI) ``` tip add 185.220.101.5 --threat C2 --source honeypot --confidence 90 tip add evil-phish.tk --threat phishing tip lookup 185.220.101.5 tip search --type ip --min-confidence 80 tip import iocs.txt --threat ransomware --source feed-x tip stats ``` ## API REST ``` tip serve --port 8088 ``` ``` # 添加 IOC curl -X POST http://127.0.0.1:8088/ioc \ -H 'Content-Type: application/json' \ -d '{"value":"9.9.9.9","threat":"C2","confidence":95}' # 查询 curl 'http://127.0.0.1:8088/lookup?value=9.9.9.9' curl 'http://127.0.0.1:8088/search?type=ip&min_confidence=80' curl http://127.0.0.1:8088/stats ``` ## 与产品组合集成 此 TIP 是核心 *hub*:**Honeypot** 提供 IOCs,**Malware Analyzer** 导出 hashes/URLs,**Phishing Detector** 查询 domains。它们共同构成了 **SentinelAI** 的基础。 ## 测试 ``` pip install -e '.[dev]' pytest -q ``` ## 许可证 MIT
标签:API, Python, SQLite, 威胁情报, 安全, 开发者工具, 文档结构分析, 无后门, 网络安全, 网络测绘, 超时处理, 逆向工具, 隐私保护