security analyst security skill risk: medium
Azure AD Lateral Movement KQL Detector
Provides steps to configure Azure AD log ingestion, build KQL detection queries for techniques like OAuth consent abuse and service principal misuse, correlate events in Microsoft…
- External action: low
SKILL 4 files · 2 folders
SKILL.md
--- name: detecting-azure-lateral-movement description: "Detect lateral movement in Azure AD/Entra ID environments using Microsoft Graph API audit logs, Azure Sentinel" --- # 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.
REQUIRED CONTEXT
- Azure subscription with Microsoft Sentinel workspace
- Azure AD P2 or Entra ID P2 license
- Microsoft Graph API permissions
- Log Analytics workspace ingesting AuditLogs/SigninLogs/AADServicePrincipalSignInLogs
- KQL familiarity
EXPECTED OUTPUT
- Format
- json
- Schema
- json_schema · detected lateral movement indicators, correlated event chains, affected identities, recommended containment actions, MITRE ATT&CK technique mappings
- Constraints
- include detected indicators
- include correlated event chains
- include affected identities
- include containment actions
- include MITRE ATT&CK mappings
SUCCESS CRITERIA
- Detect lateral movement indicators
- Correlate sign-in anomalies with directory changes
- Map to MITRE ATT&CK techniques
- Recommend containment actions
CAVEATS
- Dependencies
- 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)
QUALITY
- OVERALL
- 0.78
- CLARITY
- 0.90
- SPECIFICITY
- 0.75
- REUSABILITY
- 0.65
- COMPLETENESS
- 0.80
IMPROVEMENT SUGGESTIONS
- Add concrete KQL query examples under Step 2 to increase actionability
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR SECURITY ANALYST
- Ransomware Network Indicators Analyzersecurity analystsecurity
- APT TTP Mapping with MITRE Navigatorsecurity analystsecurity
- Linux Persistence Mechanisms Analyzersecurity analystsecurity
- Kerberos Golden Ticket Forgery Detectorsecurity analystsecurity
- LOLBAS Abuse Detection with Sigma Rulessecurity analystsecurity
- Shadow IT Cloud Usage Detectorsecurity analystsecurity
- Registry Run Key Persistence Detection Guidesecurity analystsecurity
- Detect Risky OAuth Consent Grants in Entra IDsecurity analystsecurity
- Windows Service Installation Threat Huntersecurity analystsecurity
- Web Server Log Intrusion Analyzersecurity analystsecurity
- RDP Brute Force Event Log Analyzersecurity analystsecurity
- Rekall Memory Forensics Artifact Extractorsecurity analystsecurity
- Azure Activity Logs Threat Analyzersecurity analystsecurity
- Scapy Network Packet Analysis Guidesecurity analystsecurity
- TLS Certificate Transparency Log Analyzersecurity analystsecurity
- Cobalt Strike Malleable C2 Profile Analyzersecurity analystsecurity
- Email Account Compromise Detection Proceduressecurity analystsecurity
- Credential Stuffing Auth Log Analyzersecurity analystsecurity
- MISP Threat Intelligence Sharing with PyMISPsecurity analystsecurity
- MISP Threat Landscape Analysis Guidesecurity analystsecurity
- Malicious Scheduled Task Sysmon Detectorsecurity analystsecurity
- Kerberos Pass-the-Ticket Attack Detectorsecurity analystsecurity
- NTLM Relay Attack Event Log Analyzersecurity analystsecurity
- Linux Memory Forensics with LiME and Volatilitysecurity analystsecurity
- Insider Data Exfiltration DLP Analyzersecurity analystsecurity