Skip to content
Skillpedia
Agents35k · #5638

detecting-azure-lateral-movement

Lets your agent detect suspicious movements within the Azure cloud environment. It identifies unauthorized access attempts.

What it does

This tool helps find suspicious activities within your Microsoft Azure accounts and applications. It looks for ways attackers move between different parts of your system unnoticed, like stealing credentials or permissions.

When to use it

  • ✓When you suspect an intrusion into your Azure accounts.
  • ✓When building alert systems to detect attacks.
  • ✓To check if your security protects against specific attack methods.

Example of what to ask your AI

“Look for unusual activities in my Azure accounts that might indicate an attack.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-azure-lateral-movement/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-azure-lateral-movement/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool analyzes activity logs, such as who accessed what and when, and cross-references this information with security alerts. It searches for patterns that attackers commonly use to move within the system.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill detecting-azure-lateral-movement

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/detecting-azure-lateral-movement/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Detecting Azure Lateral Movement

Overview

Lateral movement in Azure AD/Entra ID differs from on-premises environments. Attackers pivot through OAuth application consent grants, service principal abuse, cross-tenant access policies, and stolen refresh tokens rather than SMB/RDP connections. Detection requires correlating Microsoft Graph API audit logs, Azure AD sign-in logs, and Entra ID protection risk events using KQL queries in Microsoft Sentinel. This skill covers building detection analytics for common Azure lateral movement techniques including application impersonation, mailbox delegation abuse, and conditional access policy bypasses.

When to Use

  • When investigating security incidents that require detecting azure lateral movement
  • 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

  • Azure subscription with Microsoft Sentinel workspace configured
  • Azure AD P2 or Entra ID P2 license for risk-based sign-in detection
  • Microsoft Graph API permissions: AuditLog.Read.All, Directory.Read.All, SecurityEvents.Read.All
  • Log Analytics workspace ingesting AuditLogs, SigninLogs, and AADServicePrincipalSignInLogs
  • Familiarity with KQL (Kusto Query Language)

Steps

Step 1: Configure Log Ingestion

Enable diagnostic settings to stream Azure AD logs to Log Analytics:

  • Sign-in logs (interactive and non-interactive)
  • Audit logs (directory changes, app consent)
  • Service principal sign-in logs
  • Provisioning logs
  • Risky users and risk detections

Step 2: Build Detection Queries

Create KQL analytics rules in Sentinel for:

  • Unusual service principal credential additions
  • OAuth application consent grants to unknown apps
  • Cross-tenant sign-ins from new tenants
  • Token replay from different IP/user-agent combinations
  • Mailbox delegation changes (FullAccess, SendAs)

Step 3: Correlate Events

Chain multiple low-confidence indicators into high-confidence lateral movement detections by correlating sign-in anomalies with directory changes within time windows.

Step 4: Automate Response

Create Sentinel playbooks (Logic Apps) to automatically revoke suspicious OAuth grants, disable compromised service principals, and enforce step-up authentication.

Expected Output

JSON report containing detected lateral movement indicators, correlated event chains, affected identities, and recommended containment actions with MITRE ATT&CK technique mappings.

FAQ

What is 'lateral movement'?

It's when an attacker has already gained access to your system and is trying to move to other parts, like accessing other accounts or applications, to cause more damage or steal information.

What are 'audit logs'?

These are detailed records of all important actions that happened in your system, like who did what, when, and to which resource.

Do I need to be an Azure expert to use this?

Some familiarity is helpful, but the tool is designed to help identify issues even if you're not an expert. It focuses on spotting suspicious activities.

Details

Original description by the author

Detect lateral movement in Azure AD/Entra ID environments using Microsoft Graph API audit logs, Azure Sentinel KQL hunting queries, and sign-in anomaly correlation to identify privilege escalation, token theft, and cross-tenant pivoting.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#5638
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills