BaskaranElilan/Security-Operations-Center-Home-Lab

GitHub: BaskaranElilan/Security-Operations-Center-Home-Lab

基于 Azure 云平台构建的一站式 SOC 家庭实验室,集成十余种开源安全工具,提供从威胁检测到事件响应的完整安全运营流水线。

Stars: 0 | Forks: 0

# 🛡️ SOC 家庭实验室 — 基于云的威胁情报与安全监控 ### 基于 Microsoft Azure 构建的综合安全运营中心 [![Azure](https://img.shields.io/badge/Cloud-Microsoft_Azure-0078D4?style=for-the-badge&logo=microsoftazure&logoColor=white)](https://azure.microsoft.com) [![Wazuh](https://img.shields.io/badge/SIEM-Wazuh_4.x-00A7E1?style=for-the-badge&logo=wazuh&logoColor=white)](https://wazuh.com) [![Docker](https://img.shields.io/badge/Container-Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white)](https://docker.com) [![Suricata](https://img.shields.io/badge/NIDS-Suricata-F6A821?style=for-the-badge)](https://suricata.io) [![Grafana](https://img.shields.io/badge/Viz-Grafana-F46800?style=for-the-badge&logo=grafana&logoColor=white)](https://grafana.com) [![MISP](https://img.shields.io/badge/Threat_Intel-MISP-003366?style=for-the-badge)](https://www.misp-project.org) [![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE)
*一个集成的、云端托管的安全监控和事件响应环境 —— 完全使用开源工具构建,旨在用于网络安全教育、培训和真实威胁检测。* **[📖 文档](docs/)** · **[🚀 快速开始](#-quick-start)** · **[🧪 攻击模拟](#-attack-simulations--validation)** · **[📊 截图](#-screenshots)** · **[🗺️ 路线图](#%EF%B8%8F-roadmap--future-enhancements)**
## 📖 概述 本项目实现了一个托管在 **Microsoft Azure** 上的**完整的安全运营中心 (SOC) 家庭实验室**,将 **10 多种开源安全工具**集成到统一的威胁检测、分析和事件响应 pipeline 中。它既是一个**培训平台**,也是一个**功能性的安全监控系统**。 该实验室复制了企业级的 SOC 功能——包括 **SIEM**、**SOAR**、**威胁情报**、**NIDS**、**DFIR** 和**自动警报**——使学生、网络安全爱好者以及没有企业预算的中小型组织也能使用这些能力。 ## 🏗️ 架构
``` ┌─────────────────────────────────────────────────────────────────────────┐ │ MICROSOFT AZURE CLOUD │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌─── Security Tools Subnet ─────────────────────────────────────────┐ │ │ │ │ │ │ │ ┌───────────────┐ ┌──────────┐ ┌───────────┐ ┌─────────────┐ │ │ │ │ │ Wazuh │ │ MISP │ │ The Hive │ │ DFIR-IRIS │ │ │ │ │ │ Server Stack │ │ Threat │ │ Incident │ │ Forensics │ │ │ │ │ │ (Indexer + │ │ Intel │ │ Response │ │ & Case │ │ │ │ │ │ Manager + │ │ Platform │ │ Platform │ │ Management │ │ │ │ │ │ Dashboard) │ │ │ │ │ │ │ │ │ │ │ └──────┬────────┘ └───┬──────┘ └────┬──────┘ └─────────────┘ │ │ │ │ │ │ │ │ │ │ │ ┌──────┴───────┐ ┌────┴─────┐ ┌─────┴─────┐ │ │ │ │ │ Suricata │ │ Shuffle │ │ Prometheus│ │ │ │ │ │ NIDS │ │ SOAR │ │ Metrics │ │ │ │ │ └──────────────┘ └────┬─────┘ └─────┬─────┘ │ │ │ │ │ │ │ │ │ │ ┌────┴──────────────┴─────┐ │ │ │ │ │ Grafana │ │ │ │ │ │ Visualization │ │ │ │ │ └─────────────────────────┘ │ │ │ └───────────────────────────────────────────────────────────────────┘ │ │ │ │ ┌─── Endpoint Subnet ────────────┐ ┌─── Attack Subnet ────────────┐ │ │ │ │ │ │ │ │ │ ┌─────────────┐ ┌───────────┐ │ │ ┌───────────────────────┐ │ │ │ │ │ Windows │ │ Ubuntu │ │ │ │ Kali Linux │ │ │ │ │ │ Server 2022 │ │ Server │ │ │ │ Attack Simulation │ │ │ │ │ │ (Agent) │ │ (Agent) │ │ │ │ VM │ │ │ │ │ └─────────────┘ └───────────┘ │ │ └───────────────────────┘ │ │ │ └────────────────────────────────┘ └──────────────────────────────┘ │ │ │ │ ┌──────────────────────────────┐ │ │ │🔔 Slack / Discord / Telegram │ │ │ │ Real-time Notifications │ │ │ └──────────────────────────────┘ │ └─────────────────────────────────────────────────────────────────────────┘ ```
### 数据流 ``` Endpoints (Wazuh Agents) ──→ Wazuh Server ──→ Alert Analysis │ ┌───────────────┼───────────────┐ ▼ ▼ ▼ The Hive Shuffle Grafana (Case Mgmt) (Automation) (Visualization) │ │ ▼ ▼ DFIR-IRIS Slack/Discord/Telegram (Forensics) (Notifications) │ ▼ MISP (Threat Intel) ``` ## 🔧 技术栈 | 类别 | 工具 | 版本 | 用途 | |:---|:---|:---|:---| | ☁️ **云平台** | Microsoft Azure | IaaS | VMs, VNets, NSGs, Storage | | 🔍 **SIEM** | Wazuh | 4.x | 日志分析,FIM,漏洞检测 | | 📡 **端点代理** | Wazuh Agents | 4.x | Windows 和 Linux 端点监控 | | 🌐 **NIDS** | Suricata | 7.x | 网络入侵检测 | | 🧠 **威胁情报** | MISP | Latest | IOC 共享与恶意软件情报 | | 🎫 **事件响应** | The Hive | 5.x | 案例管理与协作 | | 🔬 **DFIR** | DFIR-IRIS | Latest | 数字取证与调查 | | ⚙️ **SOAR** | Shuffle | Latest | 工作流自动化与编排 | | 📈 **指标** | Prometheus | Latest | 系统与服务性能指标 | | 📊 **可视化** | Grafana | Latest | 安全与指标仪表盘 | | 🔔 **通知** | Slack / Discord / Telegram | — | 实时警报推送 | | 🗡️ **攻击模拟** | Kali Linux | Latest | 可控的渗透测试 | | 🐳 **容器化** | Docker | Latest | 部署 MISP, The Hive, DFIR-IRIS, Shuffle | | 💻 **端点** | Ubuntu Server / Windows Server 2022 | — | 被监控的目标系统 | ## ⚡ 主要特性 ### 🔄 端到端 SOC 生命周期 - **检测** → Wazuh 代理从端点收集日志、FIM 事件和安全数据 - **网络监控** → Suricata NIDS 检测端口扫描、漏洞利用和可疑流量 - **关联** → Wazuh 服务器通过自定义规则将端点 + 网络事件进行关联 - **分流** → 通过 API 集成在 The Hive 中自动创建案例 - **富化** → MISP 提供威胁情报上下文(IOCs,已知的恶意指标) - **调查** → DFIR-IRIS 管理取证工件和详细的案例分析 - **自动化** → Shuffle 编排用于 IOC 提交、过滤和通知的工作流 - **可视化** → Grafana 仪表盘结合了安全事件 + 系统性能指标 - **警报** → 通过 Slack, Discord 和 Telegram 进行实时通知 ### 🏗️ 基础设施 - 具备 **3 个隔离子网**(安全工具 / 端点 / 攻击)的 Azure 分段虚拟网络 - 控制子网间流量的网络安全组 - Docker 容器化部署,实现快速设置和可复现性 ### 🎓 教育设计 - 为学习者提供分步文档 - 可控的攻击模拟环境 - 可复制的设置,适用于学术和培训目的 ## 📋 前置条件 在部署实验室之前,请确保您具备: - [ ] **Microsoft Azure** 订阅(免费层或即用即付) - [ ] 已安装 **Azure CLI** ([安装指南](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)) - [ ] 了解 **Docker** 和 **Docker Compose** 知识 - [ ] 用于访问 VM 的 **SSH 客户端** - [ ] 对 **Linux 系统管理**有基本了解 - [ ] 每台 VM 至少 **8 GB RAM**(推荐:Standard B2s 或 B2ms 实例) ### 预计 Azure 资源 | VM | 操作系统 | 规格 | 用途 | |:---|:---|:---|:---| | wazuh-server | Ubuntu 22.04 | B2ms (2 vCPU, 8 GB) | Wazuh Indexer + Server + Dashboard | | security-tools | Ubuntu 22.04 | B2ms (2 vCPU, 8 GB) | MISP, The Hive, DFIR-IRIS, Shuffle | | monitoring | Ubuntu 22.04 | B2s (2 vCPU, 4 GB) | Prometheus + Grafana | | suricata-nids | Ubuntu 22.04 | B2s (2 vCPU, 4 GB) | Suricata 网络 IDS | | win-endpoint | Windows Server 2022 | B2s (2 vCPU, 4 GB) | 受监控的 Windows 端点 | | linux-endpoint | Ubuntu 22.04 | B1ms (1 vCPU, 2 GB) | 受监控的 Linux 端点 | | kali-attacker | Kali Linux | B2s (2 vCPU, 4 GB) | 攻击模拟 | ## 🚀 快速开始 ### 1. 克隆仓库 ``` git clone https://github.com/BaskaranElilan/Security-Operations-Center-Home-Lab.git cd Security-Operations-Center-Home-Lab ``` ### 2. 配置 Azure 基础设施 ``` # 登录 Azure az login # 运行基础设施部署脚本 chmod +x infrastructure/azure/deploy.sh ./infrastructure/azure/deploy.sh ``` ### 3. 部署 Wazuh SIEM ``` # 通过 SSH 连接到 Wazuh 服务器 VM ssh azureuser@ # 使用官方安装程序安装 Wazuh curl -sO https://packages.wazuh.com/4.9/wazuh-install.sh sudo bash wazuh-install.sh -a ``` ### 4. 部署安全工具 (Docker) ``` # 通过 SSH 连接到安全工具 VM ssh azureuser@ # 部署 MISP cd configs/misp && docker-compose up -d # 部署 The Hive cd ../thehive && docker-compose up -d # 部署 DFIR-IRIS cd ../dfir-iris && docker-compose up -d # 部署 Shuffle cd ../shuffle && docker-compose up -d ``` ### 5. 安装 Wazuh 代理 ``` # 在每个端点 VM 上 chmod +x scripts/install-wazuh-agent.sh ./scripts/install-wazuh-agent.sh ``` ### 6. 配置集成 ``` # 设置工具之间的 API 连接 chmod +x scripts/setup-integrations.sh ./scripts/setup-integrations.sh ``` ## 🧪 攻击模拟与验证 该实验室通过从 **Kali Linux VM** 对受监控的端点进行可控的攻击模拟来进行验证。 ### 模拟攻击 | # | 攻击类型 | 使用工具 | 检测方法 | 结果 | |:---|:---|:---|:---|:---| | 1 | SSH 暴力破解 | Hydra | Wazuh Agent | ✅ 已检测并告警 | | 2 | 文件修改 (勒索软件模拟) | 自定义脚本 | Wazuh FIM | ✅ 已检测并告警 | | 3 | 端口扫描 | Nmap | Suricata NIDS | ✅ 已检测并告警 | | 4 | 漏洞利用尝试 | Metasploit | Suricata + Wazuh | ✅ 已检测并升级 | ### 已验证的端到端工作流 ``` 1. Kali Linux → Launches attack against endpoint 2. Wazuh Agent → Detects suspicious activity on endpoint 3. Suricata → Detects malicious network traffic 4. Wazuh Server → Correlates alerts, triggers rules 5. The Hive → Auto-creates incident case via API 6. MISP → Enriches alerts with IOC matching 7. DFIR-IRIS → Manages forensic investigation 8. Shuffle → Runs automated playbook 9. Slack/Discord → Delivers real-time notification 10. Grafana → Visualizes event on dashboard ``` ### 运行您自己的模拟 ``` # 从 Kali Linux VM chmod +x scripts/attack-simulation.sh ./scripts/attack-simulation.sh ``` ## 📊 截图
🔍 Wazuh SIEM 仪表盘 — 安全警报和代理监控
显示实时安全事件、代理状态和警报严重性分布
📈 Grafana 仪表盘 — 安全指标和系统性能
Wazuh 安全数据和 Prometheus 系统指标的综合可视化
🎫 The Hive — 事件案例管理
从 Wazuh 警报自动生成的案例,包含富化的 IOC 数据
🧠 MISP — 威胁情报平台
IOC 订阅源和威胁情报关联
⚙️ Shuffle — SOAR 工作流自动化
用于警报分流和通知推送的自动化 playbook
🔬 DFIR-IRIS — 数字取证调查
取证案例管理和工件分析
## 📁 仓库结构 ``` Security-Operations-Center-Home-Lab/ ├── 📄 README.md # This file ├── 📄 LICENSE # MIT License ├── 📄 CHANGELOG.md # Version history ├── 📄 CONTRIBUTING.md # Contribution guidelines ├── 📄 SECURITY.md # Security policy ├── 📄 CODE_OF_CONDUCT.md # Community guidelines ├── 📄 .gitignore # Git ignore rules ├── 📄 .env.template # Environment variable template │ ├── 📁 docs/ # Documentation │ ├── 📄 architecture.md # Detailed system architecture │ ├── 📄 installation-guide.md # Step-by-step setup │ ├── 📄 integration-guide.md # Tool integration details │ ├── 📄 testing-guide.md # Attack simulation guide │ ├── 📄 BEST_PRACTICES.md # Security & code best practices │ ├── 📄 MAINTENANCE_GUIDE.md # Operations & maintenance │ └── 📄 PRE_DEPLOYMENT_CHECKLIST.md # Pre-deployment verification │ ├── 📁 configs/ # Configuration files │ ├── 📁 wazuh/ # Wazuh SIEM configs │ │ ├── 📄 ossec.conf # Agent configuration │ │ ├── 📄 local_decoder.xml # Custom Suricata decoder │ │ └── 📄 local_rules.xml # Custom detection rules │ ├── 📁 suricata/ # Suricata NIDS config │ │ └── 📄 suricata.yaml │ ├── 📁 misp/ # MISP deployment │ │ └── 📄 docker-compose.yml │ ├── 📁 thehive/ # The Hive deployment │ │ └── 📄 docker-compose.yml │ ├── 📁 dfir-iris/ # DFIR-IRIS deployment │ │ └── 📄 docker-compose.yml │ ├── 📁 shuffle/ # Shuffle SOAR deployment │ │ └── 📄 docker-compose.yml │ ├── 📁 prometheus/ # Prometheus metrics │ │ └── 📄 prometheus.yml │ └── 📁 grafana/ # Grafana visualization │ └── 📁 provisioning/ │ └── 📄 dashboards.yml │ ├── 📁 infrastructure/ # Cloud infrastructure │ ├── 📄 network-topology.md # Network layout & IP assignments │ └── 📁 azure/ │ ├── 📄 deploy.sh # Azure CLI deployment │ └── 📄 nsg-rules.json # Network security rules │ ├── 📁 scripts/ # Automation scripts │ ├── 📄 install-wazuh-agent.sh # Agent deployment │ ├── 📄 setup-integrations.sh # API & webhook setup │ ├── 📄 attack-simulation.sh # Attack test suite │ └── 📄 verify-deployment.sh # Post-deployment health checks │ ├── 📁 report/ # Academic report │ └── 📄 CI6600_Final_Report.pdf │ └── 📁 screenshots/ # Dashboard screenshots └── 📄 .gitkeep ``` ## 🗺️ 路线图与未来增强 - [ ] 🍎 增加 macOS 和 IoT 端点覆盖 - [ ] 🔎 将 Zeek 与 Suricata 集成以增强网络分析 - [ ] 🤖 实现机器学习模型用于异常检测 - [ ] 🍯 部署蜜罐技术用于横向移动检测 - [ ] 🔄 使用复杂的自动化响应动作增强 Shuffle 工作流 - [ ] 🐳 为所有组件提供完整的 Kubernetes 编排 - [ ] 🏋️ 定期的蓝队演练以进行持续验证 - [ ] 📝 用于基础设施即代码的 Terraform/Bicep 模板 - [ ] 📱 关键警报的移动推送通知 ## 📚 参考文献 - Alzahrani, S. & Hong, L. (2023). *An Open-Source Security Monitoring Solution for Cloud Environments*. Journal of Cybersecurity Research, 7(2), pp. 45-61. - García-Teodoro, P. & Díaz-Verdejo, J. (2022). *Open-Source Tools for Security Monitoring: A Comparative Analysis*. IEEE Security & Privacy, 20(3), pp. 24-31. - Kumar, R. & Mishra, S. (2023). *Integrating Threat Intelligence with SIEM Systems: Challenges and Solutions*. International Journal of Network Security, 25(1), pp. 103-115. - White, J., & Thompson, A. (2023). *Home Labs for Cybersecurity Education: Design Considerations and Best Practices*. Journal of Information Systems Education, 34(2), pp. 112-125. - NIST. (2023). *Guide to Security Information and Event Management (SP 800-92r1)*. National Institute of Standards and Technology. - Rodriguez, M., et al. (2024). *Automation in Security Operations: The Role of SOAR Platforms*. ACM Computing Surveys, 56(4), 1-36. - Wazuh Documentation. (2024). *Wazuh v4.5: The Open-Source Security Platform*. Wazuh Inc. - The Hive Project. (2023). *The Hive: A Scalable, Open-Source Security Incident Response Platform*. - Zimmerman, C. (2023). *The Importance of DFIR Tools in Modern Incident Response*. SANS Institute Reading Room. ## 👤 作者 **Baskaran Elilan** 网络安全与数字取证理学学士 (荣誉) 金斯顿大学 — 科学、工程与计算机学院 ## 📄 许可证 该项目基于 MIT 许可证授权 —— 详见 [LICENSE](LICENSE) 文件。
**⭐ 如果您觉得这个项目有用,请考虑给它点个星! ⭐** *用 ❤️ 为网络安全社区构建*
标签:AMSI绕过, CIDR查询, DFIR-IRIS, Docker, Grafana, Metaprompt, Microsoft Azure, NIDS, NIDS, Shuffle, SOAR, Suricata, TheHive, Wazuh, 基础架构自动化, 威胁情报, 威胁检测, 安全培训, 安全实验室, 安全教育, 安全运营中心, 安全防御评估, 容器化, 容器化, 开发者工具, 开源安全工具, 数字取证, 现代安全运营, 生产就绪, 网络安全, 网络映射, 自动化响应, 自动化脚本, 自定义请求头, 请求拦截, 逆向工程平台, 部署脚本, 隐私保护