sandeepmothukuri/ai-soc-lab

GitHub: sandeepmothukuri/ai-soc-lab

集成了 Wazuh、TheHive、Shuffle、MISP、Cortex 和本地 LLM 的开源 SOC 实验室,用于告警自动分诊、威胁情报分析和事件响应工作流编排。

Stars: 1 | Forks: 0

# 🧠 AI 增强型 SOC 实验室 [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/39f9eb810e041626.svg)](https://github.com/sandeepmothukuri/ai-soc-lab/actions) [![网站](https://img.shields.io/badge/Website-cybertechnology.in-blue)](https://cybertechnology.in) [![MITRE ATT&CK](https://img.shields.io/badge/MITRE-ATT%26CK-red)](https://attack.mitre.org/) 一个完整的开源安全运营中心 (SOC) 实验室,通过本地 AI 决策支持层进行了增强。专为学习、研究和实用的蓝队技能开发而构建。 ## 📐 架构 ``` Logs / Events (Wazuh, Suricata, Zeek) ↓ SIEM (Elastic via Wazuh) ↓ Alert Trigger ↓ Shuffle (SOAR) ↓ Enrichment Phase ├─ MISP (threat intel) ├─ Cortex analyzers └─ External APIs ↓ AI Engine (Ollama + LangChain) ↓ Output: - Alert summary - Severity classification - MITRE ATT&CK mapping - Response recommendation ↓ TheHive Case Creation ↓ Analyst Decision / Automated Response ``` ## 🛠️ 技术栈 | 组件 | 角色 | |-----------|------| | **Wazuh** | SIEM + EDR + 日志聚合 | | **Suricata** | 网络 IDS/IPS | | **Zeek** | 网络流量分析 | | **TheHive** | 案例管理 | | **Cortex** | 告警丰富 / 分析器 | | **Shuffle** | SOAR / 工作流自动化 | | **MISP** | 威胁情报平台 | | **Ollama** | 本地 LLM 推理 (隐私安全) | | **LangChain** | AI 管道编排 | ## 📸 截图 ### Wazuh SIEM — 安全运营仪表板 ![Wazuh 安全运营仪表板](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/31d098e7d2041627.png) ### Wazuh — 终端安全视图 ![Wazuh 终端安全](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/86717c8b62041628.png) ### Wazuh — 威胁情报面板 ![Wazuh 威胁情报](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/0aa82bc868041629.png) ### TheHive — 丰富的案例管理 ![TheHive 案例管理](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/8d708ddee6041630.png) ### TheHive — 集中告警管理 ![TheHive 告警管理](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/30cecc4162041631.png) ### TheHive + Cortex — 自动化分析与响应 ![TheHive Cortex 响应](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/bfd22a6a88041632.png) ### Shuffle SOAR — 工作流自动化 ![Shuffle SOAR 工作流](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/1132f5ab42041633.png) ### MISP — 实时威胁情报仪表板 ![MISP 实时仪表板](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/222529568b041634.png) ### MISP — 热门威胁指标 ![MISP 热门指标](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/1c4a47aa7b041635.png) ### Ollama — 本地 LLM 界面 (Open WebUI) ![Ollama Open WebUI](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/7d62231757041636.png) ## ⚙️ AI 用例 ### 1. 告警摘要 将原始日志数据转换为结构化的、分析人员可读的摘要,并附带 MITRE ATT&CK 映射。 ### 2. 误报减少 AI 会过滤已知的扫描器、内部漏洞扫描和维护窗口流量。 ### 3. 自动分诊 (L1 替代层) AI 将告警分类为:`CLOSE` / `ESCALATE` / `ENRICH` — 并附带置信度评分。 ### 4. 剧本生成 给定告警类型,AI 会生成一个逐步的事件响应工作流。 ### 5. 自然语言 SIEM 查询 用简单的英语提问,即可获取 Elasticsearch DSL 查询。 ## 🚀 快速入门 ### 前置条件 - Docker + Docker Compose - 最低 16 GB 内存 (推荐 32 GB) - 100 GB 磁盘空间 - Linux (推荐 Ubuntu 22.04) 或 WSL2 ### 1. 克隆仓库 ``` git clone https://github.com/sandeepmothukuri/ai-soc-lab.git cd ai-soc-lab ``` ### 2. 部署核心技术栈 ``` chmod +x scripts/deploy.sh ./scripts/deploy.sh ``` ### 3. 拉取 AI 模型 ``` ./scripts/setup-ollama.sh ``` ### 4. 启动 AI 引擎 ``` cd ai-engine pip install -r requirements.txt python app.py ``` ### 5. 导入 Shuffle 工作流 将来自 `shuffle-workflows/` 的 JSON 文件导入到您的 Shuffle 实例中。 ## 📁 项目结构 ``` ai-soc-lab/ ├── docker/ # Docker Compose configs per service │ ├── docker-compose.wazuh.yml │ ├── docker-compose.thehive.yml │ ├── docker-compose.shuffle.yml │ ├── docker-compose.misp.yml │ └── docker-compose.ollama.yml ├── ai-engine/ # Python AI pipeline │ ├── app.py # FastAPI server │ ├── analyzer.py # Core alert analysis logic │ ├── prompts/ # LLM prompt templates │ │ ├── triage.txt │ │ ├── summary.txt │ │ └── playbook.txt │ └── requirements.txt ├── shuffle-workflows/ # SOAR automation workflows │ ├── ssh-bruteforce.json │ ├── malware-detection.json │ └── data-exfiltration.json ├── wazuh-config/ # Custom Wazuh rules and decoders │ ├── custom-rules.xml │ └── ossec.conf ├── thehive-config/ # TheHive case templates │ └── case-templates.json ├── scripts/ # Deployment and utility scripts │ ├── deploy.sh │ ├── setup-ollama.sh │ ├── test-pipeline.sh │ └── send-test-alert.py └── docs/ # Extended documentation ├── setup-guide.md ├── ai-prompts.md ├── mitre-mapping.md └── screenshots/ # All UI screenshots ``` ## 🔐 安全注意事项 - 所有 LLM 推理均**通过 Ollama 在本地运行** — 不会有任何数据离开您的网络 - AI 输出**仅供参考** — 分析人员保留最终决定权 - 每项 AI 决策都**记录了时间戳、置信度评分和推理过程** - 避免将原始日志发送到基于云的 LLM ## 📊 每日构建计划 | 天数 | 任务 | |-----|------| | 1-2 | 部署 Wazuh + 连接终端 | | 3 | 部署 TheHive + Cortex | | 4 | 部署 Shuffle + 配置 Webhook | | 5 | 安装 Ollama + 拉取 LLaMA 3 | | 6-7 | 连接管道:Shuffle → AI 引擎 → TheHive | ## 🤖 支持的 AI 模型 (通过 Ollama) | 模型 | 大小 | 最适用场景 | |-------|------|----------| | `llama3` | 8B | 常规分诊,均衡 | | `mistral` | 7B | 快速分诊,低内存 | | `phi3` | 3.8B | 资源占用最少 | | `llama3:70b` | 70B | 高精度分析 | ## 📜 许可证 MIT — 可自由使用、修改和分享。 ## 👤 作者 **Sandeep Mothukuri** - GitHub: [@sandeepmothukuri](https://github.com/sandeepmothukuri) - 网站: [cybertechnology.in](https://cybertechnology.in) - LinkedIn: [linkedin.com/in/sandeepmothukuris](https://www.linkedin.com/in/sandeepmothukuris) - 电子邮件: sandeep.mothukuris@gmail.com ## 🗂️ 所有仓库 | 仓库 | 描述 | |---|---| | [ai-soc-lab](https://github.com/sandeepmothukuri/ai-soc-lab) | 使用 Wazuh + TheHive + Ollama (LLaMA3) 进行自动分诊的 AI 增强型 SOC | | [advanced-soc-lab-v2.0](https://github.com/sandeepmothukuri/advanced-soc-lab-v2.0) | 包含 OpenSearch, Suricata, Zeek, MISP, Caldera, Velociraptor 的 12 工具 SOC 实验室 | | [Autonomous-SOC-Lab](https://github.com/sandeepmothukuri/Autonomous-SOC-Lab) | 具备 AI 驱动检测和自我修复剧本的自主 SOC | | [soc-threat-hunting-lab](https://github.com/sandeepmothukuri/soc-threat-hunting-lab) | 威胁检测实验室 — Zeek, RITA, Arkime, Velociraptor, OSQuery, MISP | | [soc-lab-free](https://github.com/sandeepmothukuri/soc-lab-free) | 免费 SOC 实验室 — OpenVAS, Wazuh, pfSense, Proxmox Mail, Lynis | | [soc-lab](https://github.com/sandeepmothukuri/soc-lab) | SOC 分析师家庭实验室 — Wazuh SIEM, Sysmon, MITRE ATT&CK 映射 | | [cyberblue](https://github.com/sandeepmothukuri/cyberblue) | 容器化蓝队平台 — SIEM, DFIR, CTI, SOAR, 网络分析 |
标签:AI SOC, AI决策支持, AI安全, AI风险缓解, ATT&CK映射, Chat Copilot, CIDR查询, Cloudflare, Cortex, DLL 劫持, EDR, IPS, LangChain, LLaMA 3, LLM评估, MITRE ATT&CK, Ollama, Rootkit, Shuffle SOAR, SOAR, SOC实验室, Suricata, TheHive, Wazuh, Zeek, 人工智能, 入侵检测系统, 参数枚举, 告警分类, 大语言模型, 威胁情报, 威胁检测与响应, 安全实验室, 安全数据湖, 安全架构, 安全运营, 安全运营中心, 工单管理, 开发者工具, 开源SOC, 扫描框架, 日志聚合, 本地大模型, 本地部署, 现代安全运营, 用户模式Hook绕过, 终端检测与响应, 网安实训, 网络安全, 网络安全, 网络映射, 网络流量分析, 脆弱性评估, 自动化告警, 自动化响应, 请求拦截, 轻量级, 逆向工具, 速率限制处理, 防御框架, 隐私保护, 隐私保护