Elastic high stable kql

AWS EKS CoreDNS or Kube-DNS Configuration Modified

Detects modifications to the CoreDNS or kube-dns ConfigMap in the kube-system namespace. These ConfigMaps control cluster DNS resolution for all pods. An attacker who modifies the CoreDNS Corefile can redirect internal service DNS names to attacker-controlled IP addresses, enabling man-in-the-middle attacks against the Kubernetes API server, database services, and other internal endpoints. Pods that resolve service names via cluster DNS will transparently connect to the attacker instead of the legitimate service, allowing interception of service account tokens, database credentials, and API traffic. DNS poisoning at the cluster level is particularly dangerous because it affects every pod in every namespace simultaneously and does not require any modification to the victim workloads. CoreDNS configuration changes are rare in normal operations and any unexpected modification should be investigated immediately.

View Source

Detection Logic

data_stream.dataset:"aws.eks_audit" and
aws.eks.audit.objectRef.resource:"configmaps" and
aws.eks.audit.objectRef.name:"coredns" and
aws.eks.audit.objectRef.namespace:"kube-system" and
aws.eks.audit.verb:("update" or "patch" or "delete") and
aws.eks.audit.annotations.authorization_k8s_io/decision:"allow" and
not user.name:(
  system\:serviceaccount\:kube-system\:coredns or
  system\:node\:* or
  eks\:*
)

False Positives

  • ⚠ Cluster administrators may legitimately update CoreDNS configuration for forwarding, stub domains, or cluster DNS troubleshooting. Baseline approved operators and automation identities; tune exclusions for known change pipelines.

Field Validations

Loading…

Comments (0)

Loading comments...