How the attack works
A management lock protects an Azure subscription, a resource group or a resource against deletion (CanNotDelete) or against deletion and modification (ReadOnly). Microsoft states that the lock overrides any user permissions, and that a lock on a parent scope is inherited by every resource in it. A lock therefore stops even an Owner from deleting the resource, until the lock itself is deleted. Deleting a lock is the operation Microsoft.Authorization/locks/delete, which Microsoft documents as available to the Owner and User Access Administrator roles and to roles with the Microsoft.Authorization/locks/* actions.
For an attacker who already holds those rights, a lock is a delay and not a barrier. Microsoft's report on Storm-0501 describes this order of events: the actor's mass deletion of storage accounts and backups failed on some resources because of resource locks and immutability policies, so the actor deleted the locks and the policies and went on deleting. The deletion of a lock is a control-plane request recorded in the Azure Activity log with its caller, and it is worth a review every time.
What an attacker needs
Microsoft.Authorization/locks/deleteat the scope of the lock, which Owner and User Access Administrator have. Contributor does not have it.- A lock that the organization applied itself. The locked infrastructure resource group of a managed application, such as Azure Databricks, is a different case, which Microsoft documents as deletable only indirectly through the service.
Impact
Nothing is destroyed by the deletion itself. The locked scope loses its protection, and whatever the caller's role allows becomes possible again: deleting storage accounts, key vaults, backup vaults, databases or whole resource groups, or changing resources that were read-only. Because a lock on a parent scope is inherited, one deleted lock on a resource group or a subscription unprotects everything below it.
Detection rules
Azure Resource Lock Deleted
Detects a successful deletion of an Azure management lock (Microsoft.Authorization/locks/delete) on a subscription, a resource group or a resource. A CanNotDelete or ReadOnly lock overrides user permissions, so its removal is the step that makes the locked resources deletable or changeable again. Microsoft's report on Storm-0501 describes the actor removing resource locks with this operation after deletions had failed. The Activity log event names the lock and its scope in the resource ID, but not the lock level.
title: Azure Resource Lock Deleted
id: 8ac88c68-696a-4766-ace2-818008aed1d2
status: experimental
description: >-
Detects a successful deletion of an Azure management lock
(Microsoft.Authorization/locks/delete) on a subscription, a resource group
or a resource. A CanNotDelete or ReadOnly lock overrides user permissions,
so its removal is the step that makes the locked resources deletable or
changeable again. Microsoft's report on Storm-0501 describes the actor
removing resource locks with this operation after deletions had failed. The
Activity log event names the lock and its scope in the resource ID, but not
the lock level.
references:
- https://attack.mitre.org/techniques/T1685/
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources
- https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/management-and-governance
- https://www.microsoft.com/en-us/security/blog/2025/08/27/storm-0501s-evolving-techniques-lead-to-cloud-based-ransomware/
author: Forestall
date: 2026-11-18
tags:
- attack.defense-impairment
- attack.t1685
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue: MICROSOFT.AUTHORIZATION/LOCKS/DELETE
ActivityStatusValue:
- Success
- Succeeded
condition: selection
falsepositives:
- Planned decommissioning, where the lock is removed before the resource is deleted, and maintenance that needs a ReadOnly lock lifted for a change. Correlate with change records.
- Infrastructure-as-code pipelines that remove and recreate locks during a deployment. Exclude their identities in a filter_ selection by Caller once confirmed.
level: medium
False positives
- Planned decommissioning, where the lock is removed before the resource is deleted, and maintenance that needs a ReadOnly lock lifted for a change. Correlate with change records.
- Infrastructure-as-code pipelines that remove and recreate locks during a deployment. Exclude their identities in a filter_ selection by Caller once confirmed.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Resource lock deleted, then resources in its scope deleted by the same caller
A lock is removed for a reason, and the reason shows in what happens next. A caller that deletes a lock and then deletes resources in the scope the lock covered is the order of events Microsoft describes for Storm-0501. Deleted storage accounts, vaults, snapshots or backup items after the lock removal make it urgent.
- In the Azure Activity log, find a successful
MICROSOFT.AUTHORIZATION/LOCKS/DELETE. Keep theCallerand the scope, which is the part of the resource ID before/providers/Microsoft.Authorization/locks/. - Within 24 hours, take the events of the same
CallerwhoseOperationNameValueends with/DELETE, with status Success and a resource ID under that scope. - Raise the priority when the deleted resources are storage accounts, key vaults, recovery services vaults, snapshots or restore point collections, or when their number is high.
EventsMICROSOFT.AUTHORIZATION/LOCKS/DELETE
LimitsA planned decommissioning is exactly this sequence, so the result has to be matched with change records. The 24 hours are a starting point. Deletions made with another identity, or through the data plane of a service, are not linked by this logic.
Delete operations fail, then the same caller deletes a lock
An attacker usually learns about a lock from a failed delete. Failed delete operations in a scope, followed by the removal of a lock on that scope by the same caller, show somebody removing the obstacle they just ran into, before any resource is gone.
- In the Azure Activity log, take the events whose
OperationNameValueends with/DELETEand whose status is Failure (Failed in the REST schema). Keep theCallerand the resource ID. - Within 60 minutes the same
CallerrunsMICROSOFT.AUTHORIZATION/LOCKS/DELETEwith status Success on that resource or on a parent scope of it. - Read the sub-status and the properties of the failed events to confirm that the lock was the reason for the failure.
EventsMICROSOFT.AUTHORIZATION/LOCKS/DELETE
LimitsAn administrator who forgot about a lock produces the same two events during a planned deletion. Delete requests fail for other reasons as well, such as dependencies between resources. The 60 minutes are a starting point.
Triage
- Identify the Caller, the caller's IP address and the scope of the lock from the resource ID, and check for a change request that covers the removal.
- Find out what the lock protected. A lock on a resource group or subscription covered every resource in it.
- Look for failed delete operations by the same caller in the scope before the lock was deleted, and for delete operations by the caller after it.
- Check how the caller holds Owner or User Access Administrator, and whether that role was assigned or activated shortly before.
Response
Once the attack is confirmed:
- Put the lock back on the scope at once, and on the neighbouring scopes the caller could reach.
- Contain the caller. Revoke its sessions, rotate its credentials and remove its Owner or User Access Administrator assignments.
- List what was deleted or changed in the scope after the lock was removed, and recover what can be recovered, such as soft-deleted key vaults, storage accounts and backup items, before their retention ends.
- Review how the caller obtained the role, and remove role assignments it created for other identities.
- Add a second protection to the resources the lock guarded, such as immutability, soft delete or backup in another scope.
Mitigation
- Limit Owner and User Access Administrator, assign them through Privileged Identity Management with approval, and give operators custom roles without the
Microsoft.Authorization/locks/*actions. - Do not rely on locks alone for data that must survive an administrator-level compromise. Add protections that have their own safeguards, such as locked immutability policies on blob containers, soft delete and purge protection on key vaults, and soft delete on backup vaults.
- Consider an Azure Policy definition with the
denyActioneffect for critical resource types, which blocks delete requests at scale. Changing it is a policy operation with its own Activity log record. - Create an Activity log alert on
Microsoft.Authorization/locks/deleteand send the Activity log to your SIEM.
Frequently asked questions
Does a resource lock stop an attacker who has the Owner role?
Only until the attacker deletes the lock. Microsoft documents that a lock overrides any user permissions, so a delete request fails while the lock exists. The same documentation states that the Owner and User Access Administrator roles can delete locks. The value of the lock against such an attacker is the extra step it forces, which this rule detects.
Does the event tell us what the lock protected?
It names the lock and its scope in the resource ID, so you know whether it was on a subscription, a resource group or a single resource. It does not carry the lock level, CanNotDelete or ReadOnly, or the notes of the lock. Keep an inventory of locks, for example from infrastructure-as-code, to see what was removed.
Do locks protect the data inside a storage account or a database?
Not against data-plane requests. Microsoft states that locks only apply to control plane operations. A lock on a storage account keeps the account from being deleted through Azure Resource Manager, but it does not protect blobs or files against requests to the storage service itself. Data needs its own protection, such as immutability policies, soft delete and backups.
References
- MITRE ATT&CK T1685: Disable or Modify Tools
- Lock your Azure resources to protect your infrastructure
- Azure permissions for Management and governance
- Azure Policy definitions: denyAction effect
- Azure Activity Log event schema
- Microsoft Security Blog: Storm-0501's evolving techniques lead to cloud-based ransomware