jonathan-corbin/siem-detection-and-response-lab

GitHub: jonathan-corbin/siem-detection-and-response-lab

一个完整的SOC家庭实验室项目,涵盖Active Directory攻击模拟、Microsoft Sentinel KQL检测规则编写以及企业级事件响应文档全流程。

Stars: 0 | Forks: 0

# SIEM 检测与响应实验环境 一个功能完备的安全运营中心 (SOC) 家庭实验室,演示了端到端的对手模拟、基于 SIEM 的检测工程以及事件响应文档。每个攻击场景都在实时 Active Directory 环境中执行,使用自定义的 Microsoft Sentinel (KQL) 分析规则进行检测,并附带 ServiceNow 风格的事件报告。 该实验室旨在模拟 Tier 1 SOC 分析师的工作流程——从警报分流到调查再到升级——使用与企业安全运营相同的工具和流程。 ## 实验环境架构 | 组件 | 详情 | |-----------|---------| | **域控制器** | Windows Server 2022 — `DC01.lab.local` | | **域** | `lab.local` | | **SIEM** | Microsoft Sentinel (通过 Azure Arc + AMA 的 Log Analytics 工作区) | | **攻击机** | Kali Linux (裸金属) | | **Hypervisor** | Windows 10 主机上的 VirtualBox | | **日志传输** | Azure Monitor Agent → Data Collection Rule → Log Analytics → Sentinel | ## 网络拓扑图 ``` ┌──────────────────────┐ ┌──────────────────────┐ │ Kali Linux │ │ DC01 │ │ (Attacker) │ │ Windows Server 2022│ │ 192.168.1.162 │◄──────►│ 192.168.1.50 │ │ Bare Metal │ LAN │ lab.local DC │ └──────────────────────┘ │ Azure Arc + AMA │ └──────────┬───────────┘ │ ▼ ┌──────────────────────┐ │ Microsoft Sentinel │ │ law-siem-lab │ │ KQL Detection Rules│ │ Incident Response │ └──────────────────────┘ ``` ## Active Directory 配置 **组织单位 (OU):** IT, HR, Finance | 用户 | OU | 角色 | 攻击相关性 | |------|----|------|-----------------| | `svc.sqlservice` | IT | SQL Service Account (SPN set) | Kerberoasting 目标 | | `svc.backup` | IT | Backup Service (no pre-auth) | AS-REP Roasting 目标 | | `t.harris` | IT | Domain Admin | DCSync / Golden Ticket 权限提升 | | `j.smith` | HR | Standard User | 初始立足点账户 | | `f.allen` | Finance | Standard User | 横向移动目标 | **组:** SQL-Admins, Backup-Operators **SPN:** `MSSQLSvc/DC01.lab.local:1433` 位于 `svc.sqlservice` ## 攻击场景 每个场景遵循相同的结构:执行技术,使用自定义 KQL 查询在 Sentinel 中检测,并在 ServiceNow 风格的事件报告中记录发现。 | # | 场景 | MITRE ATT&CK | 技术 ID | 状态 | |---|----------|-------------|-------------|--------| | 1 | [Kerberoasting](attack-scenarios/01-kerberoasting/) | Credential Access | T1558.003 | ✅ 完成 | | 2 | [AS-REP Roasting](attack-scenarios/02-asrep-roasting/) | Credential Access | T1558.004 | 📋 计划中 | | 3 | [Pass-the-Hash](attack-scenarios/03-pass-the-hash/) | Lateral Movement | T1550.002 | 📋 计划中 | | 4 | [DCSync](attack-scenarios/04-dcsync/) | Credential Access | T1003.006 | 📋 计划中 | | 5 | [Golden Ticket](attack-scenarios/05-golden-ticket/) | Persistence | T1558.001 | 📋 计划中 | ## 检测工程 所有 KQL 检测查询均保存在 [`sentinel-queries/`](sentinel-queries/) 中,旨在作为 Sentinel Analytics Rules 部署。每个查询都映射到特定的 MITRE ATT&CK 技术,并包含检测逻辑及解释、预期字段和阈值、误报考虑因素,以及建议的警报严重性和响应措施。 ## 事件响应文档 每个攻击场景都包含一份 ServiceNow 风格的事件报告,遵循标准化的 IR 工作流程: 1. **检测** — 警报是如何触发的 2. **分流** — 初始分析和严重性分类 3. **调查** — 证据收集和根本原因分析 4. **遏制** — 采取的即时响应行动 5. **修复** — 长期修复和加固建议 6. **经验教训** — 确定的流程改进 模板可在 [`templates/`](templates/) 中找到。 ## 基础设施搭建指南 从头开始复现此实验室的分步文档: - [域控制器设置](infrastructure/dc-setup.md) — VM 创建, AD DS 安装, 域配置, 用户/组配置 - [Sentinel 设置](infrastructure/sentinel-setup.md) — Azure Arc 载入, AMA agent, Data Collection Rules, Sentinel 工作区 - [审核策略配置](infrastructure/audit-policy-config.md) — 检测所需的高级审核策略 ## 使用工具 **攻击方:** Impacket, Mimikatz, Rubeus, CrackMapExec, Hashcat **防御方:** Microsoft Sentinel, KQL, Azure Monitor Agent, Windows Security Event Logs **基础设施:** VirtualBox, Azure Arc, Windows Server 2022, Kali Linux ## 仓库结构 ``` siem-detection-and-response-lab/ ├── README.md ├── infrastructure/ │ ├── dc-setup.md │ ├── sentinel-setup.md │ └── audit-policy-config.md ├── attack-scenarios/ │ ├── 01-kerberoasting/ │ │ ├── attack-steps.md │ │ ├── kql-detection.md │ │ ├── incident-report.md │ │ └── screenshots/ │ ├── 02-asrep-roasting/ │ ├── 03-pass-the-hash/ │ ├── 04-dcsync/ │ └── 05-golden-ticket/ ├── sentinel-queries/ │ └── detection-rules.kql └── templates/ └── servicenow-incident-template.md ``` ## 关于本项目 该实验室作为作品集项目构建,旨在展示实用的 SOC 分析师能力:监控、检测工程、警报分流、调查和事件文档记录。每一次攻击都是实时执行的,每一次检测都是从零编写的,每一份事件报告都遵循企业 IR 工作流程。 ## 未来计划 - Windows 10 工作站 (加入域) 用于横向移动场景 - Ligolo-ng 从受损工作站通过枢纽转向域控制器 - Sysmon 部署以增强端点遥测 - Splunk 集成以实现多 SIEM 检测覆盖 - 针对常见警报类型的 SOAR playbook 自动化
标签:Active Directory, AMSI绕过, Azure Arc, Azure Monitor Agent, Incident Management, ITSM, KQL, Kusto 查询语言, Microsoft Sentinel, PE 加载器, Plaso, ServiceNow, Terraform 安全, Tier 1 分析师, VirtualBox, Web报告查看器, Windows Server 2022, 企业安全, 凭据转储, 协议分析, 告警分诊, 威胁检测, 安全信息与事件管理, 安全工具集合, 安全架构, 安全运营中心, 实战演练, 家庭实验室, 对手模拟, 恶意软件仿真, 搜索引擎爬取, 权限提升, 私有化部署, 网络安全, 网络映射, 网络资产管理, 虚拟化, 防御规避, 隐私保护