Twinex/socradar-cti-lab

GitHub: Twinex/socradar-cti-lab

该项目是一个以 SOCRadar 为核心平台的网络威胁情报实战实验室,解决了 IOC 富化、攻击者归因、TTP 映射及 AI 辅助告警分诊的端到端 CTI 工作流问题。

Stars: 0 | Forks: 0

# 🌐 威胁情报实验室 — SOCRadar CTI 与 AI 辅助检测 ## 📌 项目概述 本实验室演示了实用的 CTI 分析师工作流,以 **SOCRadar** 作为主要的威胁情报平台,并由开源的情报富化工具作为补充。所有发现均被构建为可操作的情报报告,并映射到 **MITRE ATT&CK v14** 框架。 | 组件 | 工具 / 平台 | |---|---| | 威胁情报平台 | SOCRadar | | IOC 富化 | VirusTotal, AbuseIPDB, Shodan, OTX AlienVault | | TTP 映射 | MITRE ATT&CK Navigator | | AI 辅助检测 | Python (scikit-learn, Isolation Forest) | | 自动化告警分类 | Python + OpenAI API / Claude API | | 报告 | Markdown, STIX 2.1 | | 可视化 | ATT&CK Navigator, Kibana | ## 🏗️ 实验室架构 ``` ┌─────────────────────────────────────────────────────────────────┐ │ THREAT INTELLIGENCE LAB │ │ │ │ ┌─────────────────┐ ┌──────────────────┐ ┌───────────┐ │ │ │ SOCRadar TIP │ │ Enrichment APIs │ │ SIEM / │ │ │ │ │ │ │ │ Analyst │ │ │ │ • Threat Feeds │───▶│ • VirusTotal │───▶│ Workbench│ │ │ │ • IOC Streams │ │ • AbuseIPDB │ │ │ │ │ │ • Threat Actors │ │ • Shodan │ │ ATT&CK │ │ │ │ • Dark Web Mon. │ │ • OTX AlienVault │ │ Navigator │ │ │ └─────────────────┘ └──────────────────┘ └───────────┘ │ │ │ │ │ │ │ └──────────────────────┴────────────────────┘ │ │ │ │ │ ┌─────────────▼──────────────┐ │ │ │ AI-Assisted Detection │ │ │ │ • Anomaly Detection (ML) │ │ │ │ • Automated Alert Triage │ │ │ │ • TTP Auto-Classification │ │ │ └────────────────────────────┘ │ └─────────────────────────────────────────────────────────────────┘ ``` ## 📁 仓库结构 ``` socradar-cti-lab/ ├── README.md ├── configs/ │ └── enrichment_config.yml # API keys config template (no secrets) ├── ioc-feeds/ │ └── sample_iocs.csv # Sample IOC dataset for enrichment practice ├── scripts/ │ ├── ioc-enrichment/ │ │ ├── ioc_enricher.py # Multi-source IOC enrichment script │ │ └── requirements.txt │ ├── ttp-mapping/ │ │ └── ttp_mapper.py # Maps IOCs/reports to ATT&CK techniques │ └── ai-triage/ │ ├── anomaly_detector.py # Isolation Forest anomaly detection │ ├── alert_triage_ai.py # AI-assisted alert triage (LLM) │ └── requirements.txt ├── docs/ │ ├── intelligence-reports/ │ │ ├── CTI-001_apt_campaign.md │ │ ├── CTI-002_ransomware_iocs.md │ │ └── CTI-003_phishing_infrastructure.md │ ├── ttp-analysis/ │ │ └── ttp_analysis_reference.md │ └── ai-detection/ │ └── ai_detection_methodology.md ├── mitre-mappings/ │ └── attack_coverage_matrix.md └── screenshots/ └── README.md ``` ## 🔍 核心工作流 ### 1. IOC 富化流水线 来自 SOCRadar feed 的原始 IOC 通过多个来源进行富化: ``` SOCRadar Feed → Raw IOC (IP/Domain/Hash/URL) │ ▼ VirusTotal → Malware family, detection ratio, sandbox reports AbuseIPDB → Abuse confidence score, report count, ISP Shodan → Open ports, services, geolocation, CVEs OTX AlienVault→ Pulse membership, threat actor associations │ ▼ Enriched IOC Record → Threat Score → Block / Monitor / Investigate ``` ### 2. 攻击者归因工作流 ``` Enriched IOCs → TTP Extraction → Actor Profile Matching │ ├── Infrastructure overlap (IP/Domain reuse) ├── Malware family signatures ├── TTPs pattern matching (ATT&CK) └── SOCRadar Threat Actor Intel │ ▼ Attribution Report + Confidence Level (Low / Medium / High) ``` ### 3. AI 辅助检测 ``` Log/Alert Stream → Feature Engineering → Isolation Forest (Anomaly Detection) │ Anomalous Alerts ◄──┘ │ LLM Triage Engine │ ┌───────────┼───────────┐ Classify Summarise Recommend (TP/FP/BP) (Narrative) (Response) ``` ## 🎯 情报报告 本实验室在运行期间产出的三份 CTI 报告示例: | 报告 | 威胁 | 置信度 | MITRE 技术 | |---|---|---|---| | [CTI-001](docs/intelligence-reports/CTI-001_apt_campaign.md) | APT 基础设施活动 | 高 | T1566, T1078, T1071 | | [CTI-002](docs/intelligence-reports/CTI-002_ransomware_iocs.md) | 勒索软件 IOC 集群 | 中 | T1486, T1490, T1489 | | [CTI-003](docs/intelligence-reports/CTI-003_phishing_infrastructure.md) | 钓鱼基础设施 | 高 | T1566.001, T1598, T1056 | ## 🗺️ MITRE ATT&CK 覆盖范围 | 战术 | 技术 | ID | 来源 | |---|---|---|---| | Initial Access | Phishing | T1566 | CTI-001, CTI-003 | | Initial Access | Valid Accounts | T1078 | CTI-001 | | Persistence | External Remote Services | T1133 | CTI-001 | | Command & Control | Application Layer Protocol | T1071 | CTI-001 | | Impact | Data Encrypted for Impact | T1486 | CTI-002 | | Impact | Inhibit System Recovery | T1490 | CTI-002 | | Impact | Service Stop | T1489 | CTI-002 | | Credential Access | Input Capture | T1056 | CTI-003 | | Reconnaissance | Phishing for Information | T1598 | CTI-003 | 完整覆盖矩阵:[`mitre-mappings/attack_coverage_matrix.md`](mitre-mappings/attack_coverage_matrix.md) ## 🤖 AI 检测技术 ### 异常检测 (Isolation Forest) - 基于模拟的 SIEM 告警特征向量进行训练 - 无需标记的训练数据即可检测出统计异常的告警 - 特征:事件频率、源 IP 多样性、发生时间、告警类型分布 ### 自动化告警分类 (LLM) - 将告警上下文输入到 LLM (Claude/GPT) 中 - 输出:分类 (TP/FP/BP)、叙述性摘要、建议操作 - 在实验室模拟中,将 L1 分析师的分类时间减少了约 60% 查看完整方法论:[`docs/ai-detection/ai_detection_methodology.md`](docs/ai-detection/ai_detection_methodology.md) ## ⚙️ 设置与使用 ### 前置条件 ``` Python 3.10+ pip install -r scripts/ioc-enrichment/requirements.txt pip install -r scripts/ai-triage/requirements.txt ``` ### 配置 API 密钥 ``` cp configs/enrichment_config.yml.example configs/enrichment_config.yml # 使用你的 API 密钥编辑 enrichment_config.yml ``` ### 运行 IOC 富化 ``` cd scripts/ioc-enrichment python ioc_enricher.py --input ../../ioc-feeds/sample_iocs.csv --output enriched_iocs.json ``` ### 运行异常检测 ``` cd scripts/ai-triage python anomaly_detector.py --alerts ../../ioc-feeds/sample_alerts.csv ``` ### 运行 AI 告警分类 ``` cd scripts/ai-triage python alert_triage_ai.py --alert-id ALT-2024-001 ``` ## 🛠️ 工具与平台 | 类别 | 工具 | |---|---| | 威胁情报 | SOCRadar, OTX AlienVault | | IOC 富化 | VirusTotal API, AbuseIPDB API, Shodan API | | TTP 框架 | MITRE ATT&CK v14, ATT&CK Navigator | | AI / ML | Python scikit-learn (Isolation Forest), OpenAI/Anthropic API | | 脚本 | Python 3.10+ | | 报告 | Markdown, STIX 2.1 概念 | ## 📈 关键成果 - 通过 4 个威胁情报来源富化了 **50 多个 IOC**,并实现了自动化评分 - 产出了 **3 份结构化的 CTI 报告**,包含完整的攻击者归因和 ATT&CK 映射 - 构建了一个 **异常检测模型**,在实验室测试中标记了 94% 的注入恶意事件 - 自动化告警分类将平均分类时间从约 8 分钟缩短至约 90 秒 - 将横跨 3 个威胁行为者配置文件的 **9 项 ATT&CK 技术** 进行了映射 ## 📚 参考资料 - [SOCRadar 平台](https://socradar.io) - [MITRE ATT&CK 框架](https://attack.mitre.org) - [ATT&CK Navigator](https://mitre-attack.github.io/attack-navigator/) - [VirusTotal API 文档](https://developers.virustotal.com/reference) - [AbuseIPDB API 文档](https://docs.abuseipdb.com) - [Shodan API 文档](https://developer.shodan.io) - [OTX AlienVault](https://otx.alienvault.com) - [STIX 2.1 标准](https://oasis-open.github.io/cti-documentation/stix/intro) ## 👤 作者 **Taiwo Oloyede Olawalde** 网络安全讲师与 CTI 分析师 | 尼日利亚拉各斯 CompTIA Security+ | eJPT | Fortinet NSE 1–3 | ISO/IEC 27001 | **SOCRadar CTI** [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://linkedin.com) [![GitHub](https://img.shields.io/badge/GitHub-Follow-black)](https://github.com/taiwo-oloyede)
标签:CISA项目, MITRE ATT&CK映射, Petitpotam, 入侵指标(IOC)富化, 安全运营中心(SOC), 异常检测, 网络威胁情报, 网络安全, 自动化告警分发, 越狱测试, 逆向工具, 防御加固, 隐私保护