muzi5622/CTI_Platform
GitHub: muzi5622/CTI_Platform
企业级网络威胁情报平台,自动化完成情报收集、ML分析、威胁归因与战略决策分发的完整生命周期。
Stars: 0 | Forks: 0
# 🛡️ 网络威胁情报平台 (CTI)
**自动化收集、ML 驱动分析、战略决策制定与安全情报共享**
企业级网络威胁情报 (CTI) 平台,自动化完整的情报生命周期 —— 从 OSINT 和蜜罐收集到机器学习归因、高管决策支持,以及安全的 STIX/TAXII 情报共享。
基于 OpenCTI、Elasticsearch 和自定义 ML pipeline 构建。
# 📌 概述
该平台实现了完整的情报 pipeline:
```
Collection → Enrichment → Attribution → Correlation → Strategic Decision → Dissemination
```
它将原始威胁数据转化为:
- 结构化 CTI
- 威胁行为者归因
- 高管级风险报告
- 可操作的 BLOCK / MONITOR / IGNORE 决策
- 安全的合作伙伴情报源
# 🚀 核心功能
## 自动化情报收集
- RSS 威胁情报摄取
- AlienVault OTX 集成
- URLHaus 恶意 URL 摄取
- MITRE ATT&CK 集成
- 通过 Logstash → Elasticsearch 进行蜜罐日志摄取
## IOC 提取与富化
### 基于规则的 NLP 提取
提取:
- IPv4 / IPv6
- 域名
- URL
- MD5 / SHA1 / SHA256 哈希
- CVE
### 基于ML的NER提取
Transformer 模型:
```
muzi5622/cti-ner-model
```
提供:
- 上下文感知的 IOC 提取
- 相比正则表达式更高的准确性
- 基于标签的富化
## 基于ML的威胁行为者归因(蜜罐情报)
利用蜜罐日志自动:
- 分析攻击者行为
- 分类攻击者(scanner、botnet、bruteforce)
- 聚类攻击者
- 在 OpenCTI 中创建威胁行为者实体
- 关联 Indicators → 威胁行为者
模型来源:
```
muzi5622/actor-profiler-model
```
## 战略决策引擎
自动生成高管报告:
- 每日网络简报
- 每周网络风险简报
- 每月风险评估
提供自动化决策:
```
BLOCK
MONITOR
IGNORE
```
基于:
- 威胁严重性
- 置信度
- 新近度
- 情报关联
API 地址:
```
[http://localhost:8000/docs](http://localhost:8000/docs)
```
## 安全情报共享 (STIX 2.1 / TAXII 风格)
将情报导出至:
- 公共源
- 合作伙伴源
- 内部源
支持:
- API 密钥认证
- TLP 分类 (CLEAR, AMBER, RED)
- 针对合作伙伴的过滤
- 情报清洗
# 🏗 架构
```
===============================================================================
CYBER THREAT INTELLIGENCE PLATFORM — 5-LAYER ARCHITECTURE
===============================================================================
┌─────────────────────────────────────────────────────────────────────────────┐
│ LAYER 1 — SOURCES & SENSORS │
└─────────────────────────────────────────────────────────────────────────────┘
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌─────────────┐
│ RSS / OSINT │ │ AlienVault │ │ URLHaus │ │ MITRE ATT&CK│
│ Feeds │ │ OTX Feed │ │ Malware Feed │ │ Knowledge │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └─────┬───────┘
│ │ │ │
└────────────┬─────┴──────────┬──────┴──────────┬───────┘
│ │ │
┌─────▼────────────────▼─────────────────▼─────┐
│ Honeyport Sensor (Honeypot) │
└──────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ LAYER 2 — COLLECTION SERVICES │
└─────────────────────────────────────────────────────────────────────────────┘
┌──────────────────┐
│ rss-ingestor │◄──── RSS feeds
└────────┬─────────┘
┌──────────────────────────────┐
│ Threat Feed Connector │◄──── OTX / URLHaus / MITRE
└────────┬─────────────────────┘
┌──────────────────┐
│ honeyport │◄──── Honeypot sensor
└────────┬─────────┘
│
▼
┌──────────────┐
│ Logstash │
│ Pipeline │
└──────┬───────┘
│
▼
┌──────────────┐
│ SQLite State │
│ Database │
└──────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ LAYER 3 — CTI CORE (OpenCTI Intelligence Graph) │
└─────────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────┐
│ OpenCTI GraphQL API │
└─────────────┬──────────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌────────────────┐ ┌────────────────┐
│ Intelligence │ │ Elasticsearch │ │ Threat Reports │
│ Graph │ │ Storage │ │ Indicators │
│ │ │ │ │ Threat Actors │
│ Relationships │ │ Indexed Intel │ │ CVEs │
└───────────────┘ └────────────────┘ └────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ LAYER 4 — ENRICHMENT & ANALYSIS │
└─────────────────────────────────────────────────────────────────────────────┘
┌────────────────────┐
│ NLP Enricher │
│ (Regex Extraction) │
└─────────┬──────────┘
│
┌────────────────────┐
│ ML NER Enricher │
│ (Transformer ML) │
└─────────┬──────────┘
│
┌────────────────────┐
│ Actor Profiler │
│ (ML Attribution) │
└─────────┬──────────┘
│
┌────────────────────┐
│ Confidence Scoring │
└─────────┬──────────┘
│
▼
┌─────────────────────────────┐
│ Strategic Decision Engine │
│ │
│ Decisions Generated: │
│ • BLOCK │
│ • MONITOR │
│ • IGNORE │
└──────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ LAYER 5 — DISSEMINATION & CONSUMERS │
└─────────────────────────────────────────────────────────────────────────────┘
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ SIEM / SOAR │ │ SOC Analysts │ │ Kibana │
│ Detection │ │ Investigation│ │ Dashboards │
└──────────────┘ └──────────────┘ └──────────────┘
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Executive │ │ Intel API │ │ TAXII Export │
│ Reports │ │ │ │ │
└──────┬───────┘ └──────────────┘ └──────┬───────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ TAXII Server │ ───────────────► │ Partners / │
│ │ │ ISAC / SOC │
└──────────────┘ └──────────────┘
===============================================================================
INTELLIGENCE FLOW SUMMARY
===============================================================================
Sources → Collection → OpenCTI Intelligence Graph → Enrichment & ML →
Decision Engine → SIEM / SOC / TAXII / Executive Reports
===============================================================================
KEY CAPABILITIES
===============================================================================
• Automated OSINT and honeypot collection
• ML-based IOC extraction and threat actor attribution
• Confidence scoring and strategic decision automation
• Intelligence graph correlation
• Executive risk reporting
• STIX/TAXII intelligence sharing
• SOC and SIEM integration
===============================================================================
```
## 
# 🐳 服务
| Service | Port | Purpose |
|--------|------|---------|
| OpenCTI | 8080 | CTI 平台 |
| Intel API | 8000 | 战略报告 |
| TAXII Server | 9000 | 情报共享 |
| Kibana | 5601 | 日志可视化 |
| RabbitMQ | 15672 | 消息队列 |
| Elasticsearch | 9200 | 数据存储 |
| Logstash | 5044 | 蜜罐摄取 |
# ⚙️ 需求
推荐系统配置:
- Ubuntu 22.04+
- Docker
- Docker Compose
- 最少 8GB RAM(推荐 16GB)
安装 Docker:
```
sudo apt update
sudo apt install docker.io docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker
```
# 🔐 环境设置
创建 `.env` 文件:
```
OPENCTI_ADMIN_EMAIL=admin@demo.local
OPENCTI_ADMIN_PASSWORD=ChangeMe123!
OPENCTI_ADMIN_TOKEN=change_me_token
APP_BASE_URL=http://localhost:8080
RABBITMQ_USER=opencti
RABBITMQ_PASS=opencti_password
MINIO_USER=opencti
MINIO_PASS=opencti_password
CONNECTOR_URLHAUS_ID=id-urlhaus
CONNECTOR_ALIENVAULT_ID=id-otx
CONNECTOR_MITRE_ID=id-mitre
OTX_API_KEY=your_otx_key
PARTNER_API_KEY=BANK123
INTERNAL_API_KEY=INTERNAL123
```
# ▶️ 启动平台
启动所有服务:
```
docker compose up -d --build
```
检查运行中的服务:
```
docker compose ps
```
预期输出:
```
opencti running
rss-ingestor running
nlp-enricher running
ml-ner-enricher running
actor-profiler running
intel-api running
taxii-server running
```
# 🌐 访问界面
OpenCTI:
```
http://localhost:8080
```
Intel API:
```
http://localhost:8000/docs
```
Kibana:
```
http://localhost:5601
```
RabbitMQ:
```
http://localhost:15672
```
TAXII Feed:
```
http://localhost:9000/share/public/bundle.json
```
# 🔎 运维验证命令
## 检查 OpenCTI 健康状态
```
curl http://localhost:8080/graphql \
-H "Authorization: Bearer $OPENCTI_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"query { about { version } }"}'
```
## 检查 RSS 摄取
```
docker compose logs -f rss-ingestor
```
预期:
```
created report: Threat Report Title
```
## 检查 NLP 富化
```
docker compose logs -f nlp-enricher
```
预期:
```
Extracted IOCs: 12
Created observable
```
## 检查 ML 富化
```
docker compose logs -f ml-ner-enricher
```
预期:
```
cycle done new=5 processed_total=120
```
## 检查攻击者分析器
```
docker compose logs -f actor-profiler
```
预期:
```
Built features for 312 IPs
Created threat actor HP-ACTOR-001
```
## 检查战略引擎
运行手动报告:
```
curl -X POST http://localhost:8000/strategy/run-daily
```
检查日志:
```
docker compose logs -f intel-api
```
## 检查 TAXII Feed
公共 Feed:
```
curl http://localhost:9000/share/public/bundle.json | jq .
```
合作伙伴 Feed:
```
curl -H "X-API-Key: BANK123" \
http://localhost:9000/share/partners/bank/iocs_high.json
```
# 📊 在 OpenCTI 中验证情报
打开 UI:
```
http://localhost:8080
```
检查:
```
Knowledge → Reports
Knowledge → Observables
Threat Actors
Indicators
```
你应该能看到自动创建的情报。
# 🧪 检查蜜罐 Pipeline
验证日志索引:
```
curl http://localhost:9200/honeypot-logs-*/_search?pretty
```
在 Kibana 中查看:
```
http://localhost:5601
```
# 🛠 常用命令
重启平台:
```
docker compose restart
```
停止平台:
```
docker compose down
```
完全重置:
```
docker compose down -v
rm -rf data/*
```
重建特定服务:
```
docker compose build actor-profiler
docker compose up -d actor-profiler
```
# 🔄 自动化计划
| Task | Frequency |
| ----------------- | ------------------------ |
| RSS 摄取 | 5 分钟 |
| NLP 富化 | 2 分钟 |
| ML 富化 | 1 分钟 |
| 攻击者分析 | 5 分钟 |
| 战略报告 | 每日 / 每周 / 每月 |
| TAXII 导出 | 5 分钟 |
# 📂 项目结构
```
services/
rss-ingestor/
nlp-enricher/
ml-ner-enricher/
actor-profiler/
intel-api/
taxii-exporter/
data/
logstash/
docker-compose.yml
.env
```
# 🎓 本平台演示内容
* 完整 CTI 生命周期自动化
* 基于 ML 的威胁行为者归因
* 高管情报报告
* 自动化情报共享
* SOC 级架构
* 企业级 CTI 工程实践
# 👨💻 作者
Muzammal
网络威胁情报平台
# 📜 许可证
仅供教育和研究使用。
标签:Apex, Cloudflare, CVE, Elasticsearch, ESC4, IOC提取, IP 地址批量处理, Logstash, masscan, MITRE ATT&CK, ML, NER, NLP, OpenCTI, OSINT, SecOps, STIX, TAXII, Transformer, URLHaus, 云安全架构, 企业安全, 内容过滤, 决策支持, 失陷指标, 威胁归因, 威胁情报平台, 安全运营, 实体识别, 密码管理, 恶意URL, 恶意软件, 扫描框架, 插件系统, 攻击者画像, 数字签名, 机器学习, 网络威胁情报, 网络安全, 网络资产管理, 自动化情报收集, 蜜罐, 证书利用, 请求拦截, 越狱测试, 逆向工具, 隐私保护