Privilege Escalation (TA0004)(external, opens in a new tab or window)
text code block:event.dataset:kubernetes.audit_logs and kubernetes.audit.annotations.authorization_k8s_io/decision:allow and kubernetes.audit.objectRef.resource:pods and kubernetes.audit.verb:(create or patch or update) and kubernetes.audit.requestObject.spec.hostNetwork:true and not ( kubernetes.audit.requestObject.spec.containers.image:( *eks/observability/aws-for-fluent-bit* or *eks/observability/cloudwatch-agent* or *elastic-agent* or *quay/tigera* or *tigera/operator* or docker.io/bitnami/node-exporter* or docker.io/rancher/mirrored-calico-operator* or quay.io/calico/node* or quay.io/cephcsi/cephcsi* or quay.io/frrouting/frr* or quay.io/metallb/speaker* or quay.io/prometheus/node-exporter* or rancher/system-agent* or registry.crowdstrike.com/falcon-sensor* or registry.k8s.io/sig-storage/csi-node-driver-registrar* ) or kubernetes.audit.objectRef.namespace:( calico or calico-system or cilium or elastic or ingress-nginx or kube-system or noname-security-posture or openebs or sysdig-agent ) )
Install detection rules in Elastic Security
Detect Kubernetes Pod Created With HostNetwork 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).