← Back to SOC feed Coverage →

Cross-service Azure Data Explorer queries

kql MEDIUM Azure-Sentinel
T1567
backdoorhuntingmicrosoftofficial
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Azure-Sentinel →
Retrieved: 2026-04-24T09:00:00Z · Confidence: medium

Hunt Hypothesis

Adversaries may leverage cross-service Azure Data Explorer queries to exfiltrate sensitive information such as access tokens by exploiting external data functions. SOC teams should proactively hunt for this behavior in Azure Sentinel to detect potential data exfiltration attempts using KQL queries.

KQL Query

let StringToSearch = @"\badx\s*\(";
let ExtractQueriedClusterAddress = @"([^\w]|^)adx\s*\(([^\)]*)\)";
LAQueryLogs
| where QueryText matches regex StringToSearch
| extend QueriedClusterAddress = extract_all(ExtractQueriedClusterAddress, dynamic([2]), QueryText)
| mv-expand QueriedClusterAddress to typeof(string)
| where isnotempty(QueriedClusterAddress)
| project TimeGenerated, AADEmail, QueriedClusterAddress, ResponseCode, QueryText, RequestTarget

Analytic Rule Definition

id: 58b17f82-f594-4d36-9b78-4e4b03992708
name: Cross-service Azure Data Explorer queries
description: |
  'Under specific circumstances, executing KQL queries can exfiltrate information like access tokens, regarding external data functions like adx().
  This query tries to list executed KQL queries that used the adx() function and where an access token might have been exposed to.
  Ref: https://docs.microsoft.com/azure/azure-monitor/logs/azure-monitor-data-explorer-proxy
  Ref: https://securecloud.blog/2022/04/27/azure-monitor-malicious-kql-query/'
requiredDataConnectors:
  - connectorId: AzureMonitor(Query Audit)
    dataTypes:
      - LAQueryLogs
tactics:
  - Exfiltration
relevantTechniques:
  - T1567
query: |
  let StringToSearch = @"\badx\s*\(";
  let ExtractQueriedClusterAddress = @"([^\w]|^)adx\s*\(([^\)]*)\)";
  LAQueryLogs
  | where QueryText matches regex StringToSearch
  | extend QueriedClusterAddress = extract_all(ExtractQueriedClusterAddress, dynamic([2]), QueryText)
  | mv-expand QueriedClusterAddress to typeof(string)
  | where isnotempty(QueriedClusterAddress)
  | project TimeGenerated, AADEmail, QueriedClusterAddress, ResponseCode, QueryText, RequestTarget

MITRE ATT&CK Context

References

False Positive Guidance

Original source: https://github.com/Azure/Azure-Sentinel/blob/main/Hunting Queries/LAQueryLogs/CrossServiceADXQueries.yaml