GKE Forbidden Request from Unusual User Agent
Description
Detects the first occurrence of a failed GKE API request from a previously unseen user agent. Adversary tooling often uses non-standard clients; combined with authorization failures this can indicate RBAC probing or exploitation attempts.
Query · kuery
data_stream.dataset:gcp.audit and service.name:k8s.io and event.outcome:failure and user_agent.original:(* and not (*kubernetes/$Format or kube-probe* or gke-exec-auth-plugin*)) and not client.user.email:( "system:addon-manager" or system\:*controller* or system\:gke-* or "system:apiserver" or "system:kube-scheduler" or "system:metrics-server-nanny" or "system:kube-proxy" or "system:clustermetrics" or "system:vpa-recommender" or "system:cluster-autoscaler" or "system:kubestore-collector" or "system:konnectivity-server" or "system:serviceaccount:kube-system:pod-garbage-collector" or "system:serviceaccount:kube-system:generic-garbage-collector" or system\:node\:* or "gcp:kube-bootstrap" or *container-engine-robot* )
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
- New internal tools, SDKs, or CI runners introduce novel user agents. Baseline expected clients, then exclude stable automation UAs after review.
Analyst notes
Investigating GKE Forbidden Request from Unusual User Agent
A novel user agent with failed API calls may be scanner or post-compromise tooling probing RBAC.
Investigation steps
- Review
user_agent.original,client.user.email,event.action,gcp.audit.resource_name, andsource.ip. - Determine whether the client is expected (new SDK, CI image) or external reconnaissance.
- Hunt for successful requests from the same UA or source after the failures.
False positives
- First use of a legitimate new client library; add a scoped UA exception after validation.