AurelioAvila/splunk-brute-force-detection

GitHub: AurelioAvila/splunk-brute-force-detection

基于 Splunk Cloud 和 SPL 查询的 Windows 暴力破解检测实验项目,完整展示了从日志导入到威胁识别的 SOC 分析师工作流程。

Stars: 0 | Forks: 0

# SOC 实验室 — 使用 Splunk 进行暴力破解检测 ## 场景 一个 Windows 终端在短时间内生成了多个失败的认证事件。我将这些日志导入 Splunk Cloud 并使用 SPL 查询来识别针对 administrator 账户的暴力破解攻击。 ## 目标 模拟 Tier 1 SOC 分析师使用 Splunk 的工作流程: 1. 将 Windows 安全事件日志导入 Splunk Cloud 2. 使用 SPL 查询失败的登录事件 (EventCode 4625) 3. 通过统计每个 IP 的失败尝试次数来识别暴力破解模式 4. 生成包含结论和建议的事件报告 ## 使用的工具 - Splunk Cloud (免费试用版) - SPL (Search Processing Language) - Windows Security Event Logs (模拟) ## 检测逻辑 ### 查询 1 — 失败的登录事件 ``` source="windows_security.log" EventCode=4625 | rex "Account Name=(?[^,]+)" | rex "IP Address=(?[^,]+)" | rex "Failure Reason=(?[^\n]+)" | table _time, account, ip, reason | sort _time ``` ### 查询 2 — 暴力破解检测 ``` source="windows_security.log" EventCode=4625 | rex "Account Name=(?[^,]+)" | rex "IP Address=(?[^,]+)" | stats count by ip, account | where count >= 3 | sort -count | rename count as "Failed Attempts", ip as "Source IP", account as "Target Account" ``` ## 结果 - **源 IP:** 192.168.1.105 - **目标账户:** administrator - **失败尝试:** 4 秒内失败 5 次 **结论: 检测到暴力破解** ## 🎯 MITRE ATT&CK 映射 | 技术 | ID | 描述 | |-----------|-----|-------------| | Brute Force: Password Guessing | [T1110.001](https://attack.mitre.org/techniques/T1110/001/) | 针对单一账户的多次失败登录尝试 | | Brute Force: Password Spraying | [T1110.003](https://attack.mitre.org/techniques/T1110/003/) | 短时间内出现的大量失败尝试 | | Valid Accounts | [T1078](https://attack.mitre.org/techniques/T1078/) | 暴力破解成功后的潜在目标 | **战术:** Credential Access (TA0006) ## 📸 截图 ![暴力破解检测 — SPL 查询结果](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/8df17534f6181154.png) ## 我学到了什么 - 如何在 Splunk Cloud 中导入和解析 Windows Security 日志 - 如何编写用于威胁检测的 SPL 查询 - 如何使用 stats 和聚合来识别暴力破解模式 - SPL 与 KQL (Microsoft Sentinel) 的对比 ## 🔗 相关项目 | 项目 | 描述 | |---------|-------------| | [soc-home-lab](https://github.com/AurelioAvila/soc-home-lab) | 使用 Microsoft Sentinel 和 Wazuh 搭建的端到端 SOC 实验室 | | [malware-triage-hash](https://github.com/AurelioAvila/malware-triage-hash) | 通过 VirusTotal API 进行恶意软件分类的 Python 工具 | | [phishing-email-analysis](https://github.com/AurelioAvila/phishing-email-analysis) | 电子邮件头解析器和 IOC 提取工具 |
标签:EventCode 4625, SOC实验室, Splunk Cloud, SPL查询, Windows安全日志, 一级安全分析师, 免杀技术, 凭证访问, 安全模拟演练, 安全运营中心, 密码攻击, 暴力破解检测, 红队行动, 网络安全, 网络映射, 身份验证失败, 隐私保护