Persistence (TA0003)(external, opens in a new tab or window)
Defense Evasion (TA0005)(external, opens in a new tab or window)
text code block:kubernetes.audit.objectRef.resource:("mutatingwebhookconfigurations" or "validatingwebhookconfigurations") and kubernetes.audit.verb:("create" or "update" or "patch" or "delete") and kubernetes.audit.annotations.authorization_k8s_io/decision:"allow" and user.name:(* and not (system\:kube-controller-manager or system\:kube-scheduler or system\:serviceaccount\:kube-system\:* or eks\:* or aksService or masterclient or nodeclient or system\:serviceaccount\:gke-managed-system\:* or system\:serviceaccount\:cert-manager\:* or system\:serviceaccount\:gatekeeper-system\:* or system\:serviceaccount\:kyverno\:* or system\:serviceaccount\:*\:*-operator) ) and kubernetes.audit.objectRef.name:(* and not (pod-identity-webhook or vpc-resource-mutating-webhook or eks-* or gke-*))
Install detection rules in Elastic Security
Detect Kubernetes Admission Webhook Created or 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).