detecting-azure-lateral-movement

使用 Microsoft Graph API 审计日志、Azure Sentinel KQL 狩猎查询和登录异常关联,检测 Azure AD/Entra ID 环境中的横向移动,以识别权限提升、令牌窃取和跨租户转移。

9 stars

Best use case

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

使用 Microsoft Graph API 审计日志、Azure Sentinel KQL 狩猎查询和登录异常关联,检测 Azure AD/Entra ID 环境中的横向移动,以识别权限提升、令牌窃取和跨租户转移。

Teams using detecting-azure-lateral-movement 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-azure-lateral-movement/SKILL.md --create-dirs "https://raw.githubusercontent.com/killvxk/cybersecurity-skills-zh/main/skills/detecting-azure-lateral-movement/SKILL.md"

Manual Installation

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

How detecting-azure-lateral-movement Compares

Feature / Agentdetecting-azure-lateral-movementStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

使用 Microsoft Graph API 审计日志、Azure Sentinel KQL 狩猎查询和登录异常关联,检测 Azure AD/Entra ID 环境中的横向移动,以识别权限提升、令牌窃取和跨租户转移。

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

# 检测 Azure 横向移动

## 概述

Azure AD/Entra ID 中的横向移动与本地环境不同。攻击者通过 OAuth 应用程序同意授权、服务主体滥用、跨租户访问策略和被盗刷新令牌进行枢转,而不是 SMB/RDP 连接。检测需要使用 Microsoft Sentinel 中的 KQL 查询关联 Microsoft Graph API 审计日志、Azure AD 登录日志和 Entra ID 保护风险事件。本 skill 涵盖为常见 Azure 横向移动技术构建检测分析,包括应用程序模拟、邮箱委派滥用和条件访问策略绕过。

## 前置条件

- 配置了 Microsoft Sentinel 工作区的 Azure 订阅
- 用于基于风险的登录检测的 Azure AD P2 或 Entra ID P2 许可证
- Microsoft Graph API 权限:AuditLog.Read.All、Directory.Read.All、SecurityEvents.Read.All
- 摄入 AuditLogs、SigninLogs 和 AADServicePrincipalSignInLogs 的 Log Analytics 工作区
- 熟悉 KQL(Kusto Query Language)

## 工作流程

### 步骤 1:配置日志摄入

启用诊断设置,将 Azure AD 日志流式传输到 Log Analytics:
- 登录日志(交互式和非交互式)
- 审计日志(目录更改、应用同意)
- 服务主体登录日志
- 预配日志
- 风险用户和风险检测

### 步骤 2:构建检测查询

在 Sentinel 中创建 KQL 分析规则,用于:
- 不寻常的服务主体凭据添加
- 向未知应用程序授予 OAuth 应用程序同意
- 来自新租户的跨租户登录
- 来自不同 IP/用户代理组合的令牌重放
- 邮箱委派更改(FullAccess、SendAs)

### 步骤 3:关联事件

通过在时间窗口内将登录异常与目录更改相关联,将多个低置信度指标链接为高置信度横向移动检测。

### 步骤 4:自动化响应

创建 Sentinel 手册(Logic Apps),自动撤销可疑的 OAuth 授权、禁用被入侵的服务主体并强制执行升级身份验证。

## 输出格式

JSON 报告,包含检测到的横向移动指标、关联的事件链、受影响的身份以及带 MITRE ATT&CK 技术映射的建议遏制操作。

Related Skills

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)技术。

implementing-privileged-identity-management-with-azure

9
from killvxk/cybersecurity-skills-zh

使用 Microsoft Graph API 配置 Azure AD 特权身份管理(PIM),管理符合条件的角色分配、即时激活、访问审查,以及用于零信任特权访问的角色管理策略。

implementing-conditional-access-policies-azure-ad

9
from killvxk/cybersecurity-skills-zh

为零信任访问控制配置 Microsoft Entra ID(Azure AD)条件访问策略,涵盖基于信号的策略设计、设备合规要求、基于风险的认证、命名位置、会话控制以及与 NIST SP 1800-35 零信任架构的集成。

implementing-azure-defender-for-cloud

9
from killvxk/cybersecurity-skills-zh

实施 Microsoft Defender for Cloud,为虚拟机、容器、数据库和存储启用云安全态势管理和工作负载保护,配置安全建议,并通过自动修复设置自适应安全控制。

implementing-azure-ad-privileged-identity-management

9
from killvxk/cybersecurity-skills-zh

配置 Microsoft Entra 特权身份管理(PIM)以强制执行即时角色激活(Just-in-Time)、审批工作流和 Azure AD 特权角色的访问审查。

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 绕过尝试以及受限语言模式规避。