PranayNathCyber/Active-Directory-Monitoring-and-Detection-Engineering
GitHub: PranayNathCyber/Active-Directory-Monitoring-and-Detection-Engineering
基于 Wazuh SIEM 和 Sysmon 的活动目录检测工程实验室,演示了账户创建、暴力破解和权限提升等攻击场景的监控与 MITRE ATT&CK 映射检测。
Stars: 0 | Forks: 0
# 🔬 检测工程与威胁狩猎实验室
## 📊 实验室摘要
| 指标 | 数值 |
|---|---|
| 域 | corp.local |
| 受监控端点 | Windows 10 Pro |
| SIEM 平台 | Wazuh (基于 Ubuntu 的 Docker) |
| 遥测数据源 | Sysmon + Windows 安全事件 |
| 已完成阶段 | 6 of 6 ✅ |
| 截取屏幕截图 | 20 |
| 检测到的事件 ID | 4625, 4720, 4728 |
| MITRE 技术 | 4 |
## 🎯 目标
配置 Windows 事件监控,将 Sysmon 遥测数据集成到 Wazuh SIEM 中,并在进程创建监控、身份验证失败告警、账户管理跟踪以及权限提升检测等方面验证 SOC 的检测能力。模拟企业 SOC 环境中使用的真实检测工程和威胁狩猎工作流。
**目标岗位:** 检测工程师 · SOC 分析师 · 威胁猎人 · 蓝队分析师
## 🏗️ 架构
```
┌──────────────────────────────────────────────────────────────┐
│ VirtualBox Host-Only Network │
│ 192.168.56.0/24 │
│ │
│ ┌──────────────────────────┐ ┌──────────────────────┐ │
│ │ Windows 10 Pro │ │ Ubuntu SIEM Server │ │
│ │ corp.local domain │─────►│ │ │
│ │ │ │ Wazuh Docker Stack │ │
│ │ Wazuh Agent │ │ - wazuh-manager │ │
│ │ Sysmon (Event ID 1) │ │ - wazuh-indexer │ │
│ │ Windows Security Events │ │ - wazuh-dashboard │ │
│ │ (4625, 4720, 4728) │ │ │ │
│ └──────────────────────────┘ └──────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
```
## ✅ 阶段完成状态
### 阶段 1 — Wazuh Agent 连接验证
- [x] Windows 10 端点已连接到 Wazuh Manager
- [x] 在 Wazuh dashboard 中验证 Agent 状态为活跃
- [x] 确认端点遥测数据正在流向 SIEM
### 阶段 2 — Sysmon 进程创建检测
- [x] 配置 Sysmon 进行进程创建监控
- [x] 生成 PowerShell 活动以触发检测
- [x] 在 Wazuh 中确认 Sysmon Event ID 1 告警
- [x] 捕获完整的进程元数据(命令行、父进程、哈希值)
- [x] 验证 MITRE ATT&CK 自动映射
### 阶段 3 — 身份验证失败检测 (Event ID 4625)
- [x] 生成多次失败登录尝试
- [x] 在 Wazuh Discover 中执行 Event ID 4625 查询
- [x] 确认身份验证失败告警
- [x] 捕获完整的事件详情,包括来源、账户和失败原因
- [x] 确认 MITRE T1110 映射
### 阶段 4 — Active Directory 用户账户创建
- [x] 在 corp.local 中创建 SOC TestUser 账户
- [x] 筛选 Windows Event Viewer 中的 Event ID 4720
- [x] 在安全日志中确认账户创建事件
### 阶段 5 — Wazuh 中的用户创建检测 (Event ID 4720)
- [x] 在 Wazuh SIEM 中检测到 Event ID 4720
- [x] 在 Wazuh 告警中捕获完整的文档详情
- [x] 确认 MITRE T1136 映射
### 阶段 6 — 权限提升检测 (Event ID 4728)
- [x] SOC TestUser 被添加到 Domain Admins 组
- [x] 验证 Domain Admins 成员身份
- [x] 在 Wazuh 中检测到 Event ID 4728
- [x] 确认包含 MITRE T1078.002 映射的完整告警详情
## 🗺️ MITRE ATT&CK 覆盖范围
| 技术 ID | 名称 | 战术 | 检测方法 | 状态 |
|---|---|---|---|---|
| T1059.001 | PowerShell | Execution | Sysmon Event ID 1 — 进程创建 | ✅ 已检测 |
| T1110 | Brute Force | Credential Access | Windows Event ID 4625 | ✅ 已检测 |
| T1136 | Create Account | Persistence | Windows Event ID 4720 | ✅ 已检测 |
| T1078.002 | Domain Accounts | Privilege Escalation | Windows Event ID 4728 | ✅ 已检测 |
## 📸 截图
### 阶段 1 — Agent 连接
| 文件 | 描述 |
|---|---|
| [`Phase-1/screenshots/01_Wazuh_Agent_Active.png`](Phase-1/screenshots/01_Wazuh_Agent_Active.png) | Wazuh dashboard — 确认活跃的 Windows 端点 |
### 阶段 2 — Sysmon 进程检测
| 文件 | 描述 |
|---|---|
| [`Phase-2/screenshots/02_Sysmon_Process_Creation_Alerts.png`](Phase-2/screenshots/02_Sysmon_Process_Creation_Alerts.png) | Wazuh Sysmon 进程创建告警 |
| [`Phase-2/screenshots/03_Process_Creation_Event_Detail.png`](Phase-2/screenshots/03_Process_Creation_Event_Detail.png) | 详细的进程创建事件 |
| [`Phase-2/screenshots/04_Wazuh_Document_Process_Metadata.png`](Phase-2/screenshots/04_Wazuh_Document_Process_Metadata.png) | 进程执行元数据 |
| [`Phase-2/screenshots/05_Alert_MITRE_Mapping_Severity.png`](Phase-2/screenshots/05_Alert_MITRE_Mapping_Severity.png) | 包含 MITRE 映射和严重级别的告警 |
### 阶段 3 — 身份验证失败
| 文件 | 描述 |
|---|---|
| [`Phase-3/screenshots/06_Failed_Logon_Search_4625.png`](Phase-3/screenshots/06_Failed_Logon_Search_4625.png) | 在 Wazuh 中搜索 Event ID 4625 |
| [`Phase-3/screenshots/07_Failed_Logon_Discover_View.png`](Phase-3/screenshots/07_Failed_Logon_Discover_View.png) | Discover 中的失败登录事件 |
| [`Phase-3/screenshots/08_Event_4625_Document_Details.png`](Phase-3/screenshots/08_Event_4625_Document_Details.png) | Event ID 4625 完整详情 |
| [`Phase-3/screenshots/09_Failed_Auth_Alert_MITRE_Mapping.png`](Phase-3/screenshots/09_Failed_Auth_Alert_MITRE_Mapping.png) | 包含 MITRE T1110 映射的告警 |
### 阶段 4 — AD 用户创建
| 文件 | 描述 |
|---|---|
| [`Phase-4/screenshots/10_AD_Test_Accounts_Created.png`](Phase-4/screenshots/10_AD_Test_Accounts_Created.png) | 在 AD 中创建 SOC TestUser |
| [`Phase-4/screenshots/11_Event_Viewer_4720_Filter.png`](Phase-4/screenshots/11_Event_Viewer_4720_Filter.png) | Event Viewer 筛选 4720 |
| [`Phase-4/screenshots/12_Event_4720_Details.png`](Phase-4/screenshots/12_Event_4720_Details.png) | Event ID 4720 完整详情 |
### 阶段 5 — Wazuh 4720 检测
| 文件 | 描述 |
|---|---|
| [`Phase-5/screenshots/13_Wazuh_4720_Detection_Results.png`](Phase-5/screenshots/13_Wazuh_4720_Detection_Results.png) | Wazuh Event ID 4720 检测 |
| [`Phase-5/screenshots/14_Wazuh_4720_Document_Details.png`](Phase-5/screenshots/14_Wazuh_4720_Document_Details.png) | Wazuh 4720 文档详情 |
### 阶段 6 — 权限提升
| 文件 | 描述 |
|---|---|
| [`Phase-6/screenshots/15_Add_User_Domain_Admins.png`](Phase-6/screenshots/15_Add_User_Domain_Admins.png) | TestUser 被添加到 Domain Admins |
| [`Phase-6/screenshots/16_Domain_Admins_Modification.png`](Phase-6/screenshots/16_Domain_Admins_Modification.png) | 组成员身份修改 |
| [`Phase-6/screenshots/17_Domain_Admins_Membership_Verified.png`](Phase-6/screenshots/17_Domain_Admins_Membership_Verified.png) | 确认 Domain Admins 成员身份 |
| [`Phase-6/screenshots/18_Wazuh_4728_Search_Results.png`](Phase-6/screenshots/18_Wazuh_4728_Search_Results.png) | Wazuh Event ID 4728 搜索结果 |
| [`Phase-6/screenshots/19_Event_4728_Document_Details.png`](Phase-6/screenshots/19_Event_4728_Document_Details.png) | Event ID 4728 文档详情 |
| [`Phase-6/screenshots/20_Event_4728_Alert_MITRE_Mapping.png`](Phase-6/screenshots/20_Event_4728_Alert_MITRE_Mapping.png) | 包含 MITRE 映射的 Event 4728 告警 |
## 📁 仓库结构
```
Detection-Engineering-Lab/
│
├── Phase-1-Agent-Connectivity/
│ └── screenshots/
│
├── Phase-2-Sysmon-Process-Detection/
│ └── screenshots/
│
├── Phase-3-Failed-Auth-Detection/
│ └── screenshots/
│
├── Phase-4-AD-User-Creation/
│ └── screenshots/
│
├── Phase-5-Wazuh-4720-Detection/
│ └── screenshots/
│
├── Phase-6-Privilege-Escalation-Detection/
│ └── screenshots/
│
├── reports/
│ └── Detection_Engineering_Report_Pranay_Nath.docx
│
└── README.md
```
## 🔍 关键发现
- **Sysmon 进程创建事件** 捕获了完整的取证元数据 — 命令行、父进程、用户上下文和文件哈希 — 使分析师无需借助其他工具即可进行调查
- **Event ID 4625 威胁狩猎查询** 在 Wazuh Discover 中得到确认 — 捕获了来源账户和失败原因,验证了暴力破解模式检测
- **双层 Event ID 4720 检测** — 在 Windows Event Viewer 和 Wazuh SIEM 中均得到确认 — 验证了对账户配置活动的冗余可见性
- **Event ID 4728 权限提升** 检测到提升至 Domain Admins 并自动映射 MITRE T1078.002 — 这是项目中的最高优先级告警,代表了直接的入侵指标
## 🔗 相关项目
- [项目 1 — 家庭 SOC 实验室](https://github.com/PranayNathCyber/HOME-SOC-LAB)
- [项目 2 — Active Directory 实验室](https://github.com/PranayNathCyber/Active-Directory-Lab)
- [项目 3 — Sysmon 与 Wazuh 端点实验室](https://github.com/PranayNathCyber/Sysmon-Wazuh-Endpoint-Lab)
- [项目 4 — AD 安全监控实验室](https://github.com/PranayNathCyber/AD-Security-Monitoring-Lab)
## 👤 作者
**Pranay Nath**
网络安全硕士 | 北德克萨斯大学 | 预计 2026 年 12 月毕业
符合 OPT/STEM OPT 申请资格 — 3 年,无需赞助
[](https://linkedin.com/in/pranay-nath)
[](https://github.com/PranayNathCyber)
[](mailto:nathpranoy@gmail.com)
## 📚 参考
- [Wazuh 文档](https://documentation.wazuh.com/)
- [Microsoft Sysmon](https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon)
- [MITRE ATT&CK 框架](https://attack.mitre.org/)
- [Windows 安全事件 ID](https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/)
- [Microsoft AD DS 文档](https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/)
标签:Active Directory, Plaso, Sysmon, Terraform 安全, Wazuh, 安全实验环境, 请求拦截