THREAT-EntraID-ExtortionLockout

Account Access Removal — Entra ID Mass Password Reset and Account Disablement for Extortion Lockout

Impact Last updated:

Ransomware and extortion crews that have escalated to Global Administrator or Privileged Authentication Administrator in Entra ID (Azure AD) frequently take a final step before or during encryption: locking legitimate defenders and end users out of the tenant so incident response is slowed and the negotiation position is strengthened. Observed patterns (Scattered Spider, Lapsus$, and multiple ransomware affiliates operating from compromised cloud-admin sessions) include scripted, back-to-back calls against a large number of distinct user objects in a short window — admin-initiated password resets (`Reset password (by admin)` / `Change user password`), account disablement (`Disable account`), and outright user deletion (`Delete user`) — usually from a single initiating identity or a small number of newly-elevated identities, often followed by revocation of the legitimate admins' own refresh tokens. This differs sharply from normal offboarding/HR-driven account changes, which are typically initiated by an HR-integration service principal or IT helpdesk staff against one or a handful of accounts per day, not dozens of distinct users within minutes from a single caller. Detection relies on Entra ID audit logs (the `AuditLogs` table in Microsoft Sentinel / Log Analytics, or the equivalent audit event stream ingested into other SIEMs), correlating a burst of these operations against a high count of distinct target users from the same initiating identity.

What is THREAT-EntraID-ExtortionLockout Entra ID Mass Password Reset and Account Disablement for Extortion Lockout?

Entra ID Mass Password Reset and Account Disablement for Extortion Lockout (THREAT-EntraID-ExtortionLockout) is a sub-technique of Account Access Removal (T1531) in the MITRE ATT&CK framework. It maps to the Impact tactic — the adversary is trying to manipulate, interrupt, or destroy your systems and data.

This page provides production-ready detection logic for Entra ID Mass Password Reset and Account Disablement for Extortion Lockout, covering the data sources and telemetry it touches: Microsoft Entra ID (Azure AD) Audit Logs, Microsoft Sentinel AuditLogs table (Azure AD diagnostic setting: AuditLogs category). The queries below are rated critical severity at high confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Impact
Microsoft Sentinel / Defender
kusto
// THREAT-EntraID-ExtortionLockout (T1531 Account Access Removal - Entra ID control plane)
let Lookback = 2h;
let BurstWindow = 15m;
let MinDistinctTargets = 5;
AuditLogs
| where TimeGenerated > ago(Lookback)
| where OperationName in ("Reset password (by admin)", "Change user password", "Disable account", "Delete user")
| where Result == "success"
| extend InitiatingUser = tostring(InitiatedBy.user.userPrincipalName)
| extend InitiatingApp = tostring(InitiatedBy.app.displayName)
| extend Initiator = iif(isnotempty(InitiatingUser), InitiatingUser, InitiatingApp)
| extend TargetUser = tostring(TargetResources[0].userPrincipalName)
| where isnotempty(TargetUser)
| summarize ActionCount = count(), DistinctTargets = dcount(TargetUser), Actions = make_set(OperationName), TargetSample = make_set(TargetUser, 15) by Initiator, bin(TimeGenerated, BurstWindow)
| where DistinctTargets >= MinDistinctTargets
| sort by DistinctTargets desc, TimeGenerated desc

Flags a single initiating identity (user or service principal) performing password resets, account disablement, and/or user deletion against 5 or more distinct target users within a 15-minute window, using Entra ID audit events forwarded to the AuditLogs table. Normal helpdesk password-reset volume is one user at a time in response to a ticket; extortion-driven lockout is scripted and hits many accounts almost simultaneously from the same caller. Combining the three operation types in one summarize also catches a mixed sequence (reset some accounts, disable others, delete a few) which a single-operation-type rule would miss.

critical severity high confidence

Data Sources

Microsoft Entra ID (Azure AD) Audit Logs Microsoft Sentinel AuditLogs table (Azure AD diagnostic setting: AuditLogs category)

Required Tables

AuditLogs

False Positives

  • HR-driven bulk offboarding events (e.g. a layoff or contractor batch expiration) run by an authorized IT automation/service principal against a known list of accounts on a scheduled date
  • Break-glass password reset campaigns following a confirmed credential-stuffing incident, where IT intentionally resets many accounts in a short window as a defensive measure
  • Identity governance / access-review workflows (e.g. Entra ID Lifecycle Workflows) that disable accounts in bulk based on an HR feed
  • Merger/acquisition tenant consolidation projects that deliberately disable or delete a batch of accounts from a decommissioned tenant

Sigma rule & cross-platform mapping

The detection logic for Entra ID Mass Password Reset and Account Disablement for Extortion Lockout (THREAT-EntraID-ExtortionLockout) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  product: azure

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Simulate Bulk Password Reset Against Test Accounts

    Expected signal: AuditLogs entries with OperationName='Reset password (by admin)' or 'Change user password', Result='success', InitiatedBy matching the test admin identity, and TargetResources[0].userPrincipalName matching each test account, all within a few minutes of each other.

  2. Test 2Simulate Bulk Account Disablement Against Test Accounts

    Expected signal: AuditLogs entries with OperationName='Disable account', Result='success', for each of the five test accounts within a short window.

  3. Test 3Simulate Privilege Activation Immediately Followed by Lockout Actions

    Expected signal: AuditLogs entries for 'Add member to role' (or 'Add eligible member to role') for the test admin identity, followed within minutes by a 'Disable account' entry initiated by that same identity.


Response Playbook

Triage

  1. Identify the initiating identity (InitiatedBy.user.userPrincipalName or InitiatedBy.app.displayName in AuditLogs) — is this a known helpdesk account, an HR/IT automation service principal, or an identity that was itself only recently granted admin rights?
  2. Check whether the initiating identity's own privileged role assignment (Global Administrator, Privileged Authentication Administrator, User Administrator) was granted in the hours immediately before the lockout burst — a freshly-elevated identity performing mass lockouts within minutes of elevation is a strong compromise indicator
  3. Enumerate every target user affected and check for overlap with your incident-response team, break-glass accounts, and Global Administrators specifically — attackers frequently target defenders' own accounts first to blind detection and response
  4. Confirm whether the operations correlate with an open, ticketed offboarding/HR batch — cross-reference against your ITSM/HR system for a matching authorized change
  5. Check sign-in logs for the initiating identity for anomalous authentication immediately prior (impossible travel, new device, legacy/basic-auth protocol, or a token replay pattern) to establish whether the identity itself is compromised versus insider misuse
  6. Determine whether refresh token revocation (`Revoke user's refresh token` / `Force sign-out`) was performed against the same target set — a combined reset+disable+revoke sequence maximizes lockout speed and is characteristic of a scripted attack rather than manual admin action

Containment

  1. Immediately suspend or disable the initiating identity's credentials and any active sessions/refresh tokens, using an independent break-glass admin account that was NOT part of the affected target set
  2. Do not use a password-reset flow tied to the same identity provider path the attacker used (e.g. self-service password reset via a compromised phone number) — use the tenant's documented emergency access (break-glass) account procedure
  3. Review and, where necessary, revoke Conditional Access policy changes and any new federated identity provider / trust relationship added around the same time — attackers sometimes add a secondary IdP or relax Conditional Access as a persistence mechanism before locking everyone else out
  4. Restore access for legitimate locked-out users via the break-glass account: re-enable disabled accounts, issue new temporary passwords through an out-of-band verified channel (not self-service), and re-register MFA where security info was also removed
  5. Rotate credentials and review role assignments for every identity that held privileged roles in the tenant, since the attacker's foothold used to perform the lockout likely retains other capabilities
  6. Engage Microsoft support / Entra ID recovery procedures immediately if Global Administrator access itself has been lost tenant-wide

Evidence Collection

  1. Full AuditLogs records for every Reset password / Change user password / Disable account / Delete user / Revoke refresh token operation in the incident window, including the complete InitiatedBy and TargetResources JSON blocks
  2. SigninLogs / AADNonInteractiveUserSignInLogs for the initiating identity covering the 48-72 hours preceding the lockout burst
  3. Entra ID role assignment history (PIM activation logs if Privileged Identity Management is in use) showing when and how the initiating identity obtained its privileged role
  4. Conditional Access policy change history and any newly added federated domain / identity provider trust configuration
  5. A complete list of affected target users with timestamps, for both incident scoping and end-user communication/recovery planning

Escalation Criteria

  • ! 5 or more distinct user accounts reset, disabled, or deleted by the same initiating identity within a 15-minute window with no matching change ticket
  • ! The initiating identity's privileged role was granted within hours of performing the lockout burst
  • ! Incident-response team members, break-glass accounts, or Global Administrators are among the affected targets
  • ! The lockout burst is observed in the same operational window as other TA0040 indicators (T1486 encryption, T1490 backup/recovery deletion — see THREAT-CloudBackup-SnapshotPurge and THREAT-ESXi-HypervisorRansomware)
  • ! Tenant-wide Global Administrator access has been lost and Microsoft support engagement is required to regain control

Investigation Guide

Forensic Artifacts

  • > AuditLogs entries for Reset password (by admin), Change user password, Disable account, Delete user, and Revoke user's refresh token operations, with full InitiatedBy and TargetResources JSON
  • > PIM (Privileged Identity Management) activation and role-assignment audit history for the initiating identity
  • > SigninLogs / AADNonInteractiveUserSignInLogs for the initiating identity's authentication events in the preceding 48-72 hours
  • > Conditional Access policy change audit entries (Update conditional access policy, Add exclusion) around the incident window
  • > Federation/identity-provider trust configuration change history (Add federated domain, Update federation settings)

Tuning Guidance

Build and maintain an allowlist of known HR/IT-automation service principal object IDs that legitimately perform bulk offboarding on a schedule, and exclude them by identity rather than by operation name, since the operation names themselves are identical between legitimate offboarding and malicious lockout. Tune the MinDistinctTargets threshold down (e.g. to 3) in smaller tenants where a burst of 5 would rarely occur even maliciously, and up in large enterprises with a busy central helpdesk to avoid alert fatigue — validate against your own 30-day baseline using the first hunting query before deploying to production. Treat the role-activation-then-lockout sequence (second hunting query) as materially higher severity than the base detection alone, since it isolates the pattern with the fewest legitimate explanations. Always correlate a firing alert against the same-window backup-deletion (THREAT-CloudBackup-SnapshotPurge) and hypervisor/endpoint (THREAT-ESXi-HypervisorRansomware) detections — extortion actors frequently execute recovery-denial, lockout, and encryption within the same short campaign window.


Hunting Queries

30-day baseline hunt to distinguish routine helpdesk/HR-automation callers (steady, low daily volume, usually a recognized service principal) from bursty or first-time high-volume callers, which are the higher-suspicion population worth reviewing individually.

Hunting — KQL
kql
// Hunt: initiating identities performing account-lockout-class operations against 3+ distinct users over the last 30 days, to baseline normal helpdesk/HR volume vs anomalous callers
AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName in ("Reset password (by admin)", "Change user password", "Disable account", "Delete user")
| where Result == "success"
| extend Initiator = coalesce(tostring(InitiatedBy.user.userPrincipalName), tostring(InitiatedBy.app.displayName))
| extend TargetUser = tostring(TargetResources[0].userPrincipalName)
| summarize DistinctTargets = dcount(TargetUser), TotalActions = count(), ActiveDays = dcount(bin(TimeGenerated, 1d)) by Initiator
| where DistinctTargets >= 3
| order by DistinctTargets desc
Hunting — SPL
spl
index=azuread sourcetype="mscs:azure:aad" (operationName="Reset password (by admin)" OR operationName="Change user password" OR operationName="Disable account" OR operationName="Delete user") result="success"
| eval Initiator=coalesce('initiatedBy.user.userPrincipalName', 'initiatedBy.app.displayName')
| eval TargetUser=mvindex('targetResources{}.userPrincipalName', 0)
| stats dc(TargetUser) as DistinctTargets, count as TotalActions by Initiator
| where DistinctTargets >= 3
| sort - DistinctTargets

Hunts for the specific sequence of privilege escalation followed quickly by mass account-lockout activity from the same newly-elevated identity — this ordering is a much stronger compromise signal than either event alone, since legitimate admins rarely perform bulk lockouts within an hour of their own role activation.

Hunting — KQL
kql
// Hunt: privileged role activations followed within 1 hour by an account-lockout-class operation from the same identity
let RoleActivations = AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName has_any ("Add member to role", "Add eligible member to role")
| extend ActivatedUser = tostring(TargetResources[0].userPrincipalName)
| project ActivationTime = TimeGenerated, ActivatedUser;
AuditLogs
| where TimeGenerated > ago(30d)
| where OperationName in ("Reset password (by admin)", "Change user password", "Disable account", "Delete user")
| extend Initiator = tostring(InitiatedBy.user.userPrincipalName)
| join kind=inner (RoleActivations) on $left.Initiator == $right.ActivatedUser
| where TimeGenerated - ActivationTime between (0min .. 60min)
| project TimeGenerated, Initiator, ActivationTime, OperationName
Hunting — SPL
spl
| tstats count where index=azuread sourcetype="mscs:azure:aad" (operationName="Add member to role" OR operationName="Add eligible member to role") by _time, targetResources{}.userPrincipalName
| rename targetResources{}.userPrincipalName as ActivatedUser
| join type=inner ActivatedUser [ search index=azuread sourcetype="mscs:azure:aad" (operationName="Reset password (by admin)" OR operationName="Change user password" OR operationName="Disable account" OR operationName="Delete user") | eval ActivatedUser='initiatedBy.user.userPrincipalName' ]
| where (_time - _time) <= 3600

Atomic Red Team Tests

Test 1 Simulate Bulk Password Reset Against Test Accounts
linux

Performs admin password resets against several disposable test user accounts in rapid succession, simulating the lockout burst pattern. Use only synthetic test accounts created specifically for this exercise, never real user or service accounts.

Command

bash
for UPN in [email protected] [email protected] [email protected] [email protected] [email protected]; do az ad user update --id "$UPN" --password "TempAtomicTest!$(date +%s)" --force-change-password-next-sign-in true; done

Cleanup

bash
Have each test account owner (or an admin) complete a normal self-service password reset to restore a known-good credential state, or delete the disposable test accounts entirely if they were created solely for this exercise.

Expected Telemetry

AuditLogs entries with OperationName='Reset password (by admin)' or 'Change user password', Result='success', InitiatedBy matching the test admin identity, and TargetResources[0].userPrincipalName matching each test account, all within a few minutes of each other.

Expected Detection

Fires once DistinctTargets >= 5 for the same Initiator within the 15-minute BurstWindow.

Test 2 Simulate Bulk Account Disablement Against Test Accounts
linux

Disables several disposable test user accounts in rapid succession, simulating the account-disablement variant of the lockout pattern. Use only synthetic test accounts.

Command

bash
for UPN in [email protected] [email protected] [email protected] [email protected] [email protected]; do az ad user update --id "$UPN" --account-enabled false; done

Cleanup

bash
for UPN in [email protected] [email protected] [email protected] [email protected] [email protected]; do az ad user update --id "$UPN" --account-enabled true; done

Expected Telemetry

AuditLogs entries with OperationName='Disable account', Result='success', for each of the five test accounts within a short window.

Expected Detection

Fires once DistinctTargets >= 5 for the same Initiator within the 15-minute BurstWindow, combined with any prior Reset password events against the same or overlapping target set in that window.

Test 3 Simulate Privilege Activation Immediately Followed by Lockout Actions
linux

Activates a privileged role assignment (via PIM or direct role assignment in a test/lab tenant) for a test admin identity, then immediately performs lockout actions against test accounts from that identity, replicating the highest-confidence attacker sequence. Run only in a lab or sandbox tenant.

Command

bash
az rest --method post --uri 'https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments' --body '{"principalId":"<TEST_ADMIN_OBJECT_ID>","roleDefinitionId":"<USER_ADMINISTRATOR_ROLE_TEMPLATE_ID>","directoryScopeId":"/"}' && az ad user update --id [email protected] --account-enabled false

Cleanup

bash
Remove the test role assignment created above via the Graph API roleAssignments DELETE endpoint, and re-enable the test account.

Expected Telemetry

AuditLogs entries for 'Add member to role' (or 'Add eligible member to role') for the test admin identity, followed within minutes by a 'Disable account' entry initiated by that same identity.

Expected Detection

The second hunting query (role-activation-then-lockout sequence) returns a match joining the two events for the same Initiator within the 60-minute correlation window.

Related Detections

Tactic Hub