IshtiakNihal/Automated-Cyber-Threat-Intelligence-CTI-Platform-Your-Own-Threat-Feed

GitHub: IshtiakNihal/Automated-Cyber-Threat-Intelligence-CTI-Platform-Your-Own-Threat-Feed

一套完全自动化、自托管的威胁情报平台,从多源OSINT持续收集IOC并自动丰富、评分和关联,通过REST API和OpenCTI/MISP提供可查询的情报数据。

Stars: 0 | Forks: 0

# 🛡️ 自动化网络威胁情报 (CTI) 平台 一个完全自动化、自托管的威胁情报平台,持续从多个 OSINT 来源收集失陷指标,使用上下文数据对其进行丰富、对指标进行去重,并通过 REST API 将其暴露——所有这些均通过 Docker 容器编排,并配备 Prometheus/Grafana 监控。 ![Grafana Dashboard](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/82e8c89f59165129.png) ## 📋 目录 - [概述](#overview) - [架构](#architecture) - [功能特性](#features) - [技术栈](#tech-stack) - [项目结构](#project-structure) - [前置条件](#prerequisites) - [快速开始](#quick-start) - [服务与端口](#services--ports) - [数据库 Schema](#database-schema) - [API 参考](#api-reference) - [收集管道](#collection-pipeline) - [丰富引擎](#enrichment-engine) - [威胁评分](#threat-scoring) - [监控与仪表板](#monitoring--dashboards) - [截图](#screenshots) - [测试](#testing) - [配置](#configuration) - [故障排除](#troubleshooting) - [未来增强](#future-enhancements) - [许可证](#license) ## 概述 该平台解决了威胁情报运营中的核心挑战:**将来自不同来源的 IOC 聚合、标准化并丰富为单一、可查询的情报数据库。** 系统从 8 个以上的 OSINT 源(AlienVault OTX、AbuseIPDB、Phishtank、CISA KEV、Shodan、URLhaus、Feodo Tracker、ThreatFox)摄取威胁数据,通过多阶段丰富管道运行,计算基于置信度的威胁评分,并将所有内容存储在带有 Elasticsearch 索引的 PostgreSQL 中。 具有基于令牌的身份验证的 Flask REST API 公开了用于 SIEM/SOAR 集成的情报,而 OpenCTI 和 MISP 提供基于图的威胁关系可视化和事件关联。 ## 架构 ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ CTI PLATFORM - SYSTEM ARCHITECTURE │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ COLLECTION LAYER (Python) │ │ │ │ AlienVault OTX │ AbuseIPDB │ Phishtank │ CISA KEV │ │ │ │ Shodan │ URLhaus │ Feodo Tracker │ ThreatFox │ │ │ │ ► Scheduled via APScheduler (every 6 hours) │ │ │ │ ► Hash-based deduplication (SHA-256 of value+type) │ │ │ └──────────────────────────┬────────────────────────────────────────┘ │ │ ▼ │ │ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ ENRICHMENT LAYER (Python) │ │ │ │ VirusTotal │ IPInfo │ WHOIS │ Passive DNS │ CVE │ Malware │ │ │ │ ► Threat scoring: VT ratio × 0.4 + source × 0.3 + ... │ │ │ │ ► Confidence scoring per enrichment (0–1 scale) │ │ │ └──────────────────────────┬────────────────────────────────────────┘ │ │ ▼ │ │ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ DATA STORAGE (PostgreSQL + Elasticsearch) │ │ │ │ PostgreSQL: IOCs, enrichments, actors, API keys, logs │ │ │ │ Elasticsearch: Full-text search, aggregations, time-series │ │ │ │ Redis: Caching, rate-limit tracking, job queues │ │ │ └──────────────────────────┬────────────────────────────────────────┘ │ │ ▼ │ │ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ API LAYER (Flask + Gunicorn) │ │ │ │ GET /api/iocs ─── GET /api/actors ─── GET /api/analytics │ │ │ │ POST /api/iocs/lookup ─── GET /metrics (Prometheus) │ │ │ │ ► Bearer token authentication (SHA-256 key hash) │ │ │ └──────────────────────────┬────────────────────────────────────────┘ │ │ ▼ │ │ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ MONITORING (Prometheus + Grafana) │ │ │ │ Scrape targets: API server, collection service, enrichment │ │ │ │ Dashboard: Request rates, memory, uptime, GC activity │ │ │ └───────────────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────────────┘ ``` ## 功能特性 - **多源 IOC 收集** — 8 个 OSINT 源,支持定时轮询 - **智能去重** — 基于 SHA-256 哈希,合并来源并更新 `last_seen` - **6 个丰富器管道** — VirusTotal、IPInfo、WHOIS、Passive DNS、CVE 关联、恶意软件分类 - **基于置信度的威胁评分** — 加权算法(0–10 分制),结合检测率、来源可靠性、时效性和丰富深度 - **带身份验证的 REST API** — Flask API 搭配 Bearer 令牌认证,支持可过滤查询和分析端点 - **21 个植入的威胁行为者** — APT1、APT28、APT29、Lazarus Group、Emotet 等,包含 MITRE ATT&CK TTPs - **IOC-行为者关联** — 自动将指标链接到已知的威胁组织 - **OpenCTI 集成** — STIX 2.1 指标创建和关系映射 - **MISP 集成** — 基于事件的共享和属性关联 - **Prometheus + Grafana 监控** — 实时 API 性能、内存使用和服务健康仪表板 - **全 Docker 编排** — 16 个容器化服务,具备健康检查和依赖管理 - **PostgreSQL + Elasticsearch** — 关系存储搭配全文搜索索引 ![IOC-Actor Correlation](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/a657415a0b165132.png) ## 技术栈 | 组件 | 技术 | 用途 | |---|---|---| | **收集** | Python 3.11 + APScheduler | 搭配 cron 调度的多源 IOC 摄取 | | **丰富** | Python 3.11 | 搭配置信度评分的并行丰富 | | **数据库** | PostgreSQL 14 | 搭配 JSONB 丰富数据的关系型 IOC 存储 | | **搜索** | Elasticsearch 8 | IOC 全文搜索和聚合分析 | | **缓存** | Redis 7 | 速率限制、任务队列、会话缓存 | | **API** | Flask 3.0 + Gunicorn | 搭配 SQLAlchemy ORM 的 RESTful API | | **威胁情报** | OpenCTI + MISP | STIX 2.1 图建模 + 事件关联 | | **监控** | Prometheus + Grafana | 指标收集和实时仪表板 | | **存储** | MinIO | 用于工件的 S3 兼容对象存储 | | **消息** | RabbitMQ | OpenCTI worker 的消息代理 | | **容器** | Docker + docker-compose | 16 个服务的完整编排 | ## 项目结构 ``` Project_A_CTI_Platform/ ├── docker-compose.yml # Full 16-service orchestration ├── requirements.txt # Python dependencies ├── .env.example # Environment template (copy to .env) │ ├── src/ │ ├── collection_service/ │ │ ├── main.py # APScheduler orchestrator │ │ ├── collectors/ # 8 source-specific collectors │ │ │ ├── alienvault.py # AlienVault OTX API │ │ │ ├── abuseipdb.py # AbuseIPDB API │ │ │ ├── phishtank.py # Phishtank RSS feed │ │ │ ├── cisa.py # CISA KEV feed │ │ │ ├── shodan_collector.py # Shodan API │ │ │ ├── urlhaus.py # URLhaus abuse.ch │ │ │ ├── feodo.py # Feodo Tracker │ │ │ └── threatfox.py # ThreatFox abuse.ch │ │ ├── deduplicator.py # Hash-based IOC dedup │ │ └── database.py # PostgreSQL connection │ │ │ ├── enrichment_service/ │ │ ├── main.py # Enrichment worker loop │ │ ├── enrichers/ # 6 enrichment modules │ │ │ ├── virustotal.py # VT detection ratios │ │ │ ├── ipinfo.py # Geolocation & ASN │ │ │ ├── whois_enricher.py # Domain registration │ │ │ ├── passive_dns.py # Historical DNS records │ │ │ ├── cve_linkage.py # CVE association │ │ │ └── malware_classifier.py │ │ ├── scoring.py # Threat score algorithm │ │ └── database.py │ │ │ ├── api_server/ │ │ ├── main.py # Flask app entry point │ │ ├── routes/ │ │ │ ├── iocs.py # IOC CRUD + lookup │ │ │ ├── actors.py # Threat actor queries │ │ │ └── analytics.py # Summary & top threats │ │ ├── auth.py # Bearer token authentication │ │ └── db.py # SQLAlchemy engine │ │ │ ├── opencti_connector/ # STIX 2.1 integration │ └── misp_connector/ # MISP event sync │ ├── database/ │ ├── schema.sql # 8 tables + 2 analytics views │ ├── seed_data.sql # 21 threat actors + API keys │ └── seed_realistic_data.sql # 1300+ IOCs with enrichments │ ├── docker/ # Service Dockerfiles │ ├── Dockerfile.api │ ├── Dockerfile.collection │ └── Dockerfile.enrichment │ ├── monitoring/ │ ├── prometheus_config.yml # Scrape config │ ├── grafana_datasource.yml # Prometheus datasource │ └── grafana_dashboards/ # Provisioned dashboards │ ├── config/ │ └── cti_config.py # Centralized config │ ├── scripts/ │ ├── 01_phase1_init.sh # Environment bootstrap │ └── 02_elasticsearch_init.sh # ES index setup │ ├── tests/ │ ├── test_api.py │ ├── test_collectors.py │ └── test_enrichers.py │ ├── docs/ │ ├── SETUP_GUIDE.md │ ├── API_DOCUMENTATION.md │ ├── SOURCE_INTEGRATION_GUIDE.md │ └── TROUBLESHOOTING.md │ └── screenshots/ # 16 evidence screenshots ``` ## 前置条件 - **Docker** 24+ 和 **Docker Compose** v2 - **8 GB RAM** 最小(完整堆栈带 OpenCTI/MISP 建议为 16 GB) - **Python 3.11**(可选 — 仅用于本地开发) - OSINT 来源的 API 密钥(参见 [配置](#configuration)) ## 快速开始 **1. 克隆并配置:** ``` git clone https://github.com/AhmedIshtiakNihal/Automated-Cyber-Threat-Intelligence-CTI-Platform-Your-Own-Threat-Feed-.git cd Automated-Cyber-Threat-Intelligence-CTI-Platform-Your-Own-Threat-Feed- cp .env.example .env # 编辑 .env 填入你的 API keys ``` **2. 启动核心服务:** ``` # 轻量级 (core platform — ~2 GB RAM): docker-compose up -d postgres_cti elasticsearch_cti redis_cti api_server prometheus grafana # 全栈 (includes OpenCTI + MISP — 需 8+ GB RAM): docker-compose up -d ``` **3. 等待初始化(30–60 秒),然后验证:** ``` # 检查所有 containers 是否健康 docker ps # 测试 API curl http://localhost:5000/api/health # → {"status": "ok"} # 查询 IOCs (authenticated) curl -s "http://localhost:5000/api/iocs?limit=5" \ -H "Authorization: Bearer cti_api_key_2026" ``` ![Docker Containers Running](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/b0fdac62bd165133.png) ## 服务与端口 | 服务 | 端口 | 描述 | |---|---|---| | **API Server** | `5000` | Flask REST API + Prometheus 指标 | | **PostgreSQL** | `5432` | 主 IOC 数据库 | | **Elasticsearch** | `9201` | 全文搜索与分析 | | **Redis** | `6380` | 缓存与速率限制 | | **Grafana** | `3000` | 监控仪表板 (admin/admin) | | **Prometheus** | `9090` | 指标聚合 | | **OpenCTI** | `4000` | 威胁情报平台 (admin@opencti.io) | | **MISP** | `80` | 基于事件的情报共享 | | **MinIO** | `9000` | S3 兼容对象存储 | | **RabbitMQ** | `5672` | OpenCTI 的消息代理 | ![Elasticsearch Health](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/cc55bb26f1165134.png) ## 数据库 Schema 该平台使用 **8 个核心表**和 **2 个分析视图**: | 表 | 用途 | 关键列 | |---|---|---| | `iocs` | 失陷指标 | `ioc_value`, `ioc_type`, `threat_score`, `status` | | `enrichments` | 每个 IOC 的丰富数据 | `enricher_name`, `data` (JSONB), `confidence` | | `sources` | OSINT 源元数据 | `name`, `feed_url`, `reliability_score` | | `threat_actors` | APT 组织与威胁行为者 | `name`, `aliases`, `ttps`, `known_malware` | | `ioc_threat_actor_links` | IOC ↔ 行为者关联 | `ioc_id`, `actor_id`, `confidence` | | `api_keys` | API 认证令牌 | `key_hash` (SHA-256), `rate_limit` | | `collection_logs` | 收集运行历史 | `iocs_collected`, `duration_seconds` | | `enrichment_logs` | 丰富运行历史 | `iocs_processed`, `iocs_enriched` | **视图:** `ioc_summary_by_type` 和 `enrichment_coverage_view` 提供预先计算的分析。 ![Database Tables](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/c11af53444165135.png) ### IOC 分布 数据库支持 5 种 IOC 类型:`ip`、`domain`、`url`、`sha256` 和 `md5`。 ![IOC Distribution](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/6980732a2d165136.png) ### 威胁行为者 21 个植入的威胁行为者档案,包含原产国、已知别名、MITRE ATT&CK TTPs 以及相关的恶意软件家族: ![Threat Actors](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/b8072d4c9f165137.png) ## API 参考 所有端点(`/api/health` 除外)都需要认证: ``` Authorization: Bearer cti_api_key_2026 ``` ### 端点 | 方法 | 端点 | 描述 | |---|---|---| | `GET` | `/api/health` | 健康检查 (无需认证) | | `GET` | `/api/iocs` | IOC 列表 (可过滤) | | `GET` | `/api/iocs/` | IOC 详情 + 丰富信息 | | `POST` | `/api/iocs/lookup` | 检查 IOC 是否存在 | | `GET` | `/api/actors` | 威胁行为者列表 | | `GET` | `/api/actors//indicators` | 链接到行为者的 IOC | | `GET` | `/api/actors//ttps` | MITRE ATT&CK 技术 | | `GET` | `/api/analytics/summary` | 平台汇总统计 | | `GET` | `/api/analytics/threats` | 按 IOC 数量排名的热门威胁行为者 | | `GET` | `/api/analytics/sources` | 按来源列出的 IOC 贡献 | | `GET` | `/metrics` | Prometheus 指标 (无需认证) | ### 查询参数 | 参数 | 类型 | 描述 | |---|---|---| | `type` | string | 按 IOC 类型过滤 (`ip`, `domain`, `url`, `sha256`, `md5`) | | `limit` | int | 最大结果数 (默认: 100) | | `score_min` | float | 最低威胁评分 (0–10) | ### 示例响应 **GET /api/iocs?limit=5:** ![API IOCs Response](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/e9859a4fe2165138.png) **GET /api/actors:** ![API Actors Response](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/23669bd879165139.png) **GET /api/analytics/summary:** ![API Analytics](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/9603ebb169165140.png) **GET /api/health:** ![API Health](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/f02a5e4146165141.png) ## 收集管道 收集服务通过 APScheduler 按 6 小时的时间表运行,轮询 8 个 OSINT 来源: 1. **获取** — 每个收集器查询其来源 API/源 2. **解析** — 原始响应被标准化为标准 IOC 格式 3. **去重** — 根据现有记录检查 `SHA-256(ioc_value | ioc_type)` 4. **存储** — 新 IOC 被插入;现有 IOC 的 `occurrences_count` 递增并更新 `last_seen` ``` # 去重算法 (simplified) ioc_hash = hashlib.sha256(f"{ioc_value}|{ioc_type}".encode()).hexdigest() # PostgreSQL upsert INSERT INTO iocs (..., ioc_hash, ...) VALUES (...) ON CONFLICT (ioc_hash) DO UPDATE SET occurrences_count = iocs.occurrences_count + 1, last_seen = NOW() ``` ### 收集来源 | 来源 | 源类型 | IOC 类型 | 速率限制 | |---|---|---|---| | AlienVault OTX | REST API | IPs, domains, hashes, URLs | 1000/天 | | AbuseIPDB | REST API | 携带滥用评分的 IPs | 15/天 (免费) | | Phishtank | RSS/CSV | Phishing URLs | 无限制 | | CISA KEV | JSON feed | 携带 exploits 的 CVEs | 无限制 | | Shodan | REST API | IPs, services, CVEs | 1/秒 (免费) | | URLhaus | RSS/JSON | 恶意 URLs | 无限制 | | Feodo Tracker | CSV | C2 server IPs | 无限制 | | ThreatFox | REST API | 混合 IOCs | 无限制 | ![Collection Service Logs](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/ec82edb1e5165142.png) ## 丰富引擎 每个 IOC 都通过 6 个丰富模块: | 丰富器 | 提供的数据 | 置信度 | |---|---|---| | **VirusTotal** | 检测率、扫描日期、供应商列表 | 0.5 – 0.95 | | **IPInfo** | 国家、ISP、ASN、组织 | 0.7 – 0.95 | | **WHOIS** | 注册商、创建/过期日期 | 0.6 – 0.90 | | **Passive DNS** | 历史DNS解析 | 0.5 – 0.85 | | **CVE Linkage** | 关联的 CVE-ID、CVSS 评分 | 0.6 – 0.90 | | **Malware Classifier** | 恶意软件家族、置信度评分 | 0.3 – 0.95 | 丰富数据以 JSONB 形式存储在 PostgreSQL 中,允许灵活查询: ``` SELECT e.enricher_name, e.data->>'country' AS country, e.confidence FROM enrichments e JOIN iocs i ON i.id = e.ioc_id WHERE i.ioc_value = '185.220.101.34'; ``` ![Enrichment Coverage](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/c53815df38165143.png) ![Enrichment Service Logs](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/d7bb277231165144.png) ## 威胁评分 每个 IOC 接收一个由加权因子计算得出的综合威胁评分(0–10): ``` threat_score = (vt_detection_ratio × 0.4) + (source_reliability × 0.3) + (recency_factor × 0.2) + (enrichment_depth × 0.1) ``` | 因子 | 重 | 计算 | |---|---|---| | VT Detection Ratio | 40% | `detected / total` 来自 VirusTotal | | Source Reliability | 30% | 每个来源预配置 (0–1) | | Recency | 20% | 基于 `last_seen` 的衰减函数 | | Enrichment Depth | 10% | `count(enrichments) / max_enrichers` | ![Threat Score Distribution](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/825c0efa37165145.png) ## 监控与仪表板 ### Prometheus 所有服务暴露由 Prometheus 每 15 秒抓取一次的 `/metrics` 端点: - **API Server** (`api_server:5000`) — 请求计数、响应码、延迟 - **Collection Service** (`collection_service:8000`) — 获取的 IOC、收集持续时间 - **Enrichment Service** (`enrichment_service:8000`) — 丰富的 IOC、丰富延迟 ![Prometheus Targets](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/82736e5842165146.png) ### Grafana Dashboard CTI 平台仪表板提供以下实时可见性: - **API Request Rate** — 按端点列出的每秒请求数 - **Response Status Codes** — HTTP 200/400/500 分布 - **Total API Requests** — 累积请求计数器 - **Process Memory** — 常驻和虚拟内存使用情况 - **Process Uptime** — 服务可用性追踪 - **GC Activity** — 按代划分的 Python 垃圾回收 访问地址:`http://localhost:3000` (登录: `admin` / `admin`) ![Grafana Dashboard](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/82e8c89f59165129.png) ## 截图
点击展开全部 16 张截图 | # | 截图 | 描述 | |---|---|---| | 1 | ![Docker](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/b0fdac62bd165133.png) | Docker 容器运行中 | | 2 | ![Schema](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/c11af53444165135.png) | 数据库表 | | 3 | ![IOCs](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/6980732a2d165136.png) | 按类型列出的 IOC 分布 | | 4 | ![Actors](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/b8072d4c9f165137.png) | 威胁行为者档案 | | 5 | ![Enrichment](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/c53815df38165143.png) | 丰富覆盖率统计 | | 6 | ![Scores](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/825c0efa37165145.png) | 威胁评分分布 | | 7 | ![Health](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/f02a5e4146165141.png) | API 健康检查 | | 8 | ![IOCs API](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/e9859a4fe2165138.png) | GET /api/iocs 响应 | | 9 | ![Actors API](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/23669bd879165139.png) | GET /api/actors 响应 | | 10 | ![Analytics](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/9603ebb169165140.png) | 分析汇总 | | 11 | ![ES](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/cc55bb26f1165134.png) | Elasticsearch 集群 | | 12 | ![Collection](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/ec82edb1e5165142.png) | 收集管道日志 | | 13 | ![Enrichment](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/d7bb277231165144.png) | 丰富管道日志 | | 14 | ![Prometheus](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/82736e5842165146.png) | Prometheus 目标 | | 15 | ![Grafana](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/82e8c89f59165129.png) | Grafana CTI 仪表板 | | 16 | ![Correlation](https://static.pigsec.cn/wp-content/uploads/repos/2026/03/a657415a0b165132.png) | IOC-行为者关联 |
## 测试 运行测试套件: ``` # 安装测试依赖项 pip install -r requirements.txt # 运行所有测试 python -m pytest tests/ -v # 运行特定测试文件 python -m pytest tests/test_api.py -v python -m pytest tests/test_collectors.py -v python -m pytest tests/test_enrichers.py -v ``` 测试覆盖范围包括: - **API 测试** — 端点响应、认证、错误处理 - **收集器测试** — 来源解析、去重逻辑 - **丰富器测试** — 评分算法、丰富数据验证 ## 配置 将 `.env.example` 复制到 `.env` 并配置: ``` cp .env.example .env ``` ### 必需变量 | 变量 | 描述 | |---|---| | `POSTGRES_USER` | PostgreSQL 用户名 | | `POSTGRES_PASSWORD` | PostgreSQL 密码 | | `POSTGRES_DB` | 数据库名称 | | `OTX_API_KEY` | AlienVault OTX API 密钥 | | `ABUSEIPDB_API_KEY` | AbuseIPDB API 密钥 | | `VT_API_KEY` | VirusTotal API 密钥 | | `SHODAN_API_KEY` | Shodan API 密钥 | | `IPINFO_TOKEN` | IPInfo.io token | ### 获取 API 密钥 | 来源 | 注册 | 免费层 | |---|---|---| | [AlienVault OTX](https://otx.alienvault.com/) | 免费账户 | 1000 请求/天 | | [AbuseIPDB](https://www.abuseipdb.com/) | 免费账户 | 15 请求/天 | | [VirusTotal](https://www.virustotal.com/) | 免费账户 | 4 请求/分钟 | | [Shodan](https://www.shodan.io/) | 免费账户 | 1 请求/秒 | | [IPInfo.io](https://ipinfo.io/) | 免费账户 | 1000 请求/月 | ## 故障排除 ### 容器未启动 ``` docker-compose logs -f # 检查端口 5000/5432/9200 是否已被占用 sudo lsof -i :5000 ``` ### Elasticsearch 索引缺失 ``` bash scripts/02_elasticsearch_init.sh ``` ### API 认证失败 - 确保 `api_keys` 表中存在该 API 密钥 - 密钥以 SHA-256 哈希形式存储;Bearer token 在查找前经过哈希处理 ### OpenCTI/MISP 无法访问 - 这些服务需要 60–90 秒才能完全初始化 - 验证 `.env` 中的 URL 和凭据 ### 收集返回 0 个 IOC - 验证 API 密钥已在 `.env` 中设置 - 检查速率限制 — 某些免费层有每日上限 - 查看日志:`docker-compose logs collection_service` 更多详情请参见 [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md)。 ## 未来增强 - [ ] YARA 规则集成,用于基于哈希的恶意软件分类 - [ ] 每日 PDF/HTML 情报摘要生成 - [ ] 高危 IOC 的 Slack/电子邮件告警 - [ ] 面向下游消费者的 STIX/TAXII 源导出 - [ ] 多租户部署的基于角色的访问控制 (RBAC) - [ ] Elasticsearch 支持的 IOC 搜索自动补全 - [ ] Docker Swarm / Kubernetes 部署清单 - [ ] 搭配自动化测试的 CI/CD 管道 ## 许可证 本项目用于教育和作品集演示目的。所有 OSINT 数据来源的使用均符合其各自的免费层 API 服务条款。
标签:DAST, Docker, Elasticsearch, ESC4, Flask, GPT, Grafana, IOC, IP信誉, IP 地址批量处理, OpenCTI, OSINT, PostgreSQL, Python, REST API, SOAR, 仪表盘, 失陷指标, 威胁情报, 威胁收集, 威胁评分, 安全运营, 安全防御评估, 开发者工具, 恶意软件分析, 情报富化, 扫描框架, 搜索引擎查询, 无后门, 测试用例, 漏洞管理, 监控, 网络安全, 网络测绘, 网络调试, 自动化, 自定义请求头, 自托管, 请求拦截, 逆向工具, 配置审计, 钓鱼检测, 隐私保护