PIVTR-D
RAzure playbook · Data and storage

Storage exposed or data exfiltrated

An attacker turns on anonymous access to a container, lists the storage account keys, or generates shared access signature (SAS) tokens, then downloads blobs in bulk. A SAS signed with an account key keeps working after the attacker loses their Azure role. Block anonymous access and rotate both keys first, then revoke user delegation SAS as well.

Look here

LogSearch for
AzureActivityKey listing, SAS generation, key regeneration and access changes. The operations sit under Microsoft.Storage/storageAccounts: listKeys/action, listAccountSas/action, listServiceSas/action, regeneratekey/action, write and blobServices/containers/write. Query them: AzureActivity | where OperationNameValue has "Microsoft.Storage/storageAccounts" | project TimeGenerated, Caller, CallerIpAddress, OperationNameValue, _ResourceId
StorageBlobLogsContainer access changes, then bulk reads by authentication type. User delegation key requests are data-plane calls, so they appear here and never in AzureActivity. Search SetContainerACL, then ListBlobs and GetBlob by AuthenticationType (Anonymous, SAS, AccountKey, OAuth): StorageBlobLogs | where OperationName in ("GetBlob", "ListBlobs") | summarize Requests=count(), Bytes=sum(ResponseBodySize) by AccountName, CallerIpAddress, AuthenticationType, AuthenticationHash | order by Bytes desc
Account settings nowAnonymous access, Shared Key and public network settings across a subscription: az storage account list --query "[].{name:name, rg:resourceGroup, publicBlob:allowBlobPublicAccess, sharedKey:allowSharedKeyAccess, network:publicNetworkAccess}" -o table
Containers nowContainers with anonymous access in one account: az storage container list --account-name <account> --auth-mode login --query "[?properties.publicAccess].{name:name, access:properties.publicAccess}" -o table
SecurityAlertDefender for Storage exposure and exfiltration alerts: SecurityAlert | where AlertType in ("Storage.Blob_OpenACL", "Storage.Blob_AnonymousAccessAnomaly", "Storage.Blob_DataExfiltration.AmountOfDataAnomaly", "Storage.Blob_AccountSas.UnusualExternalAccess") | project TimeGenerated, AlertName, AlertType, CompromisedEntity

Contain

#Item
1Block anonymous access for the whole account, then test from an unauthenticated client: az storage account update --name <account> --resource-group <rg> --allow-blob-public-access false
2Rotate the primary key, which revokes account and service SAS signed with it: az storage account keys renew -g <rg> -n <account> --key primary
3Rotate the secondary key after clients move to the new primary key: az storage account keys renew -g <rg> -n <account> --key secondary
4Revoke every user delegation SAS: az storage account revoke-delegation-keys --name <account> --resource-group <rg>
5Block Shared Key and key-signed SAS after the app owners confirm impact: az storage account update --name <account> --resource-group <rg> --allow-shared-key-access false
6Remove the caller's roles on the account: az role assignment delete --ids <assignment-id>
7Close public network access where no external client needs it: az storage account update --name <account> --resource-group <rg> --public-network-access Disabled

Eradicate and recover

#Item
1Check container access levels, stored access policies and lifecycle policy changes (managementPolicies/write) on every account the caller could reach
2Turn on blob logging where missing: az monitor diagnostic-settings create --name <name> --resource <account-id>/blobServices/default --workspace <workspace-id> --logs "[{category:StorageRead,enabled:true},{category:StorageWrite,enabled:true},{category:StorageDelete,enabled:true}]"
3List the blobs read and bytes returned per caller, and give the list to the Legal advisor for notification deadlines
4Distribute new keys or SAS only to known clients
5Assign an Azure Policy that audits allowBlobPublicAccess across subscriptions
Watch out
  • SAS tokens never appear in logs. Only the SHA-256 hash of the signature in AuthenticationHash ties requests to one token.
  • Key rotation leaves user delegation SAS valid. Run step 4 as well.

Microsoft Learn: StorageBlobLogs table, resource provider operations for Storage, Azure CLI reference for az storage account, az storage container and az monitor diagnostic-settings. Checked October 2026. Defender for Cloud alerts for Storage: checked October 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.