GKE Anonymous Request Authorized by Unusual User Agent
Description
Detects successful GKE API requests from unauthenticated anonymous identities using an unusual user agent. Attackers may rely on anonymous access for initial cluster access or to avoid attribution. Matches "system:anonymous" / "system:unauthenticated" and GKE audit rows where the principal is missing (common for unauthenticated clients). Common kube-probe health checks (readyz/livez/healthz/version) are excluded.
Query · kuery
data_stream.dataset:gcp.audit and service.name:k8s.io and event.outcome:success and client.user.email:("system:anonymous" or "system:unauthenticated" or not *) and user_agent.original:(* and not (*kubernetes/$Format or kube-probe*)) and not gcp.audit.resource_name:(healthz or livez or readyz or version or .well-known*)
Investigation fields
Pivot points the source recommends for triage.
@timestampclient.user.emailsource.ipuser_agent.originalevent.actionevent.outcomegcp.audit.resource_nameorchestrator.resource.nameorchestrator.namespace
Implementation guide
The GCP Fleet integration with GKE audit logs enabled is required to be compatible with this rule.
Known false positives
- Anonymous API access is a dangerous default. Health probes are excluded; investigate all other authorized anonymous requests and disable anonymous authentication where possible.
Analyst notes
Investigating GKE Anonymous Request Authorized by Unusual User Agent
Anonymous success outside health endpoints can indicate a publicly reachable API server or overly permissive RBAC for
system:anonymous / system:unauthenticated. On GKE via GCP audit, some unauthenticated clients omit
client.user.email; those successes are included when the user agent is unusual.
Investigation steps
- Review
client.user.email,event.action,gcp.audit.resource_name,source.ip, anduser_agent.original. - Confirm whether the API server is Internet-exposed and whether anonymous auth is intentionally enabled.
- Hunt for follow-on anonymous pod mutations, secret reads, or RBAC changes from the same source.
False positives
- Custom health or readiness endpoints not covered by the built-in exclusions; add environment-specific exceptions after review.