divyanshsingh25/SIEM-SoC-Home-Lab
GitHub: divyanshsingh25/SIEM-SoC-Home-Lab
一个完全文档化的 SIEM 与 SOC 分析师家庭实验室,基于 Splunk 和 Sysmon 实现从攻击模拟到威胁检测的端到端实战演练。
Stars: 0 | Forks: 1
# 🛡️ SIEM & SOC 家庭实验室
一个完全文档化、注重实操的 SOC 分析师实验室,基于 Splunk Enterprise、Sysmon、Kali Linux 和 Windows 10 构建。涵盖安装、配置、攻击模拟、检测工程、威胁狩猎以及仪表盘构建等内容。
## 🏗️ 实验室架构
```
┌──────────────────────────────────────────────────────────────┐
│ Physical Host — Windows │
│ Splunk Enterprise • localhost:8000 │
│ Indexer + Search Head │
│ Port 9997 ◄─────────────────────┐ │
└──────────────────────────────────────────────────────────────┘
│ TCP 9997
│ (log forwarding)
┌──────────────────────────┐ ┌─────────────────────────────────┐
│ Kali Linux VM │ │ Windows 10 VM (Victim) │
│ Attacker │─────►│ Splunk Universal Forwarder │
│ │ │ Sysmon (SwiftOnSecurity) │
│ nmap • Metasploit │ │ Windows Event Logs │
│ Hydra • CrackMapExec │ │ Security / System / App │
│ Atomic Red Team │ │ │
└──────────────────────────┘ └─────────────────────────────────┘
```
## 📁 仓库结构
```
SIEM-SoC-HomeLab/
│
├── 01-lab-setup/ # Installation guides + config files
│ ├── splunk-install.md # Splunk Enterprise setup on host
│ ├── sysmon-install.md # Sysmon + SwiftOnSecurity config
│ ├── universal-forwarder.md # UF install & configuration guide
│ ├── inputs.conf # Forwarder input configuration
│ ├── outputs.conf # Forwarder output (→ host:9997)
│ ├── sysmonconfig.xml # SwiftOnSecurity Sysmon ruleset
│ └── indexes.conf # Splunk index definitions
│
├── 02-log-sources/ # Log source reference documentation
│ ├── windows-event-logs.md
│ ├── sysmon-event-ids.md
│ └── network-logs.md
│
├── 03-attack-simulation/ # Attack scenarios run from Kali
│ ├── 01-port-scanning.md
│ ├── 02-brute-force-rdp.md
│ ├── 03-metasploit-payload.md
│ ├── 04-lateral-movement.md
│ └── 05-atomic-red-team.md
│
├── 04-detection-rules/ # SPL detection queries
│ ├── port-scan-detection.spl
│ ├── brute-force-detection.spl
│ ├── suspicious-process.spl
│ ├── lateral-movement.spl
│ └── privilege-escalation.spl
│
├── 05-analysis/ # Log analysis & investigation
│ ├── sysmon-analysis.md
│ ├── windows-security-logs.md
│ └── network-connection-analysis.md
│
├── 06-threat-hunting/ # Threat hunting playbooks
│ ├── hunting-living-off-the-land.md
│ ├── hunting-persistence.md
│ └── hunting-c2-beacons.md
│
├── 07-dashboards/ # Splunk dashboard XMLs
│ ├── security-overview.xml
│ ├── brute-force-monitor.xml
│ └── process-activity.xml
│
├── 08-mitre-mapping/ # MITRE ATT&CK mappings
│ ├── techniques-covered.md
│ └── mitre-matrix.md
│
├── 09-screenshots/ # Lab screenshots & evidence
│ └── ...
│
└── README.md
```
## 🚀 快速开始
### 前置条件
| 工具 | 用途 | 链接 |
|---|---|---|
| VMware / VirtualBox | Hypervisor | [vmware.com](https://www.vmware.com) |
| Splunk Enterprise | SIEM (免费 500MB/天) | [splunk.com](https://www.splunk.com/en_us/download/splunk-enterprise.html) |
| Splunk Universal Forwarder | 日志转发 | [splunk.com](https://www.splunk.com/en_us/download/universal-forwarder.html) |
| Sysmon | Endpoint 遥测 | [sysinternals](https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon) |
| Kali Linux | 攻击模拟 | [kali.org](https://www.kali.org/get-kali/) |
### 配置顺序
```
01-lab-setup → 02-log-sources → 03-attack-simulation
↓
08-mitre-mapping ← 07-dashboards ← 06-threat-hunting
↑
04-detection-rules → 05-analysis
```
## 📂 文件夹指南
### 01-lab-setup
包含启动和运行该实验室所需的一切 —— Splunk Enterprise、Sysmon 和 Universal Forwarder 的安装指南,以及所有原始配置文件(`inputs.conf`、`outputs.conf`、`sysmonconfig.xml`、`indexes.conf`)都集中在一处。
### 02-log-sources
关于每个日志源生成的内容、哪些 Event ID 重要,以及数据如何在 Splunk 中被索引的参考文档。
### 03-攻击模拟
从 Kali Linux 执行的分步攻击 playbook。每个文件涵盖攻击目标、具体命令,以及预期会在受害机上生成的日志。
### 04-detection-rules
独立的 SPL `.spl` 文件 —— 每个文件包含一个检测规则。可以直接粘贴到 Splunk 中作为保存的搜索(saved searches)或计划警报(scheduled alerts)。
### 05-分析
攻击后的调查演练。介绍如何跨日志源进行追踪、重建攻击者时间线以及对警报进行分类。
### 06-threat-hunting
基于假设的狩猎 playbook,涵盖 LOLBins、持久化机制和 C2 beacon 模式。
### 07-dashboards
Splunk 仪表盘 XML 文件。通过 Settings → User Interface → Dashboards → Import XML 导入。
### 08-mitre-mapping
将每个攻击场景和检测规则映射到其对应的 MITRE ATT&CK 技术 ID。
## ⚔️ 涵盖的攻击场景
| # | 攻击 | 工具 | Sysmon Event | MITRE |
|---|---|---|---|---|
| 01 | 端口扫描 | nmap | EventID 3 | T1046 |
| 02 | RDP 暴力破解 | Hydra | EventID 4625 | T1110.001 |
| 03 | 反向 Shell | Metasploit | EventID 1, 3 | T1059 |
| 04 | 横向移动 | CrackMapExec | EventID 4624 | T1021.002 |
| 05 | LOLBIN 执行 | Atomic Red Team | EventID 1 | T1218 |
| 06 | 持久化 | Reg / Sched. Task | EventID 13 | T1053 |
## 📚 参考资料
- [Splunk 文档](https://docs.splunk.com)
- [SwiftOnSecurity Sysmon 配置](https://github.com/SwiftOnSecurity/sysmon-config)
- [MITRE ATT&CK](https://attack.mitre.org)
- [Atomic Red Team](https://github.com/redcanaryco/atomic-red-team)
- [Boss of the SOC 数据集](https://github.com/splunk/botsv3)
- [Splunk Security Essentials](https://splunkbase.splunk.com/app/3435)
- [TryHackMe SOC Level 1](https://tryhackme.com/path/outline/soclevel1)
## ⚠️ 免责声明
该实验室仅为**教育和研究目的**而构建。所有攻击均在**隔离的虚拟网络**中进行。切勿在不属于您的系统上,或在未获得明确书面测试授权的系统上使用这些技术。
## 👤 作者
**Divyansh Singh**
- 🐙 GitHub: https://github.com/divyanshsingh25
- 💼 LinkedIn:https://www.linkedin.com/in/divyansh-singh-8b8955381
*学习。攻击。检测。循环往复。* 🔁
标签:安全实验环境, 安全运营, 扫描框架, 插件系统