v1ctor-cyber/SOC-Monitoring-Lab
GitHub: v1ctor-cyber/SOC-Monitoring-Lab
基于 Windows 安全日志的 SOC 监控实验室,利用 Python 自动采集、分析关键安全事件并生成调查报告,覆盖身份验证监控、用户生命周期审计、权限提升检测与日志篡改发现等蓝队核心场景。
Stars: 0 | Forks: 0
# SOC 监控实验室
这是一个安全监控实践实验室,旨在利用 Windows Security Log 的真实事件,模拟 SOC(Security Operations Center)分析师的日常活动。
该项目可自动收集、分析基于身份验证、账户管理、管理权限变更以及企图掩盖踪迹的事件,并生成报告。
## 关于项目
该实验室是在我向网络安全领域的 SOC Analysis 和 Blue Team 方向进行职业转型期间开发的。
其目的是将真实的 Windows 事件转化为调查案例,重现安全分析师日常执行的操作。
所有场景均在本地环境中执行,使用了 Windows Security Logs、PowerShell 和 Python。
## 概览
| 领域 | 覆盖范围 |
| ------------------------------ | --------- |
| Authentication Monitoring | ✅ |
| User Lifecycle Monitoring | ✅ |
| Privilege Escalation Detection | ✅ |
| Security Auditing | ✅ |
| Log Tampering Detection | ✅ |
| Automated Reporting | ✅ |
| MITRE ATT&CK Mapping | ✅ |
## 使用的技术
* Python 3
* PowerShell
* Windows Event Viewer
* Windows Security Logs
* Git
* GitHub
## 实验室架构
```
Windows Security Logs
↓
Event Viewer
↓
Python Scripts
↓
SOC Reports
↓
Investigação
```
流程:
1. Windows 记录安全事件。
2. 脚本收集相关事件。
3. 数据被自动处理。
4. 生成 SOC 报告。
5. 对事件进行调查和记录。
## 监控的事件
| Event ID | 事件 | 目标 |
| -------- | --------------------- | ----------------------------------------- |
| 4625 | 登录失败 | 检测潜在的 brute force 攻击 |
| 4624 | 登录成功 | 审计有效的身份验证 |
| 4720 | 创建用户 | 检测新的本地账户 |
| 4726 | 删除用户 | 审计账户删除 |
| 4728 | 组更改 | 监控权限变更 |
| 4732 | Administrators 组 | 检测 privilege escalation |
| 1102 | Security Log 被清空 | 检测掩盖踪迹的行为 |
## 实现的用例
### 身份验证监控
事件:
* 4624
* 4625
能力:
* 登录监控
* 身份验证失败检测
* 识别潜在的 brute force 攻击
### 用户生命周期监控
事件:
* 4720
* 4726
能力:
* 用户创建
* 用户删除
* 管理变更审计
### 特权提升监控
事件:
* 4728
* 4732
能力:
* 组更改检测
* 管理员账户监控
* 识别 privilege escalation
### 日志篡改检测
事件:
* 1102
能力:
* 检测 Security Log 被清空
* 识别潜在的规避企图
## 开发的检测器
| 脚本 | 功能 |
| ------------------------------ | ---------------------------------- |
| detector_bruteforce.py | 身份验证失败 (4625) |
| detector_logon_sucesso.py | 登录成功 (4624) |
| detector_usuario_criado.py | 用户创建 (4720) |
| detector_usuario_removido.py | 用户删除 (4726) |
| detector_grupo_privilegiado.py | 组更改 (4728) |
| detector_admin_group.py | 加入 Administrators 组 (4732) |
| detector_log_cleared.py | Security Log 被删除 (1102) |
## MITRE ATT&CK 映射
| Event ID | 技术 | 描述 |
| -------- | --------- | ------------------------ |
| 4625 | T1110 | Brute Force |
| 4720 | T1136 | Create Account |
| 4726 | T1531 | Account Access Removal |
| 4728 | T1098 | Account Manipulation |
| 4732 | T1098 | Account Manipulation |
| 1102 | T1070.001 | Clear Windows Event Logs |
## 演示
### 登录失败检测

### Escalonamento de Privilégios

### Security Log 被删除

## 项目结构
```
SOC-Monitoring-Lab/
├── scripts/
├── reports/
├── screenshots/
├── README.md
└── .gitignore
```
## 结果
在测试期间检测到:
* 身份验证失败
* 登录成功
* 用户创建
* 用户删除
* 组更改
* 加入 Administrators 组
* Security Log 被清空
所有事件均被自动处理并转换为 SOC 调查报告。
## 展现的能力
* SOC Analysis
* Blue Team
* Log Analysis
* Incident Investigation
* Windows Security
* Security Monitoring
* Threat Detection
* PowerShell
* Python Automation
* Security Auditing
* Privilege Escalation Detection
* MITRE ATT&CK
## 如何运行
以管理员身份运行脚本:
```
python scripts\detector_bruteforce.py
python scripts\detector_logon_sucesso.py
python scripts\detector_usuario_criado.py
python scripts\detector_usuario_removido.py
python scripts\detector_grupo_privilegiado.py
python scripts\detector_admin_group.py
python scripts\detector_log_cleared.py
```
报告将自动生成在以下文件夹中:
```
reports/
```
## Roadmap
### 已完成
* [x] Event ID 4624
* [x] Event ID 4625
* [x] Event ID 4720
* [x] Event ID 4726
* [x] Event ID 4728
* [x] Event ID 4732
* [x] Event ID 1102
### 下一步实现
* [ ] Event ID 4719 (Audit Policy Changed)
* [ ] 关联 4625 + 4624
* [ ] 严重性分类
* [ ] SOC Dashboard
* [ ] 导出 CSV
* [ ] 集成 Wazuh
## 状态
项目正在持续开发中,重点关注安全监控、Blue Team 和 Windows 日志分析。
标签:AI合规, IPv6, PB级数据处理, PowerShell, Python, SOC分析, Windows安全日志, 安全运维, 无后门, 服务器监控, 红队行动, 网络安全研究