text code block:data_stream.dataset:"kubernetes.audit_logs" and kubernetes.audit.objectRef.resource:"configmaps" and kubernetes.audit.objectRef.name:("coredns" or "kube-dns" or "coredns-custom") and kubernetes.audit.objectRef.namespace:"kube-system" and kubernetes.audit.verb:("update" or "patch" or "delete") and kubernetes.audit.annotations.authorization_k8s_io/decision:"allow" and not user.name:( system\:serviceaccount\:kube-system\:coredns or system\:serviceaccount\:kube-system\:kube-dns or system\:node\:* or eks\:* or aksService or acsService )
Install detection rules in Elastic Security
Detect Kubernetes 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).