nirajmaharz/Splunk-Detection-Engineering-lab

GitHub: nirajmaharz/Splunk-Detection-Engineering-lab

基于Splunk的Active Directory检测实验室,用于模拟攻击和威胁检测。

Stars: 0 | Forks: 0

# Splunk SOC 检测实验室 一个基于自托管 Active Directory 环境的动手检测工程实验室,使用 Splunk Enterprise 模拟现实世界的 SOC 工作流程——日志摄取、威胁检测、警报和仪表板。 ## 实验室架构 ``` ┌─────────────────────────────────────────────────────────┐ │ VMware Workstation │ │ │ │ ┌──────────────────────┐ ┌───────────────────────┐ │ │ │ Windows Server 2019 │ │ Windows 10 │ │ │ │ DC: marvel.local │ │ Domain Joined Client │ │ │ │ 172.25.1.102 │ │ 172.25.1.x │ │ │ │ │ │ │ │ │ │ ┌────────────────┐ │ │ ┌─────────────────┐ │ │ │ │ │ Splunk │ │ │ │ Splunk UF │ │ │ │ │ │ Enterprise │◄─┼────┼──│ Windows TA │ │ │ │ │ │ (Developer) │ │ │ └─────────────────┘ │ │ │ │ └────────────────┘ │ └───────────────────────┘ │ │ │ ┌────────────────┐ │ │ │ │ │ Splunk UF │ │ ┌───────────────────────┐ │ │ │ │ Windows TA │ │ │ Parrot OS (Attacker) │ │ │ │ └────────────────┘ │ │ 172.25.1.10 │ │ │ └──────────────────────┘ │ Metasploit / Hydra / │ │ │ │ CrackMapExec │ │ │ └───────────────────────┘ │ │ Custom Network: 172.25.1.0/24 │ └─────────────────────────────────────────────────────────┘ ``` ## 构建的检测 所有检测都映射到 [MITRE ATT&CK](https://attack.mitre.org/)。每个检测都位于 `detections/` 目录中,包含详细的说明,解释逻辑、模拟步骤和调整。 | 检测 | 战术 | 技术方法 | 严重性 | 文件 | |------|--------|-----------|----------|------| | SMB 强制破解 | 凭据访问 | T1110 | 高 | [smb_bruteforce.md](detections/smb_bruteforce.md) | | AS-REP Roasting | 凭据访问 | T1558.004 | 高 | [asrep_roasting.md](detections/asrep_roasting.md) | | Kerberoasting | 凭据访问 | T1558.003 | 严重 | [kerberoasting.md](detections/kerberoasting.md) | | 新建本地管理员 | 持久性 | T1136.001 | 高 | [new_local_admin.md](detections/new_local_admin.spl) | | 提权 | 提权 | T1078 | 高 | [privilege_escalation.md](detections/privilege_escalation.spl) | | 可疑的 PowerShell 执行 | 执行 | T1059.001 | 中等 | [suspicious_powershell.md](detections/suspicious_powershell.spl) | | 创建计划任务 | 持久性 | T1053.005 | 中等 | [scheduled_task.md](detections/scheduled_task.spl) | ## 仓库结构 ``` Splunk-detection-engineering-lab/ │ ├── README.md ← This file │ ├── setup/ │ ├── universal-forwarder.md ← UF installation & inputs.conf │ │ ├── detections/ │ ├── smb_bruteforce.md │ ├── asrep_roasting.md | ├── kerberoasting.md │ ├── new-local-admin.md │ ├── privilege-escalation.md │ ├── suspicious-powershell.md │ ├── scheduled-task.md │ └── pass-the-hash.md │ ├── alerts/ │ └── alert-configs.md ← Splunk alert settings for each │ ├── dashboards/ │ ├── smb-bruteforce-detection.xml ← Splunk dashboard export (XML) │ └── dashboard-guide.md ← How to import the dashboard │ └── screenshots/ └── (All screenshots) ``` ## 实验室设置 | 主机 | 角色 | IP | OS | |------|------|----|----| | Windows Server 2019 | 域控制器 + Splunk Enterprise | 172.25.1.102 | Windows Server 2019 | | Windows 10 | 域成员客户端 | 172.25.1.x | Windows 10 | | Parrot OS | 攻击者机器 | 172.25.1.10 | Parrot OS | ## 组件 | 组件 | 目的 | |------|---------| | Splunk Enterprise (开发者许可证) | SIEM - 日志摄取、搜索、警报、仪表板 | | Splunk Universal Forwarder | 将 Windows 事件日志发送到 Splunk | | Splunk Add-on for Microsoft Windows (TA) | 用于 Windows 日志的字段提取 | | Active Directory (marvel.local) | 生成真实的身份验证和目录事件日志 | | Sysmon | 端点遥测 - 进程创建、网络连接、文件事件 | ## 日志来源 | 来源 | 事件 ID | 描述 | |--------|-----------|-------------| | Windows 安全日志 | 4624, 4625, 4648, 4672, 4720, 4732, 4768, 4771 | 身份验证、权限使用、账户管理 | | Windows 系统日志 | 7045, 7036 | 服务安装和状态更改 | | Sysmon | 1, 3, 7, 11, 13 | 进程创建、网络、文件、注册表 | ## 设置指南 请参阅 `setup/splunk_setup.md` 获取分步说明: 1. Splunk Enterprise 安装和索引配置 2. 通用转发器部署 3. Windows TA 配置 4. 使用 SwiftOnSecurity 配置的 Sysmon 部署 5. 警报配置 ## 攻击模拟 每个检测都包括使用攻击者机器(Parrot OS)上可用的工具进行的模拟步骤: | 工具 | 用途 | |------|----------| | Hydra | SMB / RDP 强制破解模拟 | | nxc | SMB 枚举和凭据喷射 | | Metasploit | 漏洞利用和后渗透模拟 | | Atomic Red Team | MITRE ATT&CK 技术模拟 | | Impacket | Kerberoasting、Asreproasting、Pass-the-Hash | ## 展示的技能 - 使用 SPL(Splunk 处理语言)进行检测工程 - MITRE ATT&CK 映射和威胁建模 - Active Directory 攻击模拟和日志分析 - SIEM 警报、调整和仪表板创建 - 事件分类和 SOC 分析师工作流程 - Windows 事件日志取证(安全、Sysmon) ## 参考资料 - [MITRE ATT&CK 框架](https://attack.mitre.org/) - [Splunk 安全基础](https://splunkbase.splunk.com/app/3435) - [SwiftOnSecurity Sysmon 配置](https://github.com/SwiftOnSecurity/sysmon-config) - [Atomic Red Team](https://github.com/redcanaryco/atomic-red-team) - [Windows 安全事件日志百科](https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/)
标签:BurpSuite集成, Terraform 安全, 速率限制