detecting-lateral-movement-with-splunk

使用针对 Windows 身份验证日志、SMB 流量和远程服务滥用的 Splunk SPL 查询,检测跨网络的攻击者横向移动。

9 stars

Best use case

detecting-lateral-movement-with-splunk is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

使用针对 Windows 身份验证日志、SMB 流量和远程服务滥用的 Splunk SPL 查询,检测跨网络的攻击者横向移动。

Teams using detecting-lateral-movement-with-splunk should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/detecting-lateral-movement-with-splunk/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/detecting-lateral-movement-with-splunk/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/detecting-lateral-movement-with-splunk/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How detecting-lateral-movement-with-splunk Compares

Feature / Agentdetecting-lateral-movement-with-splunkStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

使用针对 Windows 身份验证日志、SMB 流量和远程服务滥用的 Splunk SPL 查询,检测跨网络的攻击者横向移动。

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 使用 Splunk 检测横向移动

## 适用场景

- 狩猎攻击者在受攻击系统之间的移动时
- 检测凭据盗取后追踪后续横向活动时
- 调查网络中异常的身份验证模式时
- 事件响应期间确定攻击范围时
- 主动狩猎 TA0008(横向移动)技术时

## 前置条件

- Splunk Enterprise 或 Splunk Cloud,已接入 Windows 事件数据
- Windows 安全事件日志转发(4624、4625、4648、4672、4768、4769)
- 部署了用于进程创建和网络连接数据的 Sysmon
- 用于 SMB/RDP/WinRM 关联的网络流量数据或防火墙日志
- Active Directory 用户和组成员关系参考数据

## 工作流程

1. **定义横向移动范围**:识别要狩猎的横向移动技术(RDP、SMB/管理共享、WinRM、PsExec、WMI、DCOM、SSH)。
2. **查询身份验证事件**:使用 SPL 搜索整个环境中的类型 3(网络)和类型 10(远程交互)登录。
3. **构建身份验证图谱**:映射源到目标的身份验证关系,识别异常连接模式。
4. **检测首次关系**:识别历史基线中未见过的新源-目标对。
5. **与进程活动关联**:将身份验证事件与目标主机上的后续进程创建链接。
6. **识别异常模式**:标记横向移动到敏感服务器、异常时段、服务账户滥用或快速多主机访问。
7. **报告与遏制**:记录横向移动路径、受影响系统,并协调遏制响应。

## 核心概念

| 概念 | 描述 |
|------|------|
| T1021 | 远程服务(父技术) |
| T1021.001 | 远程桌面协议(RDP) |
| T1021.002 | SMB/Windows 管理共享 |
| T1021.003 | 分布式 COM(DCOM) |
| T1021.004 | SSH |
| T1021.006 | Windows 远程管理(WinRM) |
| T1570 | 横向工具传输 |
| T1047 | Windows 管理规范(WMI) |
| T1569.002 | 服务执行(PsExec) |
| 登录类型 3 | 网络登录(SMB、WinRM、映射驱动器) |
| 登录类型 10 | 远程交互(RDP) |
| 事件 ID 4624 | 成功登录 |
| 事件 ID 4648 | 显式凭据登录(runas、PsExec) |

## 工具与系统

| 工具 | 用途 |
|------|------|
| Splunk Enterprise | 日志聚合和 SPL 查询的 SIEM |
| Splunk Enterprise Security | 威胁检测和重要事件 |
| Windows Event Forwarding | 集中化 Windows 日志 |
| Sysmon | 详细的进程和网络遥测 |
| BloodHound | AD 攻击路径分析 |
| PingCastle | AD 安全评估 |

## 常见场景

1. **PsExec 横向移动**:攻击者使用 PsExec 通过 SMB 在远程系统上执行命令,生成类型 3 登录并伴随 ADMIN$ 共享访问。
2. **RDP 枢转**:攻击者使用盗取的凭据 RDP 到内部系统,创建类型 10 登录事件。
3. **WMI 远程执行**:攻击者使用 WMIC process call create 在远程主机上生成进程。
4. **WinRM PowerShell 远程**:攻击者使用 Enter-PSSession 或 Invoke-Command 在远程系统上执行代码。
5. **SMB 哈希传递(Pass-the-Hash)**:使用受攻击的 NTLM 哈希在不知道明文密码的情况下向远程系统进行身份验证。

## 输出格式

```
Hunt ID: TH-LATMOV-[DATE]-[SEQ]
Movement Type: [RDP/SMB/WinRM/WMI/DCOM/PsExec]
Source Host: [主机名/IP]
Destination Host: [主机名/IP]
Account Used: [用户名]
Logon Type: [3/10/其他]
First Seen: [时间戳]
Event Count: [事件数]
Risk Level: [Critical/High/Medium/Low]
Lateral Movement Path: [A -> B -> C -> D]
```

Related Skills

triaging-security-alerts-in-splunk

9
from killvxk/cybersecurity-skills-zh

在 Splunk Enterprise Security 中对安全告警进行分类,通过 SPL 查询和事件审查(Incident Review) 仪表板对重要事件进行严重性分类、调查、关联相关遥测并做出升级或关闭决策。 适用于 SOC 分析师需要处理关联搜索产生的告警队列、确定调查优先级, 或需要为交接给二/三级分析师记录分类决策时。

performing-lateral-movement-with-wmiexec

9
from killvxk/cybersecurity-skills-zh

在红队演练中,使用基于 WMI 的远程执行技术(包括 Impacket wmiexec.py、CrackMapExec 和原生 WMI 命令)在 Windows 网络中执行横向移动,实现隐蔽的后渗透操作。

performing-lateral-movement-detection

9
from killvxk/cybersecurity-skills-zh

检测横向移动(Lateral Movement)技术,包括哈希传递(Pass-the-Hash)、PsExec、WMI 执行、 RDP 转移和基于 SMB 的传播,使用 SIEM 关联 Windows 事件日志、网络流数据和终端遥测, 映射到 MITRE ATT&CK 横向移动战术(TA0008)技术。

hunting-for-lateral-movement-via-wmi

9
from killvxk/cybersecurity-skills-zh

通过分析 Windows 事件 ID 4688 进程创建和 Sysmon 事件 ID 1 中的 WmiPrvSE.exe 子进程模式、远程进程执行以及 WMI 事件订阅持久化,检测基于 WMI 的横向移动。

detecting-wmi-persistence

9
from killvxk/cybersecurity-skills-zh

通过分析 Sysmon 事件 ID 19、20 和 21 中的恶意 EventFilter、EventConsumer 和 FilterToConsumerBinding 创建,检测 WMI 事件订阅持久化。

detecting-t1548-abuse-elevation-control-mechanism

9
from killvxk/cybersecurity-skills-zh

通过监控注册表修改、进程提升标志和异常的父子进程关系,检测提升控制机制滥用,包括 UAC 绕过、sudo 利用和 setuid/setgid 操纵。

detecting-t1055-process-injection-with-sysmon

9
from killvxk/cybersecurity-skills-zh

通过分析 Sysmon 事件中的跨进程内存操作、远程线程创建和异常 DLL 加载模式,检测进程注入技术(T1055),包括经典 DLL 注入、进程镂空和 APC 注入。

detecting-t1003-credential-dumping-with-edr

9
from killvxk/cybersecurity-skills-zh

利用 EDR 遥测数据、Sysmon 进程访问监控和 Windows 安全事件关联,检测针对 LSASS 内存、SAM 数据库、NTDS.dit 和缓存凭据的 OS 凭据转储技术。

detecting-suspicious-powershell-execution

9
from killvxk/cybersecurity-skills-zh

检测可疑的 PowerShell 执行模式,包括编码命令、下载器(download cradles)、AMSI 绕过尝试以及受限语言模式规避。

detecting-suspicious-oauth-application-consent

9
from killvxk/cybersecurity-skills-zh

使用 Microsoft Graph API、审计日志和权限分析,检测 Azure AD / Microsoft Entra ID 中的高风险 OAuth 应用授权同意,识别非法同意授权攻击。

detecting-supply-chain-attacks-in-ci-cd

9
from killvxk/cybersecurity-skills-zh

扫描 GitHub Actions 工作流和 CI/CD 流水线配置,检测供应链攻击(Supply Chain Attack)向量, 包括未固定的 Action 版本、通过表达式的脚本注入、依赖混淆(Dependency Confusion)和密钥泄露。 使用 PyGithub 和 YAML 解析进行自动化审计。适用于加固 CI/CD 流水线或调查被攻击的构建系统。

detecting-stuxnet-style-attacks

9
from killvxk/cybersecurity-skills-zh

本技能涵盖检测遵循Stuxnet攻击模式的复杂网络物理攻击——在修改PLC逻辑的同时欺骗传感器读数以向操作员隐藏操控行为。内容涉及PLC逻辑完整性监控、基于物理的过程异常检测、工程师工作站入侵指标、USB传播攻击向量,以及从IT到OT横向移动直至过程操控的多阶段攻击链检测。