MetaMaaz/siem-detection-lab
GitHub: MetaMaaz/siem-detection-lab
基于 Wazuh 和 Sysmon 构建的家庭 SOC 检测实验室,提供十条 MITRE ATT&CK 映射检测规则及完整调查文档,帮助用户端到端练习安全运营工作流。
Stars: 0 | Forks: 0
# SIEM 检测实验室
一个家庭 SOC 实验室,将 Windows + Sysmon 遥测数据接入 **Wazuh**,然后
检测映射到 **MITRE ATT&CK** 的十种真实对手技术。每种
检测都同时提供便携的 **Sigma** 规则和可用的 **Wazuh**
规则,使用 **Atomic Red Team** 进行模拟,并附带
调查报告文档。其中一种高置信度检测接入了自动
**主动响应**。
旨在端到端地练习 Tier 1 SOC 工作流:*模拟攻击 →
观察遥测数据落地 → 检测 → 调查 → 调优。*
## 架构
```
┌─────────────────────────────┐
│ Windows 10/11 VM (victim) │
│ │
│ Sysmon ─┐ │
│ Security ├─ event logs │
│ PowerShell┘ │
│ │ │
│ Wazuh Agent │
└────────┼─────────────────────┘
│ encrypted 1514/udp
▼
┌─────────────────────────────┐
│ Wazuh Manager (Docker / │
│ Ubuntu VM) │
│ │
│ Decoders → local_rules.xml │
│ │ │
│ Alerts → Wazuh Dashboard │
└─────────────────────────────┘
Attacks simulated on the victim with Atomic Red Team (one command per
ATT&CK technique). No real malware required.
```
## 检测
| # | 检测 | ATT&CK | 日志来源 | Sigma | Wazuh |
|---|-----------|--------|-----------|-------|-------|
| 1 | 暴力破解失败的登录 | T1110 | Security 4625 | `win_bruteforce_failed_logons.yml` | 100100 |
| 2 | PowerShell 编码命令 | T1059.001 | Sysmon 1 | `win_powershell_encoded_command.yml` | 100101 |
| 3 | Office 生成 shell | T1566.001 | Sysmon 1 | `win_office_spawning_shell.yml` | 100102 |
| 4 | 注册表 Run-key 持久化 | T1547.001 | Sysmon 13 | `win_registry_runkey_persistence.yml` | 100103 |
| 5 | 新建本地管理员账户 | T1136.001 | Security 4720/4732 | `win_new_local_admin.yml` | 100104, 100108 |
| 6 | Certutil 下载 (LOLBin) | T1105 | Sysmon 1 | `win_certutil_download.yml` | 100105 |
| 7 | 安全日志被清除 | T1070.001 | Security 1102 | `win_security_log_cleared.yml` | 100106 |
| 8 | LSASS 内存访问 | T1003.001 | Sysmon 10 | `win_lsass_memory_access.yml` | 100107 |
| 9 | 计划任务创建 | T1053.005 | Sysmon 1 | `win_scheduled_task_creation.yml` | 100109 |
| 10 | PowerShell 出站连接 | T1071.001 | Sysmon 3 | `win_powershell_network_connection.yml` | 100110 |
规则 100108 增加了一个与区域设置无关的检查,用于添加到本地
Administrators 组 (4732) 的账户。它还驱动了
`docs/04-active-response.md` 中的主动响应,这是该实验室唯一的自动遏制操作。
### 在实验室中验证
三个优先级检测在实时的 Windows 11
受害机上进行了端到端运行,并捕获了告警截图和详细的调查过程:
| 检测 | 规则 | ATT&CK | 报告 |
|-----------|------|--------|---------|
| PowerShell 编码命令 | 100101 | T1059.001 | [t1059-powershell-encoded.md](investigations/t1059-powershell-encoded.md) |
| 新建本地管理员账户 | 100108 | T1136.001 | [t1136-new-local-admin.md](investigations/t1136-new-local-admin.md) |
| LSASS 内存访问 | 100107 | T1003.001 | [t1003-lsass-access.md](investigations/t1003-lsass-access.md) |
运行该实验室发现了两个真实的 bug —— 一个错误的内置父规则
(`if_sid 60144` → `60154`),以及阻止记录 LSASS 访问的 Sysmon 配置间隙 —— 这两个问题都已修复并记录在
[docs/06-detection-engineering-notes.md](docs/06-detection-engineering-notes.md) 中。
规则 100110(PowerShell 出站)是一个已记录的已知问题,正等待
`wazuh-logtest` 追踪;请参阅同一份说明。
## 仓库布局
```
siem-detection-lab/
├── README.md
├── rules/ # 10 portable Sigma rules
├── wazuh/local_rules.xml # Wazuh equivalents (rule IDs 100100+)
├── docs/
│ ├── 01-lab-setup.md # build the VMs, install Wazuh + Sysmon
│ ├── 02-simulation.md # Atomic Red Team command per detection
│ ├── 03-investigation-template.md
│ ├── 04-active-response.md # auto-disable a rogue admin account
│ ├── 05-lab-walkthrough.md # full build steps (macOS Apple Silicon)
│ └── 06-detection-engineering-notes.md # live bugs found + fixed
├── investigations/ # worked investigations + alert screenshots
└── .github/workflows/validate-sigma.yml
```
## 快速开始
1. 按照 `docs/01-lab-setup.md` 搭建 Wazuh + 带有 Sysmon 的 Windows 受害机。
2. 将 `wazuh/local_rules.xml` 追加到 manager 的规则中并重启。
3. 从 `docs/02-simulation.md` 运行模拟,观察告警是否触发。
4. 使用 `docs/03-investigation-template.md` 进行调查,将报告 + 截图保存在 `investigations/` 下。
## 展示技能
SIEM (Wazuh) · 检测工程 · Sigma · MITRE ATT&CK · Sysmon ·
Windows 事件日志分析 · 对手模拟 (Atomic Red Team) ·
事件调查 · 告警调优 / 误报分析
## 许可证
MIT — 见 [LICENSE](LICENSE)。
标签:IP 地址批量处理, Sigma规则, SOC实验环境, Sysmon, Wazuh, 安全运营, 扫描框架, 目标导入, 自动化响应, 请求拦截