hydr-aa/soc-home-lab
GitHub: hydr-aa/soc-home-lab
基于 Wazuh SIEM 和双虚拟机架构的 SOC 家庭实验室,用于练习日志接入、威胁检测、自定义规则编写及攻击模拟验证。
Stars: 0 | Forks: 0
# SOC 家庭实验室 — Wazuh SIEM + 检测工程
一个实操型的安全运营中心 (SOC) 家庭实验室,旨在使用 **Wazuh** 开源 SIEM/XDR 平台练习日志接入、
威胁检测和事件分类。
## 目标
建立一个具备以下功能的 SOC:
1. 集中收集安全遥测数据(Windows 事件日志、Sysmon、Linux 日志)。
2. 检测攻击者行为并将警报映射到 **MITRE ATT&CK**。
3. 让我能够编写和测试**自定义检测规则**。
4. 通过使用 **Atomic Red Team** 模拟攻击来验证检测覆盖率。
## 架构(双虚拟机设计)
两台虚拟机均运行在 **VMware Workstation** 上的 **NAT** 网络中(VMnet8, `192.168.223.0/24`)。
因为宿主机通过 Wi-Fi 连接(网桥模式不稳定),所以使用了 NAT:两台
虚拟机位于同一个虚拟子网中,并**通过 VMware 的虚拟交换机进行 VM 到 VM 的通信**,
这不会触及 Windows 宿主机防火墙 —— 从而实现干净的客户端到服务器通信以及
互联网访问。
```
VMware NAT subnet (192.168.223.0/24 — VMnet8)
|
| agent enrollment (1515/tcp)
| event forwarding (1514/tcp)
|
+-------v--------------------+ +----------------------------------------+
| win10-victim (Windows 10) | | wazuh-server (Ubuntu Desktop 24.04) |
| - Wazuh Agent | -------> | - Wazuh Manager |
| - Sysmon (SwiftOnSecurity)| | - Wazuh Indexer (OpenSearch) |
| Endpoint / attack target | | - Wazuh Dashboard (https://) |
+----------------------------+ +----------------------------------------+
```
## 为什么使用两台虚拟机(而不是 Docker)
之前的 Docker 单节点堆栈可以运行,但是将管理器的端口发布到
NAT 受害者虚拟机时,与 Windows 宿主机上 Docker Desktop 的防火墙规则发生冲突。
将 SIEM 迁移到其**采用桥接网络的独立 Ubuntu 虚拟机**中,可以消除这种冲突,
并产生更干净、更真实且更具可移植性的架构。
## 环境
| 组件 | 值 |
|------------------|----------------------------------------------|
| 宿主机 OS | Windows (32 GB RAM) |
| Hypervisor | VMware Workstation Pro 25 |
| SIEM 虚拟机 | Ubuntu Desktop 24.04 LTS · 2 vCPU · 8 GB · 40 GB |
| 受害者虚拟机 | Windows 10 Enterprise Eval · 2 vCPU · 4 GB · 60 GB |
| SIEM 版本 | Wazuh 4.14.x (all-in-one) |
| 网络 | 桥接(两台虚拟机) |
## 构建顺序
| 阶段 | 文档 | 内容 |
|-------|-----|------|
| 1 | [docs/01-wazuh-server-setup.md](docs/01-wazuh-server-setup.md) | 构建 Ubuntu Desktop 虚拟机 + 安装 Wazuh all-in-one |
| 2 | [docs/02-victim-vm-setup.md](docs/02-victim-vm-setup.md) | 构建 Windows 受害者虚拟机(桥接) |
| 3 | [docs/03-agent-onboarding.md](docs/03-agent-onboarding.md) | 安装 Sysmon + Wazuh agent,验证接入 |
| 4 | [docs/04-detection-testing.md](docs/04-detection-testing.md) | Atomic Red Team 攻击 + 自定义检测 |
| — | [docs/05-screenshot-checklist.md](docs/05-screenshot-checklist.md) | 为作品集收集的证据 |
## 仓库结构
```
soc-home-lab/
├── README.md
├── .gitignore
├── docs/ # step-by-step manuals + writeups
│ ├── 01-wazuh-server-setup.md
│ ├── 02-victim-vm-setup.md
│ ├── 03-agent-onboarding.md
│ ├── 04-detection-testing.md
│ └── 05-screenshot-checklist.md
├── scripts/
│ ├── install-wazuh-server.sh # run on the Ubuntu VM
│ └── install-victim-agent.ps1 # run on the Windows victim VM
├── detections/
│ └── local_rules.xml # custom Wazuh rules
├── attack-simulations/
│ └── atomic-red-team.md # attack playbook mapped to ATT&CK
└── screenshots/ # portfolio evidence
```
## 快速参考
```
# 在 Wazuh 服务器 (Ubuntu) — 服务控制
sudo systemctl status wazuh-manager wazuh-indexer wazuh-dashboard
sudo /var/ossec/bin/agent_control -l # list connected agents
```
```
# 在 Windows 受害者 — agent 控制
Get-Service WazuhSvc
Restart-Service WazuhSvc
```
## 致谢 / 参考资料
- Wazuh 文档:https://documentation.wazuh.com
- Sysmon config:https://github.com/SwiftOnSecurity/sysmon-config
- Atomic Red Team:https://github.com/redcanaryco/atomic-red-team
标签:AI合规, Cloudflare, Libemu, MITRE ATT&CK, Wazuh, 安全运营, 家庭实验室, 应用安全, 扫描框架