GKE Suspicious Assignment of Controller Service Account
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.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/07/10"
3integration = ["gcp"]
4maturity = "production"
5updated_date = "2026/07/10"
6
7[rule]
8author = ["Elastic"]
9description = """
10Detects a request to attach a built-in kube-controller-manager service account to a pod running in the kube-system
11namespace on GKE. These service accounts are admin-equivalent and are not normally assigned to arbitrary pods. An attacker
12who can create pods in kube-system can abuse these tokens for cluster-wide privilege escalation.
13"""
14false_positives = [
15 """
16 Built-in controller service accounts are rarely assigned to running pods. False positives should be rare; allowlist
17 documented platform automation by actor when baselined.
18 """,
19]
20from = "now-6m"
21index = ["logs-gcp.audit-*"]
22language = "kuery"
23license = "Elastic License v2"
24name = "GKE Suspicious Assignment of Controller Service Account"
25note = """## Triage and analysis
26
27### Investigating GKE Suspicious Assignment of Controller Service Account
28
29This rule flags pod create events in kube-system that assign a built-in kube-controller-manager service account.
30
31### Possible investigation steps
32
33- Review `client.user.email`, `gcp.audit.request.spec.serviceAccountName`, and container images.
34- Determine whether the pod aligns with expected platform operations.
35- Assess permissions of the assigned service account and hunt for follow-on secret or RBAC activity.
36
37### False positive analysis
38
39- Built-in controller service accounts should not be mounted on user-created pods. Allowlist known automation by actor if a documented exception exists.
40
41### Response and remediation
42
43- Delete suspicious pods, revoke the service account token, and restrict pod create permissions in kube-system.
44
45"""
46setup = "The GCP Fleet integration with GKE audit logs enabled is required to be compatible with this rule."
47references = [
48 "https://www.paloaltonetworks.com/apps/pan/public/downloadResource?pagePath=/content/pan/en_US/resources/whitepapers/kubernetes-privilege-escalation-excessive-permissions-in-popular-platforms",
49 "https://kubernetes.io/docs/reference/access-authn-authz/rbac/#controller-roles",
50]
51risk_score = 47
52rule_id = "e2f60d42-e0ea-4a03-a151-942bb5b86c0b"
53severity = "medium"
54tags = [
55 "Domain: Cloud",
56 "Domain: Kubernetes",
57 "Data Source: GCP",
58 "Data Source: Google Cloud Platform",
59 "Use Case: Threat Detection",
60 "Tactic: Execution",
61 "Tactic: Privilege Escalation",
62 "Resources: Investigation Guide",
63]
64timestamp_override = "event.ingested"
65type = "query"
66
67query = '''
68data_stream.dataset:gcp.audit and service.name:"k8s.io" and event.outcome:success and
69event.action:"io.k8s.core.v1.pods.create" and gcp.audit.request.metadata.namespace:"kube-system" and
70gcp.audit.request.spec.serviceAccountName:(
71 attachdetach-controller or certificate-controller or cloud-provider or
72 clusterrole-aggregation-controller or cronjob-controller or daemon-set-controller or deployment-controller or
73 disruption-controller or endpoint-controller or expand-controller or generic-garbage-collector or
74 horizontal-pod-autoscaler or job-controller or namespace-controller or node-controller or
75 persistent-volume-binder or pod-garbage-collector or pv-protection-controller or pvc-protection-controller or
76 replicaset-controller or replication-controller or resourcequota-controller or root-ca-cert-publisher or
77 route-controller or service-account-controller or service-controller or statefulset-controller or ttl-controller
78)
79'''
80
81[[rule.threat]]
82framework = "MITRE ATT&CK"
83
84[[rule.threat.technique]]
85id = "T1078"
86name = "Valid Accounts"
87reference = "https://attack.mitre.org/techniques/T1078/"
88
89[[rule.threat.technique.subtechnique]]
90id = "T1078.001"
91name = "Default Accounts"
92reference = "https://attack.mitre.org/techniques/T1078/001/"
93
94[rule.threat.tactic]
95id = "TA0004"
96name = "Privilege Escalation"
97reference = "https://attack.mitre.org/tactics/TA0004/"
98
99[[rule.threat]]
100framework = "MITRE ATT&CK"
101
102[[rule.threat.technique]]
103id = "T1610"
104name = "Deploy Container"
105reference = "https://attack.mitre.org/techniques/T1610/"
106
107[rule.threat.tactic]
108id = "TA0002"
109name = "Execution"
110reference = "https://attack.mitre.org/tactics/TA0002/"
111
112[rule.investigation_fields]
113field_names = [
114 "@timestamp",
115 "client.user.email",
116 "source.ip",
117 "user_agent.original",
118 "event.action",
119 "event.outcome",
120 "gcp.audit.resource_name",
121 "gcp.audit.request.spec.serviceAccountName",
122 "gcp.audit.request.spec.containers.image",
123 "data_stream.namespace",
124]
Triage and analysis
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.
References
Related rules
- GKE Container Created with Excessive Linux Capabilities
- GKE Pod Created With HostIPC
- GKE Pod Created With HostNetwork
- GKE Pod Created With HostPID
- GKE Pod Created with a Sensitive hostPath Volume