How the attack works
Key Vault separates managing a vault (control plane) from using the secrets, keys and certificates in it (data plane). Data-plane access comes from vault access policies in the legacy model, or from Azure RBAC data roles such as Key Vault Secrets User or Key Vault Administrator. Microsoft documents that, with access policies, anyone holding Microsoft.KeyVault/vaults/write (Contributor, Key Vault Contributor) can grant themselves data-plane access by adding an access policy.
Attackers who reach a vault's control plane add an access policy or a data role assignment for an identity they control, then read secrets and certificates that often hold service credentials, connection strings and signing keys. Both changes are control-plane writes recorded in the Azure Activity log. The secret reads that follow appear only in the vault's own resource logs (AuditEvent), when they are enabled. The same resource log records the changes from the vault's side: an access policy change as VaultAccessPolicyChangedEventGridNotification, which Microsoft documents as logged whether or not an Event Grid subscription exists, and a vault update as VaultPut or VaultPatch. Two rules on this page read those records, which need a diagnostic setting on the vault.
What an attacker needs
- On an access policy vault:
Microsoft.KeyVault/vaults/accessPolicies/writeorMicrosoft.KeyVault/vaults/write(Contributor, Key Vault Contributor). - On an RBAC vault:
Microsoft.Authorization/roleAssignments/writeon the vault or a scope above it (Owner, User Access Administrator, Role Based Access Control Administrator, Key Vault Data Access Administrator).
Impact
Read access to secrets, keys and certificates, frequently credentials for other systems and privileged identities, through a grant that survives password resets of the account that made it.
Detection rules
Key Vault Access Policy Change Recorded by the Vault
Detects the record that a key vault writes to its own AuditEvent resource log when its access policies change (operation VaultAccessPolicyChangedEventGridNotification). Microsoft documents that this record is logged whether or not an Event Grid subscription exists. It is the data-plane counterpart of the access policy write in the Azure Activity log, and it sits in the same log as the secret, key and certificate reads that follow a grant, so the change and the reads can be put next to each other for one vault. The rule matches on the operation name only. Who made the change is in the Activity log event for the same vault and time. The log exists only where a diagnostic setting on the vault exports the AuditEvent category.
title: Key Vault Access Policy Change Recorded by the Vault
id: c758200d-373a-41ce-80a4-fcd13ac51d1e
status: experimental
description: >-
Detects the record that a key vault writes to its own AuditEvent resource
log when its access policies change (operation
VaultAccessPolicyChangedEventGridNotification). Microsoft documents that
this record is logged whether or not an Event Grid subscription exists. It
is the data-plane counterpart of the access policy write in the Azure
Activity log, and it sits in the same log as the secret, key and certificate
reads that follow a grant, so the change and the reads can be put next to
each other for one vault. The rule matches on the operation name only. Who
made the change is in the Activity log event for the same vault and time.
The log exists only where a diagnostic setting on the vault exports the
AuditEvent category.
references:
- https://attack.mitre.org/techniques/T1098/003/
- https://learn.microsoft.com/en-us/azure/key-vault/general/logging
- https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-access-policy
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: azure
service: keyvault
detection:
selection:
OperationName: VaultAccessPolicyChangedEventGridNotification
condition: selection
falsepositives:
- Application onboarding and infrastructure-as-code pipelines that manage access policies. Match the record to the Activity log event of the same vault and time, and exclude the vaults or the deployment windows of known pipelines.
level: medium
False positives
- Application onboarding and infrastructure-as-code pipelines that manage access policies. Match the record to the Activity log event of the same vault and time, and exclude the vaults or the deployment windows of known pipelines.
Azure Key Vault Access Policy Added or Changed
Detects a successful update of a Key Vault access policy, which grants an identity data-plane permissions on the vault's secrets, keys or certificates. A full vault update (Microsoft.KeyVault/vaults/write) can also replace access policies or switch the permission model; review those events from unexpected callers as well.
title: Azure Key Vault Access Policy Added or Changed
id: 95929caf-6f36-4cb3-a7e7-82b179f6d3a8
status: experimental
description: >-
Detects a successful update of a Key Vault access policy, which grants an
identity data-plane permissions on the vault's secrets, keys or
certificates. A full vault update (Microsoft.KeyVault/vaults/write) can also
replace access policies or switch the permission model; review those events
from unexpected callers as well.
references:
- https://attack.mitre.org/techniques/T1098/003/
- https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-access-policy
- https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/security
author: Forestall
date: 2026-11-10
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue: MICROSOFT.KEYVAULT/VAULTS/ACCESSPOLICIES/WRITE
ActivityStatusValue:
- Success
- Succeeded
condition: selection
falsepositives:
- Application onboarding and infrastructure-as-code pipelines that manage access policies; exclude their deployment identities in a filter_ selection by Caller.
level: medium
False positives
- Application onboarding and infrastructure-as-code pipelines that manage access policies; exclude their deployment identities in a filter_ selection by Caller.
Azure Key Vault Data-Plane Role Assigned
Detects an Azure role assignment request for a Key Vault data-plane role (Administrator, Secrets Officer or User, Crypto Officer or User, Certificates Officer, Certificate User) or for Key Vault Data Access Administrator, identified by the built-in role definition IDs in the request body. Microsoft documents the request body on the event that records the start of the operation (status Start in AzureActivity, Started in the REST schema). A started request can still fail, so check that the assignment exists. Confirm the match on a real event in your own workspace before you rely on this rule. An assignment at subscription or resource group scope covers every RBAC-model vault below it.
title: Azure Key Vault Data-Plane Role Assigned
id: 7ffc72fb-7c1f-42af-8354-e3aa8fc1d893
status: experimental
description: >-
Detects an Azure role assignment request for a Key Vault data-plane role
(Administrator, Secrets Officer or User, Crypto Officer or User,
Certificates Officer, Certificate User) or for Key Vault Data Access
Administrator, identified by the built-in role definition IDs in the request
body. Microsoft documents the request body on the event that records the
start of the operation (status Start in AzureActivity, Started in the REST
schema). A started request can still fail, so check that the assignment
exists. Confirm the match on a real event in your own workspace before you
rely on this rule. An assignment at subscription or resource group scope
covers every RBAC-model vault below it.
references:
- https://attack.mitre.org/techniques/T1098/003/
- https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide
- https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/security
- https://learn.microsoft.com/en-us/azure/role-based-access-control/change-history-report
author: Forestall
date: 2026-11-10
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue: MICROSOFT.AUTHORIZATION/ROLEASSIGNMENTS/WRITE
ActivityStatusValue:
- Start
- Started
Properties|contains:
- 00482a5a-887f-4fb3-b363-3b7fe8e74483
- b86a8fe4-44ce-4948-aee5-eccb2c155cd7
- 4633458b-17de-408a-b874-0445c86b69e6
- 14b46e9e-c2b7-41b4-b07b-48a6ebf60603
- 12338af0-0e69-4776-bea7-57ae8d297424
- a4417e6f-fecd-4de8-b567-7b0420556985
- db79e9a7-68ee-4b58-9aeb-b90e7c24fcba
- 8b54135c-b56d-4d72-a534-26097cfdc8d8
condition: selection
falsepositives:
- Planned access grants for applications and administrators, often through infrastructure-as-code; correlate with change records and exclude deployment identities in a filter_ selection by Caller.
- A request that starts and then fails validation (for example a duplicate assignment); confirm the assignment exists.
level: medium
False positives
- Planned access grants for applications and administrators, often through infrastructure-as-code; correlate with change records and exclude deployment identities in a filter_ selection by Caller.
- A request that starts and then fails validation (for example a duplicate assignment); confirm the assignment exists.
Key Vault Update Recorded by the Vault
Detects a successful create or update of a key vault as the vault records it in its own AuditEvent resource log (operations VaultPut and VaultPatch). Access policies, the permission model and the network rules are properties of the vault, so a change to any of them arrives as one of these operations. The rule matches on the operation name and the result only, and so it matches every vault update. It is on this page because the record in the resource-specific table AZKVAuditLogs has columns for the resulting state of the vault (EnableRbacAuthorization, NetworkAcls, VaultProperties), which the Azure Activity log event for the same change does not carry. Those columns are not mapped as fields in this library, so read them in the matching record. Use the rule for review, not as an alert on its own. The log exists only where a diagnostic setting on the vault exports the AuditEvent category.
title: Key Vault Update Recorded by the Vault
id: f59ec5d0-b04b-4c5a-9275-222ac89e365c
status: experimental
description: >-
Detects a successful create or update of a key vault as the vault records it
in its own AuditEvent resource log (operations VaultPut and VaultPatch).
Access policies, the permission model and the network rules are properties
of the vault, so a change to any of them arrives as one of these operations.
The rule matches on the operation name and the result only, and so it
matches every vault update. It is on this page because the record in the
resource-specific table AZKVAuditLogs has columns for the resulting state of
the vault (EnableRbacAuthorization, NetworkAcls, VaultProperties), which the
Azure Activity log event for the same change does not carry. Those columns
are not mapped as fields in this library, so read them in the matching
record. Use the rule for review, not as an alert on its own. The log exists
only where a diagnostic setting on the vault exports the AuditEvent
category.
references:
- https://attack.mitre.org/techniques/T1098/003/
- https://learn.microsoft.com/en-us/azure/key-vault/general/logging
- https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azkvauditlogs
- https://learn.microsoft.com/en-us/azure/key-vault/general/monitor-key-vault
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: azure
service: keyvault
detection:
selection:
OperationName:
- VaultPut
- VaultPatch
ResultType: Success
condition: selection
falsepositives:
- Any vault update, including tags, soft delete and purge protection settings, and vault creation.
- Infrastructure-as-code pipelines that redeploy vaults on every run. Exclude their addresses in a filter_ selection by CallerIpAddress once confirmed.
level: low
False positives
- Any vault update, including tags, soft delete and purge protection settings, and vault creation.
- Infrastructure-as-code pipelines that redeploy vaults on every run. Exclude their addresses in a filter_ selection by CallerIpAddress once confirmed.
Azure Key Vault Updated (Possible Access Policy or Permission Model Change)
Detects a successful create or update of a Key Vault resource (Microsoft.KeyVault/vaults/write). The rule exists because access policies and the permission model (enableRbacAuthorization) are properties of the vault, so a change made in the Azure portal or through a template may arrive as a vault write and not as an accessPolicies write. The event does not say which property changed, and the rule matches every vault update, so use it for review and correlation with the companion rules, not as an alert on its own.
title: Azure Key Vault Updated (Possible Access Policy or Permission Model Change)
id: 0b55f4bf-a33c-4222-80e0-b306a23fee6d
status: experimental
description: >-
Detects a successful create or update of a Key Vault resource
(Microsoft.KeyVault/vaults/write). The rule exists because access policies
and the permission model (enableRbacAuthorization) are properties of the
vault, so a change made in the Azure portal or through a template may arrive
as a vault write and not as an accessPolicies write. The event does not say
which property changed, and the rule matches every vault update, so use it
for review and correlation with the companion rules, not as an alert on its
own.
references:
- https://attack.mitre.org/techniques/T1098/003/
- https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-access-policy
- https://learn.microsoft.com/en-us/azure/key-vault/general/access-control-default
- https://learn.microsoft.com/en-us/azure/role-based-access-control/permissions/security
author: Forestall
date: 2026-11-11
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: azure
service: activitylogs
detection:
selection:
OperationNameValue: MICROSOFT.KEYVAULT/VAULTS/WRITE
ActivityStatusValue:
- Success
- Succeeded
condition: selection
falsepositives:
- Any vault update, including vault creation, tags, network rules, soft delete and purge protection settings.
- Infrastructure-as-code pipelines that redeploy vaults on every run; exclude their deployment identities in a filter_ selection by Caller.
level: low
False positives
- Any vault update, including vault creation, tags, network rules, soft delete and purge protection settings.
- Infrastructure-as-code pipelines that redeploy vaults on every run; exclude their deployment identities in a filter_ selection by Caller.
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.
Access policy changed and secrets read from the same vault shortly after
Granting access is preparation. The attack is the read that follows. Microsoft Defender for Key Vault describes a policy change followed by secret reads as a sign that somebody updated the vault's policy to reach secrets that were out of reach before. The vault's resource log holds both records, so the two can be put in order for one vault without a join across logs.
- In the Key Vault resource log, find
OperationNameVaultAccessPolicyChangedEventGridNotification. KeepResourceId(the vault) and the time. - Within 60 minutes, look for
SecretGetwithResultTypeSuccess in the sameResourceId. Count the differentIdvalues and note eachCallerIpAddress. - Compare those addresses with the addresses that read this vault in the 30 days before the change. Reads from an address that is new after the change carry the most weight.
- Take the
Callerof the policy change from the Azure Activity log eventMICROSOFT.KEYVAULT/VAULTS/ACCESSPOLICIES/WRITEorMICROSOFT.KEYVAULT/VAULTS/WRITEfor the same vault and time.
EventsVaultAccessPolicyChangedEventGridNotificationSecretGet
LimitsOnboarding a new application is a policy change followed by that application's first reads, which looks the same, so check for a deployment. Vaults that use Azure RBAC have no access policy record and need the role assignment event in the Activity log as the first step. The 60 minutes and the 30 days are starting points.
Vault update that switches the permission model or opens the network
A vault write does not say which property changed, so a rule cannot tell a new tag from a vault that was moved back to access policies or opened to all networks. The resource log record of the update carries the resulting state of the vault, and comparing it with the previous record of the same vault shows the change.
- In the Key Vault resource log (table
AZKVAuditLogs), take eachVaultPutorVaultPatchrecord withResultTypeSuccess. KeepResourceId. - Read the columns
EnableRbacAuthorization,NetworkAclsandVaultPropertiesof the record, and of the previousVaultPutorVaultPatchrecord of the same vault. - Flag a change of
EnableRbacAuthorizationfrom true to false, network rules that became less strict, and access policy entries that are new.
EventsVaultPutVaultPatch
LimitsThe columns exist in the resource-specific table and are not mapped as fields in this library, and a vault with a diagnostic setting in Azure diagnostics mode writes other column names. Microsoft's table reference describes the columns but not when each one is filled, so check on a test vault that your records carry them. The first update of a vault after logging was enabled has nothing to compare with.
Triage
- Identify the Caller, the vault and, from Properties, the identity that received access and the permissions or role granted.
- Check whether that identity is new or recently credentialed, and whether it read secrets, keys or certificates afterwards in the vault's AuditEvent logs.
- For a plain vault update, compare the vault's access policies and permission model with their previous state, because the event itself does not say which property changed.
- Remove unexplained access and rotate every secret the identity could read.
Response
Once the attack is confirmed:
- Block the identity that received access, not only the grant. Disable the user, or remove the credentials of the service principal, so a second grant by the same caller does not reopen the vault.
- Take the control-plane right away from the caller. Remove Contributor, Key Vault Contributor or the role assignment right it used, revoke its sessions and rotate its credentials.
- Rotate in order of reach. Start with secrets that are credentials for other systems and for privileged identities, then keys and certificates, and replace them in the applications that use them.
- If the vault's resource logs were not enabled at the time, there is no record of what was read. Treat every secret, key and certificate that the granted permissions covered as read.
- Review the systems whose credentials were stored in the vault for use of those credentials after the grant, and continue the response there.
- Compare the vault's access policies or role assignments with their approved state. If a data role was granted at subscription or resource group scope, confirm that it was removed at that scope.
Mitigation
- Move vaults to the Azure RBAC permission model, where granting data access requires Owner or User Access Administrator, and enforce it with the built-in policy "Azure Key Vault should use RBAC permission model".
- Limit Contributor and Key Vault Contributor on vaults that still use access policies.
- Enable Key Vault resource logs (AuditEvent) and review secret, key and certificate reads by newly granted identities.
Frequently asked questions
Does the Activity log show which secrets were read after the grant?
No. The access policy change and the role assignment are control-plane writes in the Azure Activity log. The reads of secrets, keys and certificates that follow appear only in the vault's own resource logs (AuditEvent), and only when those logs are enabled.
Why does the rule for data-plane roles match the Start event and not the successful one?
The role definition ID is in the request body, and Microsoft documents the request body on the event that records the start of the operation. A started request can still fail, for example on a duplicate assignment, so confirm that the assignment exists before you act on the alert.
How can a Contributor read secrets when the role has no data-plane permission?
On a vault that uses access policies, anyone who holds `Microsoft.KeyVault/vaults/write`, such as Contributor or Key Vault Contributor, can add an access policy for themselves and so grant their own data-plane access. In the Azure RBAC permission model, granting data access requires Owner or User Access Administrator.
Why did the rule fire for a role assignment that does not name a vault?
A Key Vault data role assigned at subscription or resource group scope covers every vault below it that uses the RBAC permission model. The rule matches the role definition ID in the request at any scope, so read the scope in the event to see which vaults are affected.
References
- MITRE ATT&CK T1098.003: Additional Cloud Roles
- Azure RBAC vs. access policies (legacy) for Key Vault
- Provide access to Key Vault keys, certificates, and secrets with Azure RBAC
- Azure built-in roles for Security
- Azure Key Vault logging
- AZKVAuditLogs table reference
- Alerts for Azure Key Vault (Microsoft Defender for Cloud)