How the attack works
Every Azure storage account has two access keys. A request signed with one of them (Shared Key authorization), or with an account or service SAS token signed by it, is accepted for any data in the account. Microsoft states that the keys provide full access to the storage account data and the ability to generate SAS tokens. Reading them is a control-plane action, Microsoft.Storage/storageAccounts/listkeys/action, which Owner, Contributor, Storage Account Contributor and the Storage Account Key Operator Service Role include. These roles carry no data permissions in Microsoft Entra ID, so listing the keys is how control-plane access becomes data access. Two neighbouring actions have the same effect without a key listing: listAccountSas/action and listServiceSas/action return a SAS token that Resource Manager signs with an account key, and regeneratekey/action returns the keys in its response. Each of them is its own operation in the Activity log.
An attacker who can call the action copies the keys and then reads, changes or deletes blobs, files, queues and tables with them. A request signed with a key is authorized by the key alone: Microsoft notes that Conditional Access can protect a storage account only when Shared Key authorization is disallowed, and the keys stay valid until they are regenerated. The call is recorded in the Azure Activity log with its caller. What is done with the keys afterwards appears only in the storage account's resource logs, when a diagnostic setting collects them. A threshold rule counts key listings per caller, because one identity collecting the keys of many accounts in a short time is the pattern Microsoft Defender for Cloud describes for scripted key extraction.
What an attacker needs
- An identity whose role includes
Microsoft.Storage/storageAccounts/listkeys/actionon the storage account or a scope above it: Owner, Contributor, Storage Account Contributor, Reader and Data Access, Storage Account Key Operator Service Role or a custom role. - A storage account that allows Shared Key authorization, which is the default while the
AllowSharedKeyAccessproperty is not set or is true.
Impact
Full read, write and delete access to all data in the storage account, and the ability to issue SAS tokens for it. The access does not depend on the attacker's Azure identity, so disabling that identity does not end it. It lasts until both keys are regenerated.
Detection rules
Azure Storage Account Access Key Regenerated
Detects a successful regeneration of an access key of an Azure storage account (Microsoft.Storage/storageAccounts/regeneratekey/action). The response of the operation contains the account's keys, so the caller holds a valid key without a separate key listing. The old key stops working at once, together with the account and service SAS tokens that were signed with it, which cuts off every application that still uses it. Scheduled key rotation makes the same call, so the rule is for review of callers and timing that do not match the rotation process.
title: Azure Storage Account Access Key Regenerated
id: e392b5d1-39e3-4192-b981-b09ee4f07e59
status: experimental
description: >-
Detects a successful regeneration of an access key of an Azure storage
account (Microsoft.Storage/storageAccounts/regeneratekey/action). The
response of the operation contains the account's keys, so the caller holds a
valid key without a separate key listing. The old key stops working at once,
together with the account and service SAS tokens that were signed with it,
which cuts off every application that still uses it. Scheduled key rotation
makes the same call, so the rule is for review of callers and timing that do
not match the rotation process.
references:
- https://attack.mitre.org/techniques/T1552/004/
- https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/regenerate-key
- https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage
- https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/storage
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1552.004
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue: MICROSOFT.STORAGE/STORAGEACCOUNTS/REGENERATEKEY/ACTION
ActivityStatusValue:
- Success
- Succeeded
condition: selection
falsepositives:
- Scheduled key rotation by administrators, automation or a key management service. Exclude the rotation identity in a filter_ selection by Caller once confirmed, and review regenerations outside the rotation schedule.
- Key regeneration during incident response, which is the documented way to revoke a leaked key.
level: low
False positives
- Scheduled key rotation by administrators, automation or a key management service. Exclude the rotation identity in a filter_ selection by Caller once confirmed, and review regenerations outside the rotation schedule.
- Key regeneration during incident response, which is the documented way to revoke a leaked key.
Azure Storage Account Access Keys Listed
Detects a successful listing of the access keys of an Azure storage account (Microsoft.Storage/storageAccounts/listkeys/action). The keys give full access to the account's data through Shared Key authorization and can sign SAS tokens. Deployment tools, the Azure portal and Azure services that connect to storage with Shared Key make the same call, so the rule is a starting point for a baseline of expected callers and not an alert on its own.
title: Azure Storage Account Access Keys Listed
id: cd701a00-a129-4e3d-a8ce-3d2cb2db5e50
status: experimental
description: >-
Detects a successful listing of the access keys of an Azure storage account
(Microsoft.Storage/storageAccounts/listkeys/action). The keys give full
access to the account's data through Shared Key authorization and can sign
SAS tokens. Deployment tools, the Azure portal and Azure services that
connect to storage with Shared Key make the same call, so the rule is a
starting point for a baseline of expected callers and not an alert on its
own.
references:
- https://attack.mitre.org/techniques/T1552/004/
- https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage
- https://learn.microsoft.com/en-us/azure/storage/common/shared-key-authorization-prevent
- https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/storage
author: Forestall
date: 2026-11-16
tags:
- attack.credential-access
- attack.t1552.004
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue: MICROSOFT.STORAGE/STORAGEACCOUNTS/LISTKEYS/ACTION
ActivityStatusValue:
- Success
- Succeeded
condition: selection
falsepositives:
- Deployment pipelines and infrastructure-as-code tools, the Azure portal, and Azure services that connect to storage with Shared Key. Exclude their identities in a filter_ selection by Caller once confirmed, per storage account where possible.
- Key rotation, where the new keys are read after they are regenerated.
level: low
False positives
- Deployment pipelines and infrastructure-as-code tools, the Azure portal, and Azure services that connect to storage with Shared Key. Exclude their identities in a filter_ selection by Caller once confirmed, per storage account where possible.
- Key rotation, where the new keys are read after they are regenerated.
Azure Storage Account or Service SAS Token Requested Through Resource Manager
Detects a successful request to Azure Resource Manager for an account SAS or a service SAS token of a storage account (Microsoft.Storage/storageAccounts/listAccountSas/action and listServiceSas/action). Resource Manager signs the token with one of the account's access keys, so the caller receives data access without listing the keys and without a data role in Microsoft Entra ID. The Activity log event does not show the permissions, the services or the expiry time that were requested, so treat the token as valid for the whole account until the signing key is regenerated. Templates that use the listAccountSas or listServiceSas template functions make the same call during a deployment.
title: Azure Storage Account or Service SAS Token Requested Through Resource Manager
id: e388619a-5ecc-4cfd-b405-f39cc72246cd
status: experimental
description: >-
Detects a successful request to Azure Resource Manager for an account SAS
or a service SAS token of a storage account
(Microsoft.Storage/storageAccounts/listAccountSas/action and
listServiceSas/action). Resource Manager signs the token with one of the
account's access keys, so the caller receives data access without listing
the keys and without a data role in Microsoft Entra ID. The Activity log
event does not show the permissions, the services or the expiry time that
were requested, so treat the token as valid for the whole account until the
signing key is regenerated. Templates that use the listAccountSas or
listServiceSas template functions make the same call during a deployment.
references:
- https://attack.mitre.org/techniques/T1552/004/
- https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/list-account-sas
- https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/list-service-sas
- https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/storage
- https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1552.004
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue:
- MICROSOFT.STORAGE/STORAGEACCOUNTS/LISTACCOUNTSAS/ACTION
- MICROSOFT.STORAGE/STORAGEACCOUNTS/LISTSERVICESAS/ACTION
ActivityStatusValue:
- Success
- Succeeded
condition: selection
falsepositives:
- Deployment templates and infrastructure-as-code tools that request a SAS token for an application setting or a backup target. Exclude their deployment identities in a filter_ selection by Caller once confirmed.
- Azure services and administrators that hand a time-limited token to another system. Baseline the callers per storage account.
level: medium
False positives
- Deployment templates and infrastructure-as-code tools that request a SAS token for an application setting or a backup target. Exclude their deployment identities in a filter_ selection by Caller once confirmed.
- Azure services and administrators that hand a time-limited token to another system. Baseline the callers per storage account.
Storage Account Access Keys Listed Many Times by One Caller
Counts, per Caller, the successful listings of storage account access keys. Microsoft Defender for Cloud describes scripts that extract the keys of storage accounts through Resource Manager as an attack pattern. Ten or more listings within 30 minutes by one identity is that collection across accounts, where a deployment or an administrator usually reads the keys of the few accounts in front of it. The account is named only in the resource ID of each event, which this rule does not count, so repeated listings of one account count as well. The count and the window are starting points to tune.
Fires when one Caller has at least 10 matching events within 30 minutes.
title: Azure Storage Account Access Keys Listed (Threshold Base Event)
id: 01dd1b8b-c0a4-48df-89ff-8543a759b432
name: azure_storage_account_keys_listed
status: experimental
description: >-
Base event of the threshold rule in this file. A successful listing of the
access keys of an Azure storage account
(Microsoft.Storage/storageAccounts/listkeys/action).
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue: MICROSOFT.STORAGE/STORAGEACCOUNTS/LISTKEYS/ACTION
ActivityStatusValue:
- Success
- Succeeded
condition: selection
level: low
---
title: Storage Account Access Keys Listed Many Times by One Caller
id: 7c91874e-65c7-47c6-b76c-3ed4cc41d8db
status: experimental
description: >-
Counts, per Caller, the successful listings of storage account access keys.
Microsoft Defender for Cloud describes scripts that extract the keys of
storage accounts through Resource Manager as an attack pattern. Ten or more
listings within 30 minutes by one identity is that collection across
accounts, where a deployment or an administrator usually reads the keys of
the few accounts in front of it. The account is named only in the resource
ID of each event, which this rule does not count, so repeated listings of one
account count as well. The count and the window are starting points to tune.
references:
- https://attack.mitre.org/techniques/T1552/004/
- https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage
- https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/storage
- https://learn.microsoft.com/en-us/azure/defender-for-cloud/alerts-resource-manager
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1552.004
correlation:
type: event_count
rules:
- azure_storage_account_keys_listed
group-by:
- Caller
timespan: 30m
condition:
gte: 10
falsepositives:
- Infrastructure-as-code tools that refresh the state of many storage accounts in one run, backup and inventory tools, and Azure services that connect to storage with Shared Key. Exclude those identities by Caller, or raise the count for them.
- An administrator who browses storage accounts in the Azure portal, which reads keys as well. Read the resource IDs of the matching events to see how many accounts were reached.
- The values of 10 listings and 30 minutes are starting points, not tested limits. Measure what your own tools produce and adjust both.
level: medium
False positives
- Infrastructure-as-code tools that refresh the state of many storage accounts in one run, backup and inventory tools, and Azure services that connect to storage with Shared Key. Exclude those identities by Caller, or raise the count for them.
- An administrator who browses storage accounts in the Azure portal, which reads keys as well. Read the resource IDs of the matching events to see how many accounts were reached.
- The values of 10 listings and 30 minutes are starting points, not tested limits. Measure what your own tools produce and adjust both.
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.
Keys or a SAS token obtained, then key-authorized requests from a new client address
The Activity log shows who obtained a key or a SAS token, and the storage resource logs show where requests signed with a key or a SAS token came from. A key listing by an identity, followed by key-authorized data requests from a client address that never used the account before, is the pattern of keys that left the place where they were read.
- In the Azure Activity log, find a successful
MICROSOFT.STORAGE/STORAGEACCOUNTS/LISTKEYS/ACTION,LISTACCOUNTSAS/ACTION,LISTSERVICESAS/ACTIONorREGENERATEKEY/ACTION. Keep theCaller, theCallerIpAddressand the storage account from the resource ID. - In the storage resource logs of that account, for example StorageBlobLogs, take the requests after that time with
AuthenticationTypeAccountKey or SAS, byAccountName. - Compare
CallerIpAddressandUserAgentHeaderof those requests with the values seen for the account in the 30 days before. Review requests from an address or user agent that is new for the account.
EventsMICROSOFT.STORAGE/STORAGEACCOUNTS/LISTKEYS/ACTIONMICROSOFT.STORAGE/STORAGEACCOUNTS/LISTACCOUNTSAS/ACTIONMICROSOFT.STORAGE/STORAGEACCOUNTS/LISTSERVICESAS/ACTIONMICROSOFT.STORAGE/STORAGEACCOUNTS/REGENERATEKEY/ACTION
LimitsIt needs a diagnostic setting that collects the resource logs of the storage account. The resource logs do not name the Azure identity that obtained the key, so the link to the listing is by account and time only. Applications that move to a new address look the same. The 30 days are a starting point.
Storage account settings changed and its keys listed by the same caller
Microsoft's report on Storm-2949 describes an attacker who changed the network access configuration of storage accounts with Microsoft.Storage/storageAccounts/write, so that its own addresses were allowed, and then listed the keys. A write to a storage account followed by a key or SAS request from the same caller is that preparation and collection in order.
- In the Azure Activity log, a storage account is updated:
OperationNameValueMICROSOFT.STORAGE/STORAGEACCOUNTS/WRITEwith status Success. Keep theCallerand the resource ID. - Within 60 minutes the same
CallerrunsMICROSOFT.STORAGE/STORAGEACCOUNTS/LISTKEYS/ACTION,LISTACCOUNTSAS/ACTIONorLISTSERVICESAS/ACTIONon the same resource ID. - Read the current network rules and the
AllowSharedKeyAccesssetting of the account, because the write event does not say which property changed.
EventsMICROSOFT.STORAGE/STORAGEACCOUNTS/WRITEMICROSOFT.STORAGE/STORAGEACCOUNTS/LISTKEYS/ACTION
LimitsDeployment pipelines create or update a storage account and read its keys in the same run, so their identities have to be excluded by name. The 60 minutes are a starting point. An attacker who uses two identities for the two steps does not match.
Triage
- Identify the Caller, the caller's IP address and the storage account, and whether this identity lists keys for this account routinely. Deployment pipelines, the Azure portal and Azure services that connect to storage with Shared Key do.
- Check what the account holds and whether it allows Shared Key authorization. Keys listed on an account with
AllowSharedKeyAccessset to false are rejected on data requests. - In the storage resource logs, for example StorageBlobLogs, look for requests with the
AuthenticationTypeAccountKey or SAS after the listing, from client addresses and user agents that are new for the account. - Look at the same caller's other activity around that time, such as key listings on many storage accounts in a short period, new role assignments or changes to the account's network rules.
Response
Once the attack is confirmed:
- Regenerate both access keys of every storage account the caller listed, and update the applications that depend on them. Regenerating a key also revokes the account and service SAS tokens that were signed with it.
- Contain the caller. Revoke its sessions, rotate its credentials and remove the role that carries the
listkeysaction until the listing is explained. - Review the storage resource logs from the time of the listing for reads, writes and deletes authorized with an account key or a SAS token. If the logs were not collected, treat all data in the account as read.
- Compare the data and the settings of the account with their expected state, and look for deleted or overwritten data and for changed network rules or anonymous access settings.
- If the account held credentials, for example in configuration files, backups or deployment state, rotate them and continue the response in the systems they open.
Mitigation
- Disallow Shared Key authorization (
AllowSharedKeyAccessset to false) on storage accounts whose clients can use Microsoft Entra ID, and enforce it with the built-in Azure Policy definition Storage accounts should prevent shared key access. - Limit Owner, Contributor and Storage Account Contributor on storage accounts, and give people and applications data roles in Microsoft Entra ID instead of roles that include the
listkeysaction. - Where keys must stay in use, set a key expiration policy, rotate both keys on that schedule and keep them in Azure Key Vault.
- Create a diagnostic setting for the storage account's resource logs, so that requests authorized with an account key or a SAS token can be traced to a client address and user agent.
Frequently asked questions
Does the Activity log show what was done with the keys?
No. The Activity log records the control-plane call that returned the keys, with its caller. Requests made with a key go to the storage service itself and appear only in the account's resource logs, such as StorageBlobLogs, where the field AuthenticationType has the value AccountKey or SAS. Those logs exist only when a diagnostic setting collects them.
Why does the key listing rule match so much ordinary administration?
Listing keys is a routine operation. Microsoft notes that a number of Azure services use Shared Key authorization to communicate with Azure Storage, and deployment tools and the Azure portal read keys as well. Use the rule to build a baseline. Allow-list the identities that list keys routinely for each account and review the listings made by anyone else.
Does disabling the attacker's account stop access that was gained with the keys?
No. A request signed with an account key, or with an account or service SAS token signed by it, is authorized by the key alone and keeps working until the key is regenerated. Regenerating the key revokes those SAS tokens as well. A user delegation SAS is secured with Microsoft Entra credentials and is not affected by key rotation.
Are SAS tokens requested through Azure Resource Manager covered as well?
Yes, by a separate rule on this page. `Microsoft.Storage/storageAccounts/listAccountSas/action` and `Microsoft.Storage/storageAccounts/listServiceSas/action` return SAS tokens for the account through the control plane and are operations of their own. The Activity log event does not show the permissions or the expiry time that were requested. A SAS token that a client signs itself with a listed key leaves no control-plane event at all.
References
- MITRE ATT&CK T1552.004: Private Keys
- Manage storage account access keys
- Prevent Shared Key authorization for an Azure Storage account
- Azure permissions for Storage
- Azure built-in roles for Storage
- Azure Activity Log event schema
- Storage Accounts: List Account SAS (REST API)
- Storage Accounts: Regenerate Key (REST API)
- Alerts for Resource Manager (Microsoft Defender for Cloud)
- Monitoring data reference for Azure Blob Storage
- Microsoft Security Blog: How Storm-2949 turned a compromised identity into a cloud-wide breach