PIVTR-D
RAzure playbook · Data and storage

Data deletion, ransomware and key destruction

An attacker with Owner or Contributor rights removes resource locks, turns off blob soft delete, deletes or overwrites blobs, and deletes snapshots, disks, backup items and Key Vault keys. Where purge protection is off, the attacker purges the soft-deleted keys and vaults, and data encrypted with those keys becomes unreadable. Stop the caller and turn soft delete and purge protection back on first, then recover keys before the data they unlock.

Look here

LogSearch for
AzureActivity, storage and disksLock removal, soft delete and lifecycle changes, and deletes of storage, disks and snapshots. blobServices/write carries the soft delete and versioning settings: AzureActivity | where OperationNameValue in~ ("Microsoft.Authorization/locks/delete", "Microsoft.Storage/storageAccounts/blobServices/write", "Microsoft.Storage/storageAccounts/managementPolicies/write", "Microsoft.Storage/storageAccounts/blobServices/containers/delete", "Microsoft.Storage/storageAccounts/delete", "Microsoft.Compute/disks/delete", "Microsoft.Compute/snapshots/delete") | project TimeGenerated, Caller, CallerIpAddress, OperationNameValue, _ResourceId
AzureActivity, backup and keysBackup setting changes, deleted backup items and Resource Guard links, and vault deletes and purges. Case varies in these names, so match them without case: AzureActivity | where OperationNameValue in~ ("Microsoft.RecoveryServices/Vaults/backupconfig/write", "Microsoft.RecoveryServices/Vaults/backupFabrics/protectionContainers/protectedItems/delete", "Microsoft.RecoveryServices/Vaults/backupResourceGuardProxies/delete", "Microsoft.DataProtection/backupVaults/backupInstances/delete", "Microsoft.KeyVault/vaults/delete", "Microsoft.KeyVault/locations/deletedVaults/purge/action") | project TimeGenerated, Caller, CallerIpAddress, OperationNameValue, _ResourceId
StorageBlobLogsBlob deletes and overwrites by caller. Needs the StorageDelete and StorageWrite categories: StorageBlobLogs | where OperationName in ("DeleteBlob", "DeleteContainer", "PutBlob", "PutBlockList", "CopyBlob", "SetBlobServiceProperties") | summarize count() by OperationName, CallerIpAddress, AuthenticationType, RequesterObjectId, bin(TimeGenerated, 5m)
AzureDiagnostics, category AuditEvent (Key Vault)Key, secret and certificate deletes and purges. Needs a diagnostic setting on each vault: AzureDiagnostics | where Category == "AuditEvent" and OperationName has_any ("Delete", "Purge") | project TimeGenerated, Resource, OperationName, CallerIPAddress, ResultSignature, id_s
AddonAzureBackupJobs, CoreAzureBackupStopped protection and deleted items in the window, from the Recovery Services vault diagnostic settings
Azure Backup security alertsSeverity 0 alerts in Azure Monitor for deleting backup data, disabling soft delete, shortening retention and disabling multi-user authorization. They are on by default and cannot be turned off
Backup management serversRun Command on backup management server VMs, and sign-ins by their administrator accounts in the window. The Run Command operation is: Microsoft.Compute/virtualMachines/runCommand/action
SecurityAlertDefender deletion and recovery alerts: Storage.Blob_DeletionAnomaly, Storage.Files_DeletionAnomaly, ARM_AnomalousOperation.Impact, Arm_Suspicious_Vault_Recovering, and on Windows VMs the alert Suspicious Volume Shadow Copy Activity, which the reference lists without an alert type

Contain

#Item
1Remove the caller's roles and disable the identity, using service principal credential leak or account takeover. Check for Owner or User Access Administrator, which can delete locks
2Record the storage account's soft delete settings: az storage account blob-service-properties show --account-name <account> --resource-group <rg>
3Restore blob soft delete, container soft delete and versioning before more deletes: az storage account blob-service-properties update --account-name <account> --resource-group <rg> --enable-delete-retention true --delete-retention-days 30 --enable-container-delete-retention true --container-delete-retention-days 30 --enable-versioning true
4Lock storage accounts, vaults and key vaults: az lock create --name ir-nodelete --lock-type CanNotDelete --resource-group <rg> --resource <name> --resource-type <type>
5Turn on purge protection irreversible on every key vault that stores encryption keys: az keyvault update --name <vault> --resource-group <rg> --enable-purge-protection true
6Check the Recovery Services vault settings. Secure by default enforces soft delete on Recovery Services vaults, and Backup vaults in most regions still let an admin turn it off: az backup vault backup-properties show --name <vault> --resource-group <rg>
7Where soft delete is off, turn it back on: az backup vault backup-properties set --name <vault> --resource-group <rg> --soft-delete-feature-state Enable --soft-delete-duration 30
8Snapshot the surviving disks of affected VMs now, as in the first 15 minutes, and tag them with the case number

Eradicate and recover

#Item
1List deleted key vaults first, because storage and disks encrypted with their keys depend on them: az keyvault list-deleted --resource-type vault
2Recover each deleted key vault: az keyvault recover --name <vault>
3Recover each deleted key in a surviving vault: az keyvault key recover --vault-name <vault> --name <key>
4List deleted containers: az storage container list --account-name <account> --include-deleted --auth-mode login
5Restore each deleted container: az storage container restore --account-name <account> --name <container> --deleted-version <version> --auth-mode login
6Restore soft-deleted blobs: az storage blob undelete --account-name <account> --container-name <container> --name <blob> --auth-mode login
7Where restorePolicy in the blob service properties was on before the attack, revert whole blob ranges to a UTC time: az storage blob restore --account-name <account> --resource-group <rg> --time-to-restore <utc>
8Recover a deleted storage account within 14 days from the portal, if no new account has taken its name. Recreate its private endpoints
9Undelete soft-deleted backup items, then resume protection. The Azure CLI equivalent is az backup protection undelete: Undo-AzRecoveryServicesBackupItemDeletion -Item <item> -VaultId <vault-id> -Force
10Rebuild deleted disks from Azure Backup recovery points. Azure has no undelete for managed disks or snapshots
11Reset the passwords and keys of backup management servers and the accounts that administer them. Give day-to-day operators the Backup Operator role, which cannot stop backup with delete data, and keep Backup Contributor for named administrators
12Protect backups with a Resource Guard owned by a different team, so destructive backup changes need multi-user authorization
13Lock the vault's immutability irreversible once retention is right, and follow the ransomware scenario: az backup vault update --name <vault> --resource-group <rg> --immutability-state Locked
Watch out
  • Resource locks cover control plane calls only. A CanNotDelete lock on a storage account leaves every blob open to data plane deletes and overwrites.
  • Key Vault soft delete keeps objects for 7 to 90 days, set when the vault is created. Without purge protection, anyone with purge rights removes them at once.
  • Point-in-time restore does not bring back deleted containers. Restore containers from container soft delete before you restore blob ranges.
  • A locked vault immutability setting and a locked container retention policy cannot be reversed. Set the retention period before you lock.

Microsoft Learn: blob soft delete, container soft delete, point-in-time restore, container-level WORM policies, recover a deleted storage account, lock resources, Azure Backup secure by default, Azure Backup monitoring and alerts, built-in roles for Azure Backup, multi-user authorization, immutable vaults, Storage Analytics logged operations, resource provider operations, Azure CLI reference for az storage, az keyvault, az backup, az lock and az disk. Checked October 2026. Defender for Cloud alerts for Storage, Resource Manager and Windows machines: checked October 2026. Key Vault soft delete and logging: checked September 2026.

Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.