hunting-for-lateral-movement-via-wmi
它能做什么
这个工具用来查找可疑活动,这些活动表明有人曾尝试利用 WMI 横向移动到网络中的其他电脑上。它会分析事件日志,寻找远程执行命令的迹象。
适用场景
- ✓当你怀疑有入侵者已经突破网络并正在扩散时。
- ✓在调查安全事件,想了解它是如何发生的时候。
- ✓想检查你的安全系统能否发现这类攻击时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/hunting-for-lateral-movement-via-wmi/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“在事件日志中搜索使用 WMI 进行横向移动的迹象。”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会检查 Windows 和 Sysmon 的事件记录,寻找 WmiPrvSE.exe 启动 cmd.exe 或 powershell.exe 等危险程序的情况。它还会检查可能让攻击者持续保持访问权限的可疑配置。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Hunting for Lateral Movement via WMI
Overview
Windows Management Instrumentation (WMI) is commonly abused for lateral movement via wmic process call create or Win32_Process.Create() to execute commands on remote hosts. Detection focuses on identifying WmiPrvSE.exe spawning child processes (cmd.exe, powershell.exe) in Windows Security Event ID 4688 and Sysmon Event ID 1 logs, along with WMI-Activity/Operational events (5857, 5860, 5861) for event subscription persistence.
When to Use
- When investigating security incidents that require hunting for lateral movement via wmi
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Windows Security Event Logs with Process Creation auditing enabled (Event 4688 with command line)
- Sysmon installed with Event ID 1 (Process Creation) configured
- Python 3.9+ with
python-evtx,lxmllibraries - Understanding of WMI architecture and WmiPrvSE.exe behavior
Steps
Step 1: Parse Process Creation Events
Extract Event ID 4688 and Sysmon Event 1 entries from EVTX files.
Step 2: Detect WmiPrvSE Child Processes
Flag processes where ParentImage/ParentProcessName is WmiPrvSE.exe, indicating remote WMI execution.
Step 3: Analyze Command Line Patterns
Identify suspicious command lines matching WMI lateral movement patterns (cmd.exe /q /c, output redirection to admin$ share).
Step 4: Check WMI Event Subscriptions
Parse WMI-Activity/Operational log for event consumer creation indicating persistence.
Expected Output
JSON report with WMI-spawned processes, suspicious command lines, WMI event subscription alerts, and timeline of lateral movement activity.
常见问题
什么是 WMI?
WMI 是 Windows 自带的一个用于管理计算机的工具。攻击者可以用它在其他电脑上运行命令,而且不容易被察觉。
什么是“事件日志”?
事件日志就像电脑的日记,记录了发生的各种事情,包括谁在什么时候做了什么。这个工具会读取这些“日记”,找出可疑活动。
什么是“横向移动”?
指攻击者入侵一台电脑后,尝试转移到同一网络中的其他电脑上,以获得更多控制权或窃取更多信息。
详情
作者的原始描述
Detects WMI-based lateral movement (e.g. wmic process call create, Win32_Process.Create()) by analyzing Windows Event ID 4688 and Sysmon Event ID 1 for WmiPrvSE.exe spawning suspicious child processes like cmd.exe or powershell.exe, plus WMI-Activity/Operational events 5857/5860/5861 for subscription-based persistence. Use when hunting for remote code execution via WMI or investigating lateral mov
热度
- GitHub 星标
- 35k
- 排名
- #7960
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。