Bikash-Raya/Microsoft-Sentinel-SIEM-SOC-Lab--Hybrid-Endpoint-Monitoring-Threat-Detection-and-Incident-Response
GitHub: Bikash-Raya/Microsoft-Sentinel-SIEM-SOC-Lab--Hybrid-Endpoint-Monitoring-Threat-Detection-and-Incident-Response
该项目记录了使用 Microsoft Sentinel 在混合云环境中实现端点监控、威胁检测与事件响应的完整 SIEM/SOC 实验室搭建过程。
Stars: 0 | Forks: 0
# 🛡️ Microsoft Sentinel – SIEM/SOC 实验室:混合端点监控、威胁检测与事件响应



**编写人:** Bikash Raya
**项目类型:** SIEM/SOC 实验室 – 混合端点监控与威胁检测
## 📁 仓库结构
| 文件 | 描述 |
| --- | --- |
| [Sentinel-SOC-Lab-Report.pdf](./Sentinel-SOC-Lab-Report.pdf) | 包含屏幕截图的完整项目文档 |
| README.md | 项目概述 |
## 📋 概述
本仓库记录了使用 Microsoft Sentinel 设计和实现混合安全信息与事件管理 (SIEM) 实验室的过程。
该实验室模拟了一个混合基础设施,包含:
* 💻 Windows 11 工作站(VMware – 本地)
* 🐧 Ubuntu 22.04 LTS 服务器(VMware – 本地)
* ☁️ Windows Server 2025 Datacenter(Microsoft Azure – 云端)
* 🔗 Azure Arc 用于混合机器管理
* 📊 Microsoft Sentinel 作为中央 SIEM 平台
* 📡 Azure Monitor Agent (AMA) 用于遥测数据收集
* 🗂️ Log Analytics Workspace 用于集中式日志存储
* 🔐 基于角色的访问控制 (RBAC) 用于安全管理
## 🛠️ 使用的技术
* Microsoft Sentinel
* Microsoft Azure
* Azure Arc
* Azure Monitor Agent (AMA)
* Log Analytics Workspace
* Data Collection Rules (DCR)
* Data Collection Endpoint (DCE)
* Microsoft Defender Portal
* VMware Workstation
* Windows Server 2025
* Windows 11
* Ubuntu 22.04 LTS
* KQL (Kusto Query Language)
* PowerShell
* Bash / Linux CLI
## 🧪 实验室组件
| 系统 | 角色 | 托管平台 |
| --- | --- | --- |
| WIN11-LAB-01 | 本地工作站 (RDP 目标) | VMware Workstation |
| Ubuntu 22.04 LTS | 本地 Linux 服务器 | VMware Workstation |
| Azure-VM-WIN-SR | 云端 Windows 服务器 | Microsoft Azure |
| Sentinel-LAW | Log Analytics Workspace | Microsoft Azure |
| Sentinel-DCE | Data Collection Endpoint | Microsoft Azure |
| Sentinel-RG-Lab | Azure 资源组 | Microsoft Azure |
## 🌐 解决方案架构
```
[Endpoints]
↓
[Azure Arc (for on-prem)]
↓
[Azure Monitor Agent (AMA)]
↓
[Data Collection Rules (DCR)]
↓
[Data Collection Endpoint (DCE)]
↓
[Log Analytics Workspace (Sentinel-LAW)]
↓
[Microsoft Sentinel]
↓
[Analytics Rules → Alerts → Incidents]
```
## 🔐 Microsoft Sentinel 基础设施
* 创建了专用资源组:**Sentinel-RG-Lab**
* 部署了 Log Analytics Workspace:**Sentinel-LAW**
* 配置了 Data Collection Endpoint:**Sentinel-DCE**
* 在工作区中启用了 Microsoft Sentinel
* 通过 Azure CLI 注册了 **Microsoft.Insights** 资源提供程序
## 🖥️ 端点部署
### Windows 11 虚拟机 (WIN11-LAB-01)
* VMware Workstation 部署
* 启用了远程桌面协议 (RDP)
* 配置了 Windows 防火墙以允许 RDP 和出站 HTTPS
* 通过 `auditpol` 启用了 Windows 安全审计
### Ubuntu 22.04 LTS 虚拟机
* VMware Workstation 部署
* 应用了系统更新
* 安装并配置了 `rsyslog`
* 生成了测试 syslog 条目以验证日志记录
### Azure Windows Server 2025
* 在 Microsoft Azure 中预配
* 使用系统分配的托管标识进行部署
* 加入到 Sentinel-LAW 以进行遥测数据接入
## 🔗 Azure Arc 接入
* 从 Azure 门户生成了接入脚本
* 在 Windows 11 和 Ubuntu 虚拟机上均执行了该脚本
* 修复了 Windows 上的 PowerShell 执行策略问题:
```
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
```
* 自动安装了 Azure Connected Machine Agent
* 两台虚拟机均注册为 Azure Arc 资源
## 📡 Azure Monitor Agent 与 Data Collection Rules
| 端点 | AMA 安装方式 |
| --- | --- |
| Windows 11 虚拟机 | PowerShell 脚本 |
| Ubuntu 虚拟机 | 通过终端执行 Bash 脚本 |
| Azure Windows Server 2025 | Azure 扩展 (自动化) |
### 已创建的 Data Collection Rules
* **Windows-DCR** — 收集安全、系统和应用程序事件日志 (Event ID:4624、4625、4648)
* **Linux-DCR** — 收集 info 及以上级别的 Syslog (auth、authpriv、daemon、kern、user)
## 🔐 基于角色的访问控制 (RBAC)
| 角色 | 范围 | 用途 |
| --- | --- | --- |
| Monitoring Reader | 资源组 | 查看监控数据、日志和指标 |
| Log Analytics Contributor | 工作区 | Log Analytics 的读/写权限 |
| Microsoft Sentinel Contributor | 工作区 | 管理分析规则、事件和 playbook |
## 📊 遥测验证
### 心跳验证
```
Heartbeat
| project TimeGenerated, Computer, OSType, OSName
| summarize LastSeen=max(TimeGenerated), OS=any(OSType) by Computer
| sort by LastSeen desc
```
✅ 所有三个端点均在过去 5 分钟内报告了心跳
### Syslog 验证
```
Syslog
| take 10
```
✅ 来自 Ubuntu 虚拟机的日志已确认 — SSH 尝试、系统启动、cron 作业
### 跨平台验证
```
union SecurityEvent, Syslog
| where TimeGenerated > ago(30m)
| summarize count() by Computer
```
✅ Windows SecurityEvents 和 Linux Syslog 均确认处于活动状态
## 🚨 威胁检测 — 失败的 RDP 登录规则
创建了一个 **Scheduled Analytics Rule** 来检测潜在的 RDP 暴力破解攻击。
| 属性 | 值 |
| --- | --- |
| 规则名称 | Failed_RDP_Logins |
| 严重性 | 中 |
| 战术 | 初始访问 |
| 技术 | T1110 – 暴力破解 |
| 查询频率 | 每 5 分钟 |
| 回溯期 | 5 分钟 |
| 阈值 | 每个用户/计算机失败尝试 >3 次 |
**检测查询:**
```
Event
| where EventID == 4625
| extend Account = tostring(parse_json(EventData).TargetUserName)
| summarize FailedAttempts = count() by Account, Computer
| where FailedAttempts > 3
```
## 🛡️ 告警与事件验证
1. 使用无效凭据进行了多次失败的 RDP 登录尝试
2. Event 表中出现了 Event ID 为 **4625** 的条目
3. 分析规则在 5 分钟内触发
4. Microsoft Sentinel 中生成了告警
5. 自动创建了中等严重性的事件
**事件详情:**
* **标题:** 检测到多次失败的 RDP 登录
* **实体:** 主机 (WIN11-VM)、用户 (尝试的用户名)
* **状态:** 新建 → 已解决
## 🔍 事件响应
对生成的事件进行了审查,并确认其为授权的实验室测试活动。
## 🛡️ 故障排除与验证
### 遇到的问题
#### PowerShell 执行策略阻止了脚本
* Azure Arc 接入脚本在 Windows 11 上被阻止
* 通过将当前用户的执行策略设置为 `RemoteSigned` 解决了该问题
#### Microsoft.Insights 提供程序未注册
* 由于资源提供程序未注册,DCE 创建失败
* 通过 Azure CLI 注册:`az provider register --namespace Microsoft.Insights`
### 执行的验证
* 确认了来自所有三个端点的心跳
* 验证了来自 Ubuntu 虚拟机的 Syslog 接入
* 验证了 Windows 安全事件日志收集
* 确认了端到端的告警和事件流水线
## 🎯 展示的技能
* Microsoft Sentinel 部署与配置
* Azure Arc 混合机器接入
* Azure Monitor Agent (AMA) 安装
* Data Collection Rules 与端点配置
* Log Analytics KQL 查询
* RBAC 实现 (最小权限)
* Windows 安全审计
* Linux Syslog 配置
* 自定义威胁检测规则创建
* 安全事件调查与响应
* VMware 虚拟化
* 跨平台日志管理
## 🎯 关键要点标签:AI合规, Azure, Microsoft Sentinel, PB级数据处理, 安全运维, 应用安全, 混合云