Elastic medium stable kql

Microsoft Foundry Keys or Connection Secrets Accessed by New Principal

Identifies the first time in seven days that a high-privilege Azure principal lists or regenerates the API keys of a Microsoft Foundry (Azure AI Services) account, or reads the stored secrets of a Foundry account or project connection. Account keys grant direct inference access to every model deployment on the account and bypass Entra ID conditional access, and connection secrets hold credentials for downstream services such as Azure OpenAI, storage, and search. A compromised identity retrieving these keys is a common first step in LLMjacking and in pivoting from a Foundry project to the data it is connected to.

View Source

Detection Logic

data_stream.dataset: "azure.activitylogs" and
azure.activitylogs.operation_name: (
    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/LISTKEYS/ACTION" or
    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/REGENERATEKEY/ACTION" or
    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/CONNECTIONS/LISTSECRETS/ACTION" or
    "MICROSOFT.COGNITIVESERVICES/ACCOUNTS/PROJECTS/CONNECTIONS/LISTSECRETS/ACTION"
) and
azure.activitylogs.identity.authorization.evidence.role: (
    "Owner" or
    "Contributor" or
    "Cognitive Services Contributor" or
    "Cognitive Services OpenAI Contributor" or
    "User Access Administrator"
) and event.outcome: "success"

False Positives

  • ⚠ Administrators with Owner or Contributor roles opening the Keys and Endpoint blade in the Azure portal or Foundry portal, which issues a listKeys call. Confirm the activity with the principal and prefer Entra ID authentication over key-based access.
  • ⚠ Infrastructure-as-code pipelines and deployment scripts that read keys to configure applications. Prefer managed identities, or add exceptions for the service principals that run these pipelines.

Field Validations

Loading…

Comments (0)

Loading comments...