LoFP LoFP / authorized inventory jobs, secret migration tools, and multi-vault deployment pipelines may retrieve many secrets across several vaults within 15 minutes.

Techniques

Sample rules

Azure Key Vault Multi-Vault Secret Retrieval Burst by Application

Description

Identifies a burst of successful Azure Key Vault secret retrievals by the same principal and application across multiple vaults. Adversaries with compromised application credentials may collect stored secrets at scale to access additional services or move laterally.

Detection logic

from logs-azure.platformlogs-* metadata _id, _index
| where data_stream.dataset == "azure.platformlogs"
  and event.action == "SecretGet"
  and azure.platformlogs.identity.claim.iss is not null and azure.platformlogs.identity.claim.iss != ""
  and azure.platformlogs.identity.claim.oid is not null and azure.platformlogs.identity.claim.oid != ""
  and azure.platformlogs.identity.claim.appid is not null and azure.platformlogs.identity.claim.appid != ""
  and azure.resource.id is not null and azure.resource.id != ""
  and KQL("azure.platformlogs.properties.httpStatusCode:200")
| eval Esql.time_window = date_trunc(15 minutes, @timestamp)
| stats
    Esql.secret_read_count = count(*),
    Esql.vault_count = count_distinct(azure.resource.id),
    Esql.vaults = values(azure.resource.id),
    Esql.source_ips = values(source.ip),
    Esql.first_seen = min(@timestamp),
    Esql.last_seen = max(@timestamp)
  by Esql.time_window, azure.platformlogs.identity.claim.iss, azure.platformlogs.identity.claim.oid,
    azure.platformlogs.identity.claim.appid
| where Esql.secret_read_count >= 20 and Esql.vault_count >= 3
| keep azure.platformlogs.identity.claim.iss, azure.platformlogs.identity.claim.oid,
    azure.platformlogs.identity.claim.appid, Esql.*