Saravanan-Patrick/Lab-04-SIEM-Setup-With-Splunk-Cloud
GitHub: Saravanan-Patrick/Lab-04-SIEM-Setup-With-Splunk-Cloud
这是一个Splunk Cloud SIEM入门实验室,演示Windows安全日志的导出、摄入、SPL查询和SOC仪表板搭建的完整流程。
Stars: 0 | Forks: 0
# Lab-04-SIEM-Splunk-Detection
Windows Security Log Analysis | SPL Queries | SOC Dashboard
## 这是一个完全隔离、受控的实验室环境。未针对任何真实系统进行操作。所有模拟均在个人虚拟机 (VM) 上执行,仅用于教育目的。
## 关于此实验室
Lab 04 侧重于使用 Splunk Cloud 搭建真实的 SIEM。来自 Windows 10 VM 的 Windows Security 日志通过 PowerShell 导出,上传至 Splunk Cloud,并使用 SPL 查询进行分析。创建了 SOC Security Monitoring Dashboard 以实时可视化安全事件 —— 这正是企业 SOC 分析师的日常工作。
## 实验室环境
| Component | Details |
|-----------|---------|
| Hypervisor | VMware Workstation Pro 25H2 |
| Target Machine | Windows 10 x64 |
| SIEM Platform | Splunk Cloud Free Trial |
| Log Source | Windows Security Event Logs |
| Export Format | CSV via PowerShell |
| Total Events Ingested | 100 events |
| Account Monitored | Saro (DESKTOP-SDHF3AV) |
| Dashboard Created | SOC Security Monitoring Dashboard |
## 设置步骤
## 1 通过 PowerShell 导出 Windows Security 日志
在 Windows 10 VM 上 — 以管理员身份打开 PowerShell 并运行:
## 2 上传 CSV 到 Splunk Cloud
登录 Splunk Cloud → Settings → Add Data → Upload → 选择 security-logs.csv → Source type: csv
→ Index: main → Submit
## 3 验证数据摄入
Result: 20 events confirmed ■ — Data successfully ingested into Splunk Cloud!
## 已执行的 SPL 查询
SPL (Search Processing Language) 是 Splunk 中使用的查询语言。以下是在 Lab 04 中编写并执行的查询:
## Query 1 — 验证数据上传:
Result: 100 events found — confirmed successful upload
## Query 2 — 检查字段名称:
Result: Fields visible — TimeCreated, Id, LevelDisplayName, Message
## Query 3 — 查找登录事件:
Result: Logon events found and displayed
## Query 4 — 查找账户活动 (Saro):
Result: 90 events for account Saro detected!
## Query 5 — 统计凭据事件:
Result: Credential Manager events counted
## Query 6 — 账户活动统计:
Result: Count = 90 — used in SOC dashboard panel!
## SPL 查询表:
| Query | Purpose | Result |
|------------|---------|-------------------|
| index=main head 20 | Verify data uploaded | 100 events found |
| index=main head 5 table * | Check field | All Fields visible |
| index=main Message=”*logon*” | Find login events | Logon events found |
| index=main Message=”*Saro*” | Account activity | 90 events detected |
| index=main Message=”*credential*” | Credential events | Events counted |
| index=main Message=”*Saro*” | Dashboard panel | Count 90 |
## SOC 安全监控 Dashboard
在 Splunk Cloud 中创建了一个自定义的 SOC Security Monitoring Dashboard,包含以下面板:
Dashboard Panels Table:
| Panel Name | SPL Query | Result |
|------------|---------|-------------------|
| Account Activity Monitor | index=main Message=”*Saro*” stats count | Count 90 events |
| Credential Event Count | index=main Message=”*credential*” stats count | Credential events monitored |
## 该仪表板显示了账户 Saro 的 90 个事件 —— 在真实的企业 SOC 中,这将触发 User Behavior Analytics (UBA) 警报以进行调查!
## 关键发现表:
| Finding | Details | Significance |
|------------|---------|-------------------|
| Account Monitored | Saro on DESKTOP-SDHF3AV | Real account activity visible in SIEM |
| Total Events | 100 Windows Security events | Full log ingestion confirmed |
| Account Activity | 90 events for Saro | High activity — monitoring required |
| Credential Events | Multiple credential read events | Normal but worth monitoring |
| Security ID | S-1-5-21-1584132682 | User SID tracked in SIEM |
| Event Type | SuccessAudit | Successful operations logged |
## 入侵指标
| IOC Type | Value | Significance |
|------------|---------|-------------------|
| Account Name | Saro | Primary monitored account |
| Machine Name | DESKTOP-SDHF3AV | Target Windows 10 machine |
| Event Count | 90 in short window | High frequency monitoring |
| Event Type | Credential Manager reads | Access pattern visible in SIEM |
| Log Source | security-logs.csv | Windows Security log export |
| SIEM Platform | Splunk Cloud | Industry standard SIEM |
## 安全观察
• 真实的 SIEM 体验 — Splunk Cloud 被 90% 的企业 SOC 所使用。拥有真实的 Splunk 实践经验能让你在 SOC 分析师面试中脱颖而出。
• 账户活动监控 — 检测到账户 Saro 的 90 个事件。在真实的 SOC 中,这种数量将触发 User Behavior Analytics 警报以进行调查。
• Credential Manager 事件 — 可见多个凭据读取事件。虽然属于正常活动,但 SOC 分析师会监控可能表明凭据盗用的异常模式。
• SPL 查询技能 — 编写并执行了多个 SPL 查询以查找特定事件。这是每位 Tier 1 SOC 分析师的核心日常技能。
• 仪表板创建 — 使用实时数据面板构建了 SOC Security Monitoring Dashboard。这正是企业 SOC 分析师日常监控的内容。
## Kill Chain — 所有 4 个实验室关联
| Lab | Kill Chain Stage | MITRE ATT&CK | Action |
|-----|-----------------|-------------|--------|
| Lab 01 | Reconnaissance | T1046 — Network Service Discovery | Nmap found ports 135, 139, 445 |
| Lab 02 | Exploitation | T1110 — Brute Force | Metasploit attacked port 445 |
| Lab 03 | Reconnaissance + C2 | T1046 + T1071 | Traffic analysis with Wireshark |
| Lab 04 | Detection | T1078 — Valid Accounts | SIEM monitoring and log analysis |
## 我学到了什么
• 如何使用 PowerShell Get-WinEvent 命令导出 Windows Security 日志。
• 如何将日志文件摄入 Splunk Cloud SIEM。
• 如何编写 SPL 查询以查找特定的安全事件。
• 如何在 Splunk 中创建 SOC 监控仪表板。
• 如何在 SIEM 中监控账户活动和凭据事件。
• SIEM 如何将之前所有的实验室发现连接到一个检测平台中。
• 获得了行业标准 SIEM 工具 —— Splunk 的真实动手经验。
• 一个账户的 90 个事件如何表明可疑行为。
## 👨💻 关于我
Saravanan — 正从食品技术领域转型至 Cybersecurity,专注于 SOC Analysis 和 Blue Team 操作。本实验室是我的 Mini SOC Home Lab 系列的一部分,用于记录实践学习过程。
- LinkedIn: [linkedin.com/in/saravanan-cyber](https://linkedin.com/in/saravanan-cyber)
- Email: career.entrydesk@gmail.com
- Location: Thiruvallur, Tamil Nadu, India
✅ 如果这个实验室对你有帮助,请给它一个 star!
标签:AI合规, CSV 上传, IPv6, OISF, PowerShell, SOC Analyst, SOC 仪表盘, Splunk Cloud, SPL 查询, TGT, VMware, Windows 10, Windows 安全日志, 安全可视化, 安全实验室, 安全运营中心, 攻防演练, 教学实验, 数据摄取, 日志管理, 网络安全, 网络映射, 隐私保护