Azure AKS CoreDNS or Kube-DNS Configuration Modified

Last updated 25 days ago on 2026-07-09
Created 25 days ago on 2026-07-09

About

Detects an identity creating or modifying the CoreDNS or kube-dns ConfigMap in the kube-system namespace on AKS (Azure Kubernetes Service), excluding known AKS control-plane and platform identities. Rewriting cluster DNS (by editing coredns/kube-dns or creating and editing coredns-custom) enables cluster-wide adversary-in-the-middle by redirecting internal service resolution to attacker-controlled IPs, allowing credential capture and traffic interception. Coverage includes workload service accounts (system:serviceaccount:*), so a compromised in-cluster token is not excluded.
Tags
Domain: CloudDomain: KubernetesData Source: AzureData Source: Azure Platform LogsData Source: KubernetesUse Case: Threat DetectionTactic: Credential AccessLanguage: kuery
Severity
medium
Risk Score
47
MITRE ATT&CK™

Credential Access (TA0006)(external, opens in a new tab or window)

False Positive Examples
Approved automation, platform controllers, or GitOps may update the CoreDNS ConfigMap (for example custom forward rules). Validate the identity and change window, and add exclusions for verified service accounts.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Rule Type
Query (Kibana Query Language)
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
logs-azure.platformlogs-*
Related Integrations

azure(external, opens in a new tab or window)

Query
text code block:
data_stream.dataset:azure.platformlogs and event.action:"Microsoft.ContainerService/managedClusters/diagnosticLogs/Read" and azure.platformlogs.category:("kube-audit" or "kube-audit-admin") and azure.platformlogs.properties.log.stage:"ResponseComplete" and azure.platformlogs.properties.log.objectRef.resource:"configmaps" and azure.platformlogs.properties.log.objectRef.namespace:"kube-system" and azure.platformlogs.properties.log.objectRef.name:("coredns" or "kube-dns" or "coredns-custom") and azure.platformlogs.properties.log.verb:("create" or "update" or "patch" or "delete") and not azure.platformlogs.properties.log.user.username:( system\:node\:* or "aksService" or "hcpService" or "readinessChecker" or system\:serviceaccount\:kube-system\:* )

Install detection rules in Elastic Security

Detect Azure AKS CoreDNS or Kube-DNS Configuration Modified in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).