Niraj-Bathani/splunk-siem-soc-lab
GitHub: Niraj-Bathani/splunk-siem-soc-lab
这是一个基于 Splunk 的家庭 SOC 实验室项目,旨在通过模拟真实攻击场景来练习 Windows 与 Linux 日志分析、检测规则编写及安全调查工作流。
Stars: 0 | Forks: 0
# Splunk SIEM SOC 实验室
这是一个构建于 Splunk Enterprise 之上的蓝队 / SOC 分析师实操实验室,旨在模拟现实世界的日志收集、检测工程和安全调查工作流。
该实验室旨在验证来自 Windows 和 Linux 系统的主机遥测数据,模拟来自 Kali Linux 机器的攻击者行为,并为可疑身份验证、PowerShell 滥用、持久化机制、LOLBins 和侦察活动构建检测规则。
## 本项目演示内容
- 在 VMware 中搭建了多主机 Splunk SIEM 实验室
- 将 Windows 和 Linux 遥测数据接入 Splunk 并进行了验证
- 从 Kali Linux 针对 Ubuntu 和 Windows 主机模拟了攻击者行为
- 针对身份验证滥用、PowerShell 误用、持久化和侦察活动开发了检测规则
- 使用 Splunk SPL 和辅助证据调查了可疑活动
## 展示的关键技能
- Splunk Enterprise 管理
- SIEM 工程与日志接入
- Windows 事件日志分析
- Linux 身份验证日志分析
- 检测工程
- 事件调查与案例文档记录
- MITRE ATT&CK 映射
- 面向安全的 Markdown 文档编写
## 实验室概览
### 实验室中的系统
- **SIEM:** 运行于 RHEL 上的 Splunk Enterprise
- **Windows 受害者:** Windows Server 2025 (`192.168.101.133`)
- **Linux 受害者:** Ubuntu Server (`192.168.101.139`)
- **攻击者:** Kali Linux (`192.168.101.128`)
### 数据流
1. Windows Server 使用 Splunk Universal Forwarder 将事件日志转发给 Splunk。
2. Ubuntu 将身份验证和系统日志转发给 Splunk。
3. 使用 Kali 针对 Ubuntu 生成受控的类攻击活动,并支持整体实验室工作流。
4. Windows 还运行本地模拟脚本以生成高质量的 Windows 遥测数据。
## 截图
### 实验室架构

### Splunk Search Head

### 仪表板概览

## 遥测覆盖范围
### Windows
Windows 系统被配置为捕获并转发:
- 安全日志
- PowerShell 日志
- 进程创建活动
- 命令行可见性
- 账户和组管理事件
- 服务和计划任务创建活动
### 重要 Windows 事件 ID
| 事件 ID | 描述 | 重要意义 |
|---|---|---|
| 4688 | 进程创建 | 进程执行和命令行可见性 |
| 4103 | PowerShell 模块日志记录 | Cmdlet / 模块使用情况 |
| 4104 | PowerShell 脚本块日志记录 | 脚本内容可见性 |
| 4720 | 用户账户已创建 | 持久化 / 未经授权的账户创建 |
| 4732 | 成员已添加到本地组 | 权限提升 / 管理员组更改 |
| 4698 | 已创建计划任务 | 持久化 |
| 7045 | 已安装服务 | 基于服务的持久化 |
### Linux
Ubuntu 系统被配置为捕获并转发:
- `/var/log/auth.log`
- 身份验证失败
- SSH 访问尝试
- 无效用户枚举尝试
- 用户 / 权限相关活动
## 检测覆盖范围
### Linux
- Invalid Linux User Enumeration(无效 Linux 用户枚举)
- Repeated Failed SSH Authentication(重复的 SSH 身份验证失败)
### Windows
- Suspicious PowerShell Execution(可疑 PowerShell 执行)
- Encoded PowerShell Execution(编码的 PowerShell 执行)
- Local User Account Creation(本地用户账户创建)
- Local Administrators Group Modification(本地管理员组修改)
- Scheduled Task Creation(计划任务创建)
- Service Creation(服务创建)
- Certutil LOLBin Execution(Certutil LOLBin 执行)
- Windows Recon Commands(Windows 侦察命令)
## 精选检测
### Linux
- [`detections/linux/invalid-linux-user-enumeration.md`](detections/linux/invalid-linux-user-enumeration.md)
- [`detections/linux/repeated-failed-ssh-authentication.md`](detections/linux/repeated-failed-ssh-authentication.md)
### Windows
- [`detections/windows/suspicious-powershell-execution.md`](detections/windows/suspicious-powershell-execution.md)
- [`detections/windows/encoded-powershell-execution.md`](detections/windows/encoded-powershell-execution.md)
- [`detections/windows/local-user-account-creation.md`](detections/windows/local-user-account-creation.md)
- [`detections/windows/local-admin-group-modification.md`](detections/windows/local-admin-group-modification.md)
- [`detections/windows/scheduled-task-creation.md`](detections/windows/scheduled-task-creation.md)
- [`detections/windows/service-creation.md`](detections/windows/service-creation.md)
- [`detections/windows/certutil-lolbin-execution.md`](detections/windows/certutil-lolbin-execution.md)
- [`detections/windows/windows-recon-commands.md`](detections/windows/windows-recon-commands.md)
## 精选调查
### Ubuntu SSH 暴力破解案例
- [`investigations/linux/ubuntu-ssh-bruteforce-case.md`](investigations/linux/ubuntu-ssh-bruteforce-case.md)
此调查演示了如何使用 Splunk 将重复的 SSH 身份验证失败和用户名枚举活动关联到一个简单的事件调查工作流中。
## 仪表板说明
该实验室包含一个仪表板规划 / SPL 说明文件,用于支持常见的 SOC 工作流,例如:
- 身份验证监控
- PowerShell 活动跟踪
- 进程执行可见性
- 账户变更监控
- 用于未来扩展的 Sysmon 预留位
参见:
- [`dashboards/splunk-dashboard-notes.md`](dashboards/splunk-dashboard-notes.md)
## MITRE ATT&CK 覆盖范围
| 技术 | 描述 | 示例检测 |
|---|---|---|
| T1110 / T1110.001 | Brute Force / Password Guessing | 重复的 SSH 身份验证失败 |
| T1087 | Account Discovery | 无效 Linux 用户枚举 |
| T1059.001 | PowerShell | 可疑 / 编码的 PowerShell 执行 |
| T1136 | Create Account | 本地用户账户创建 |
| T1098 | Account Manipulation | 本地管理员组修改 |
| T1053.005 | Scheduled Task | 计划任务创建 |
| T1543.003 | Windows Service | 服务创建 |
| T1218 | Signed Binary Proxy Execution | Certutil LOLBin 执行 |
| T1082 / T1016 / T1033 | Host / Network / User Discovery | Windows 侦察命令 |
## 关键发现
- Windows 遥测数据成功捕获了进程创建和 PowerShell 活动
- Linux 遥测数据成功捕获了 SSH 身份验证失败和无效用户枚举
- 来自 Kali 的模拟攻击者活动在 Windows 和 Ubuntu 目标上均可观察到
- 已根据真实实验室生成的事件验证了 Splunk SPL 查询
- 调查工作流已通过辅助证据截图进行记录
## 遥测数据的生成方式
遥测数据是通过从 Kali Linux 攻击者系统针对 Ubuntu 进行受控实验室模拟,以及在 Windows 上进行本地模拟活动而生成的。执行这些操作是为了在 Splunk 中创建真实的、可搜索的安全事件。
## 仓库结构
```
splunk-siem-soc-lab/
├── architecture/
├── attack-simulation/
├── dashboards/
├── data-sources/
├── detections/
│ ├── linux/
│ └── windows/
├── investigations/
│ ├── linux/
│ └── windows/
├── screenshots/
│ ├── linux/
│ └── windows/
└── README.md
```
标签:AMSI绕过, Cloudflare, CSV导出, Libemu, Linux日志, LOLBins, MITRE ATT&CK, OpenCanary, PowerShell滥用, SOC实验室, Splunk Enterprise, Splunk SPL, Splunk通用转发器, StruQ, VMware, Windows日志, 主机遥测, 事件调查, 侦查活动, 嗅探欺骗, 威胁检测, 安全实验室, 安全运营, 实战演练, 密码管理, 扫描框架, 持久化机制, 权限维持, 知识库安全, 管理员页面发现, 网络安全, 网络安全审计, 认证滥用, 防御加固, 隐私保护