Elastic medium stable kql

GKE Exposed Service Created With Type NodePort

Detects creation or modification of a GKE Service with type NodePort. NodePort exposes a static port on every worker node that hosts matching pods, which widens the cluster's external attack surface and can bypass load-balancer and firewall controls. Attackers may create NodePort Services to intercept traffic or establish a direct path into the cluster.

View Source

Detection Logic

data_stream.dataset:gcp.audit and service.name:"k8s.io" and event.outcome:success and
event.action:(
  "io.k8s.core.v1.services.create" or
  "io.k8s.core.v1.services.update" or
  "io.k8s.core.v1.services.patch"
) and gcp.audit.request.spec.type:"NodePort" and not (
  client.user.email:"system:addon-manager" and
  event.action:"io.k8s.core.v1.services.patch"
)

False Positives

  • ⚠ Developers may legitimately use NodePort for frontends without cloud load balancers, or for nonstandard networking. system:addon-manager patch reconciliation of existing NodePort Services is excluded; create and update from addon-manager still alert.

Field Validations

Loading…

Comments (0)

Loading comments...