1. Resources
  2. Detection rules
  3. Storage Account Local User Created or Its Credentials Retrieved

Storage Account Local User Created or Its Credentials Retrieved detection rules

Someone creates a local user on an Azure storage account or regenerates the password of one. A local user signs in over SFTP with a password or SSH key and is outside Microsoft Entra ID, Azure RBAC and Conditional Access.

Platform
Azure
Severity
High
Log source
Azure Activity log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
A contributor role on a storage account that has SFTP support enabled, or the right to enable it, and network access to the blob endpoint.
Impact
Lasting access to the containers of the account with a password or SSH key that is outside Microsoft Entra ID and Azure RBAC.
Response
Delete unknown local users, replace the credentials of users that were taken over, contain the caller and review the transfers.
Mitigation
Keep SFTP support disabled where it is not needed and limit the contributor roles on storage accounts that hold sensitive data.
Operations
MICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/REGENERATEPASSWORD/ACTIONMICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/LISTKEYS/ACTIONMICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/WRITE
Threat groups
APT29LAPSUS$

How the attack works

Azure Blob Storage supports the SSH File Transfer Protocol, and with it what Microsoft calls a new form of identity management: local users. A local user belongs to one storage account, authenticates with a password that Azure generates or with an SSH key pair, and is given permissions per container. Microsoft documents that local users do not interoperate with the other permission models of Azure Storage such as RBAC and ABAC. Its example is a person who has read-only access through a Microsoft Entra identity and delete permission through a local user. The user name for a connection is the account name and the local user name joined by a dot, and the endpoint is the public blob endpoint of the account unless the storage firewall limits it.

For an attacker with a contributor role on a storage account a local user is a second, quieter way to the data. The account is created with Microsoft.Storage/storageAccounts/localusers/write, with the attacker's own SSH public key or a generated password and with permissions on the containers of the attacker's choice. An existing local user is taken over by generating a new password for it (localusers/regeneratePassword/action) or by replacing its keys through an update, and localusers/listKeys/action returns its stored keys. Nothing of this needs the account keys, and the local user keeps working after the attacker's Azure identity is disabled. The operations are recorded in the Azure Activity log with their caller. What the local user transfers afterwards is data-plane activity, which the Activity log does not record. It is in the resource logs of the storage account, if a diagnostic setting collects them.

What an attacker needs

  • A role with the local user actions on the storage account, such as Owner, Contributor or Storage Account Contributor, or a custom role with Microsoft.Storage/storageAccounts/localusers/write.
  • A storage account with a hierarchical namespace and SFTP support enabled, or the right to update the account and enable it. Microsoft documents that SFTP support requires the hierarchical namespace.
  • Network access to the blob endpoint of the account on the SFTP port.

Impact

Lasting read, write or delete access to the containers the local user was given, with a credential that is not a Microsoft Entra identity and is not subject to sign-in policies. The attacker uses it to copy data out, to plant or change files that other systems read, or to delete data. The access remains until the local user is deleted or its credentials are replaced.

Detection rules

Storage Account Local User Password Regenerated or Keys Listed

Detects a successful regeneration of the SSH password of a storage account local user (Microsoft.Storage/storageAccounts/localusers/regeneratePassword/action) or a listing of its keys (localusers/listKeys/action). Azure generates the password of a local user and does not show it again, so regeneration is the way to obtain a working password for an existing user, and whoever calls it can sign in as that user over SFTP. The key listing returns the SSH authorized keys and the shared key that Azure stores for the user. The rule assumes that these requests are written to the Activity log like other action operations.

LevelMediumStatusExperimentalLog sourceAzure Activity log
title: Storage Account Local User Password Regenerated or Keys Listed
id: 54b335f5-7adc-4cc8-9877-fd8b1a6cf771
status: experimental
description: >-
  Detects a successful regeneration of the SSH password of a storage account
  local user (Microsoft.Storage/storageAccounts/localusers/regeneratePassword/action)
  or a listing of its keys (localusers/listKeys/action). Azure generates the
  password of a local user and does not show it again, so regeneration is the
  way to obtain a working password for an existing user, and whoever calls it
  can sign in as that user over SFTP. The key listing returns the SSH
  authorized keys and the shared key that Azure stores for the user. The rule
  assumes that these requests are written to the Activity log like other
  action operations.
references:
  - https://attack.mitre.org/techniques/T1136/003/
  - https://learn.microsoft.com/en-us/rest/api/storagerp/local-users/regenerate-password
  - https://learn.microsoft.com/en-us/rest/api/storagerp/local-users/list-keys
  - https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support
  - https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/storage
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.t1136.003
logsource:
  product: azure
  service: activitylogs
detection:
  selection:
    OperationNameValue:
      - MICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/REGENERATEPASSWORD/ACTION
      - MICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/LISTKEYS/ACTION
    ActivityStatusValue:
      - Success
      - Succeeded
  condition: selection
falsepositives:
  - Planned password resets for partners who lost the password, and administrators who review the keys of a local user. Match each event to a request from the owner of the local user.
level: medium

False positives

  • Planned password resets for partners who lost the password, and administrators who review the keys of a local user. Match each event to a request from the owner of the local user.

Storage Account Local User Created or Updated

Detects a successful create or update of a local user on an Azure storage account (Microsoft.Storage/storageAccounts/localusers/write). A local user signs in to the account over SFTP with a password or an SSH key and has its own container permissions. Microsoft documents that local users do not interoperate with Azure RBAC and ABAC, so the account is a way to the data that no Microsoft Entra policy covers. An update can add an SSH public key or widen the permissions of an existing user. The event names the storage account and the local user but not its permissions or keys, so read the local user after each event.

LevelMediumStatusExperimentalLog sourceAzure Activity log
title: Storage Account Local User Created or Updated
id: a5c50d91-371e-466b-a89c-6bfa7bd41504
status: experimental
description: >-
  Detects a successful create or update of a local user on an Azure storage
  account (Microsoft.Storage/storageAccounts/localusers/write). A local user
  signs in to the account over SFTP with a password or an SSH key and has
  its own container permissions. Microsoft documents that local users do not
  interoperate with Azure RBAC and ABAC, so the account is a way to the data
  that no Microsoft Entra policy covers. An update can add an SSH public key
  or widen the permissions of an existing user. The event names the storage
  account and the local user but not its permissions or keys, so read the
  local user after each event.
references:
  - https://attack.mitre.org/techniques/T1136/003/
  - https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support
  - https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/storage
author: Forestall
date: 2026-11-18
tags:
  - attack.persistence
  - attack.t1136.003
logsource:
  product: azure
  service: activitylogs
detection:
  selection:
    OperationNameValue: MICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/WRITE
    ActivityStatusValue:
      - Success
      - Succeeded
  condition: selection
falsepositives:
  - Teams that run file exchanges with partners over SFTP and add or change local users for them. Match each event to a request and exclude the provisioning identity in a filter_ selection by Caller once confirmed.
level: medium

False positives

  • Teams that run file exchanges with partners over SFTP and add or change local users for them. Match each event to a request and exclude the provisioning identity 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.

Storage account updated and a local user created by the same caller shortly after

Detection hypothesisSequence of events

Local users only work on an account with SFTP support enabled. On an account that never used SFTP, an attacker has to enable it first, which is an update of the storage account. A write to the account followed by the creation of a local user by the same caller is that preparation and the backdoor in order.

  1. In the Azure Activity log, the storage account is updated with status Success: MICROSOFT.STORAGE/STORAGEACCOUNTS/WRITE. Keep the Caller and the resource ID of the account.
  2. Within 60 minutes the same Caller runs MICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/WRITE on the same account with status Success.
  3. Read the SFTP setting of the account and the permissions of the new local user, because the write events do not say which properties changed.

EventsMICROSOFT.STORAGE/STORAGEACCOUNTS/WRITEMICROSOFT.STORAGE/STORAGEACCOUNTS/LOCALUSERS/WRITE

LimitsA team that sets up a new SFTP exchange enables the feature and creates its users in the same change, so match the events with a request. The 60 minutes are a starting point. An account where SFTP was already enabled does not produce the first event.

Triage

  • Identify the Caller, the caller's IP address, the storage account and the local user name from the resource ID, and whether this identity manages SFTP users for a business process.
  • Read the local user and note its container permissions, its home directory, whether it has a password and which SSH public keys it holds.
  • Check whether SFTP was enabled on the account shortly before, which shows as an update of the storage account in the Activity log.
  • For a regenerated password, find out who owns the local user and whether that owner asked for a new password.
  • Review the resource logs of the account, if they are collected, for transfers by the local user after the event.

Response

Once the attack is confirmed:

  1. Delete the local users you cannot account for. For a local user that was taken over, remove the unknown SSH keys and generate a new password for its owner.
  2. Disable SFTP support on the account if no business process depends on it.
  3. Contain the caller. Revoke its sessions, rotate its credentials and remove its role on the storage account until the event is explained.
  4. Review what the local user could reach and what it transferred, and treat the data in the containers it had permissions on as read if the transfers cannot be reconstructed.
  5. Check files that other systems consume from those containers for changes made through the local user.

Mitigation

  • Keep SFTP support disabled on storage accounts that do not need it, and enforce that with Azure Policy.
  • Limit Owner, Contributor and Storage Account Contributor on storage accounts that hold sensitive data.
  • Where SFTP is used, restrict the account with the storage firewall, a virtual network or a private endpoint, as Microsoft recommends for limiting public access.
  • Review the local users of every SFTP-enabled account regularly, with their container permissions and authentication methods, and remove the ones nobody owns.
  • Create a diagnostic setting for the blob service of SFTP-enabled accounts, so that transfers can be traced.

Frequently asked questions

Does Conditional Access or Azure RBAC apply to a storage local user?

No. Microsoft documents that local users do not interoperate with other Azure Storage permission models such as RBAC and ABAC. A local user authenticates to the storage account itself with a password or an SSH key, so there is no Microsoft Entra sign-in for a policy to evaluate. Its access is defined by its own container permissions.

Can an existing local user be taken over without creating a new one?

Yes. Microsoft documents that Azure generates the password of a local user and that it cannot be retrieved again, only generated anew. The regenerate password operation therefore gives its caller a working password for an existing user, and an update of the local user can add an SSH public key. Both leave the user name unchanged.

Does the Activity log show what a local user downloaded?

No. The Activity log records the Azure Resource Manager operations on the local user, with their caller. Transfers over SFTP are requests to the storage service. Look for them in the resource logs of the storage account, which exist only where a diagnostic setting collects them.

Is there a public incident report for this technique?

No public incident report describes this at the audit event level as far as this page's sources go. The page is based on Microsoft's documentation of local users for SFTP and of the Resource Manager operations that create them and return or replace their credentials.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.