GKE Suspicious Assignment of Controller Service Account
Description
Detects a request to attach a built-in kube-controller-manager service account to a pod running in the kube-system namespace on GKE. These service accounts are admin-equivalent and are not normally assigned to arbitrary pods. An attacker who can create pods in kube-system can abuse these tokens for cluster-wide privilege escalation.
Query · kuery
data_stream.dataset:gcp.audit and service.name:"k8s.io" and event.outcome:success and event.action:"io.k8s.core.v1.pods.create" and gcp.audit.request.metadata.namespace:"kube-system" and gcp.audit.request.spec.serviceAccountName:( attachdetach-controller or certificate-controller or cloud-provider or clusterrole-aggregation-controller or cronjob-controller or daemon-set-controller or deployment-controller or disruption-controller or endpoint-controller or expand-controller or generic-garbage-collector or horizontal-pod-autoscaler or job-controller or namespace-controller or node-controller or persistent-volume-binder or pod-garbage-collector or pv-protection-controller or pvc-protection-controller or replicaset-controller or replication-controller or resourcequota-controller or root-ca-cert-publisher or route-controller or service-account-controller or service-controller or statefulset-controller or ttl-controller )
Investigation fields
Pivot points the source recommends for triage.
@timestampclient.user.emailsource.ipuser_agent.originalevent.actionevent.outcomegcp.audit.resource_namegcp.audit.request.spec.serviceAccountNamegcp.audit.request.spec.containers.imagedata_stream.namespace
Implementation guide
The GCP Fleet integration with GKE audit logs enabled is required to be compatible with this rule.
Known false positives
- Built-in controller service accounts are rarely assigned to running pods. False positives should be rare; allowlist documented platform automation by actor when baselined.
Analyst notes
Investigating GKE Suspicious Assignment of Controller Service Account
This rule flags pod create events in kube-system that assign a built-in kube-controller-manager service account.
Possible investigation steps
- Review
client.user.email,gcp.audit.request.spec.serviceAccountName, and container images. - Determine whether the pod aligns with expected platform operations.
- Assess permissions of the assigned service account and hunt for follow-on secret or RBAC activity.
False positive analysis
- Built-in controller service accounts should not be mounted on user-created pods. Allowlist known automation by actor if a documented exception exists.
Response and remediation
- Delete suspicious pods, revoke the service account token, and restrict pod create permissions in kube-system.