Cypher-Wrangler/Detecting-MITRE-ATT-CK-Execution-Techniques-Using-Sigma-Rules-in-Splunk

GitHub: Cypher-Wrangler/Detecting-MITRE-ATT-CK-Execution-Techniques-Using-Sigma-Rules-in-Splunk

Stars: 0 | Forks: 0

# 在 Splunk 中使用 Sigma 规则检测 MITRE ATT&CK 执行技术 ## 概述 创建 Sigma 规则并在 Splunk 中实现运营化,以检测经过编码的 PowerShell 执行,这是攻击者在攻击的执行阶段用来混淆恶意命令的一种常见对抗技术。 本项目将 Sigma 检测逻辑映射到 Splunk SPL,使检测与 MITRE ATT&CK 对齐,并使用真实的 Windows 进程创建遥测数据进行验证。 ## 目标 - 检测 PowerShell 编码命令(-enc, -EncodedCommand) - 将 Sigma 规则转换为 Splunk SPL - 将检测与 MITRE ATT&CK 执行(TA0002)对齐 - 使用真实的 Windows 日志验证检测 ## MITRE ATT&CK 映射 战术:Execution 技术:PowerShell ID:T1059.001 步骤 1 - 访问 SigmaHQ 的 GitHub 并选择 rules 目录/文件夹,关注 process-creation 事件,Sysmon 的事件 ID = 1 或 Windows 事件 ID = 4688 - 检测逻辑 - ``` title: Potential Encoded PowerShell Command Execution - Proccess Creation id: 784c3c4b-ab8f-4d63-8c16-7c2362ea27c9 status: test description: Detects PowerShell execution using encoded command flags author: Kennedy Kamau modified: 2026-02-09 references: - https://o365blog.com/aadinternals/ tags: - attack.execution logsource: product: windows category: process_creation detection: selection_img: - Image|endswith: - '\powershell.exe' - OriginalFileName: - '\PowerShell.Exe' selection_cli: CommandLine|contains: - '-enc ' - '-encodedcommand' - '-e' selection_evtid: - EventID: 1 condition: all of selection_* falsepositives: - Legitimate use of the library for administrative activity level: high ``` # 使用 sigconverter 转换为 Splunk SPL 的步骤 ``` Image="*\\powershell.exe" OR OriginalFileName="\\PowerShell.Exe" CommandLine IN ("*-enc *", "*-encodedcommand*", "*-e*") EventID=1 ``` # Splunk SPL 检测到一个 PowerShell 编码事件 image ## 告警运营化(企业版) - 为了检测环境中未来运行的任何编码命令,实施告警: Image="*\\powershell.exe" OR OriginalFileName="\\PowerShell.Exe" CommandLine IN ("*-enc *", "*-encodedcommand*", "*-e*") EventID=1 | table _time, host, user, ParentImage, Image, CommandLine | sort - _time 该检测已作为计划告警在 Splunk Enterprise 中实现运营化。 **告警名称:** 检测到编码 PowerShell 执行 **计划:** 每 5 分钟 **触发条件:** 结果数 > 0 **严重程度:** 中 Screenshot 2026-02-10 143803 ### 该告警提供以下字段以支持快速分类: - 时间戳 - 用户账户 - 父进程 - 完整命令行 ### 分析师响应工作流 - 审查编码的 PowerShell 命令行 - 解码 Base64 payload 以确定意图 - 识别父进程 - 确定执行涉及的资产范围 - 如果确认存在恶意行为,则升级至应急响应。
标签:AMSI绕过, ATT&CK 覆盖率, Cloudflare, IPv6, MITRE ATT&CK, OpenCanary, PowerShell, RFI远程文件包含, Sigma 规则, SPL, Sysmon, Windows 安全, 域名分析, 威胁检测, 安全运营, 执行防御, 扫描框架, 攻击映射, 混淆命令, 编码命令检测, 网络安全, 隐私保护