AWS EKS Client Certificate Signing Request Created or Approved
Detects creation or approval of a Kubernetes CertificateSigningRequest (CSR) by a non-system identity. Attackers who have gained cluster access can submit a CSR with a privileged Common Name such as system:kube-controller-manager or system:masters, then approve it themselves to obtain a long-lived client certificate. Unlike service account tokens which expire in hours, client certificates persist until they expire or the cluster CA is rotated, providing durable access that survives pod termination, token revocation, and RBAC changes. On non-EKS clusters, the signed certificate allows the attacker to authenticate as the privileged identity from anywhere without needing cluster network access, making it one of the most persistent backdoor mechanisms available in Kubernetes.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/08/03"
3integration = ["aws"]
4maturity = "production"
5min_stack_comments = "The AWS integration adds the aws.eks_audit data stream in package 8.9.0, which requires Kibana 9.6.0 or later."
6min_stack_version = "9.6.0"
7updated_date = "2026/10/09"
8
9[rule]
10author = ["Elastic"]
11description = '''
12Detects creation or approval of a Kubernetes CertificateSigningRequest (CSR) by a non-system identity. Attackers who
13have gained cluster access can submit a CSR with a privileged Common Name such as system:kube-controller-manager or
14system:masters, then approve it themselves to obtain a long-lived client certificate. Unlike service account tokens
15which expire in hours, client certificates persist until they expire or the cluster CA is rotated, providing durable
16access that survives pod termination, token revocation, and RBAC changes. On non-EKS clusters, the signed certificate
17allows the attacker to authenticate as the privileged identity from anywhere without needing cluster network access,
18making it one of the most persistent backdoor mechanisms available in Kubernetes.
19'''
20false_positives = [
21 '''
22 Approved certificate workflows (for example cert-manager, internal PKI rotation, or node bootstrap) may create or
23 update CSRs from identities not in the exclusion list if they run under a custom service account. Baseline
24 automation that legitimately approves CSRs and tune exclusions for those principals.
25''',
26]
27from = "now-9m"
28index = ["logs-aws.eks_audit-*"]
29language = "kuery"
30license = "Elastic License v2"
31name = "AWS EKS Client Certificate Signing Request Created or Approved"
32note = '''
33## Triage and analysis
34
35### Investigating AWS EKS Client Certificate Signing Request Created or Approved
36Identify the actor (`user.name`, groups), client (`user_agent.original`), and `source.ip`. Confirm whether the
37principal is expected to create or approve CSRs. Review `aws.eks.audit.requestURI` and, when audit level captures
38request bodies, the CSR `spec` (requested signer, usages, and requested identity / Common Name).
39
40### Extracting the Certificate Common Name
41
42For create events, "aws.eks.audit.requestObject.spec.request" holds the base64-encoded PEM certificate signing request.
43Decode that value to PEM, then inspect the CSR subject (for example with OpenSSL’s CSR subject view) to read the
44requested Common Name (CN).
45
46Known base64 substrings that often appear inside the encoded request for high-risk identities:
47
48- `c3lzdGVtOm1hc3Rlcn` — `system:masters`
49- `c3lzdGVtOmt1YmUtY29udHJvbGxlci1tYW5hZ2Vy` — `system:kube-controller-manager`
50- `c3lzdGVtOmFkbWlu` — `system:admin`
51
52Priority CNs that usually indicate privilege escalation intent:
53
54- `system:masters` (cluster-admin group)
55- `system:kube-controller-manager` (broad control-plane–style access, including secrets and token minting)
56- `system:kube-scheduler` (scheduling across the cluster)
57- `system:kube-proxy` (node/network–adjacent access)
58- Any CN that matches an existing ClusterRoleBinding subject name
59
60### Possible investigation steps
61
62- Compare the CSR name and extracted CN against approved PKI or bootstrap processes.
63- Determine whether the same identity both created and approved or patched the CSR in a short window, which matches
64 self-approval abuse.
65- Review `aws.eks.audit.objectRef` and subsequent authentication or API activity from unusual networks.
66- Correlate with RBAC changes, secret access, or TokenRequest activity that preceded CSR activity.
67
68### Response and remediation
69
70- If malicious, deny further approval, delete or deny the CSR per incident policy, revoke or rotate cluster signing
71 trust if the CA or signer was abused, and invalidate issued credentials.
72- Remove excessive RBAC that allows `certificatesigningrequests` create/update/patch or approval for untrusted
73 identities; enforce signer restrictions and approved issuers where supported.'''
74references = [
75 "https://kubernetes.io/docs/reference/access-authn-authz/certificate-signing-requests/",
76]
77risk_score = 73
78rule_id = "7b622503-67f1-5da5-acec-c321061a6056"
79setup = '''
80This rule reads EKS control-plane audit logs collected by the AWS integration
81into `logs-aws.eks_audit-*`, where the AWS EKS audit ingest
82pipelines normalize each audit record under `aws.eks.audit.*`.
83
84Enable the `audit` control-plane log type on the EKS cluster, send its
85CloudWatch log group through the AWS integration, and confirm events carry
86`data_stream.dataset: aws.eks_audit` and
87`cloud.provider: aws` before enabling this rule.
88'''
89severity = "high"
90tags = [
91 "Domain: Cloud",
92 "Domain: Containers",
93 "Platform: AWS",
94 "Platform: Kubernetes",
95 "Data Source: AWS",
96 "Data Source: Amazon Web Services",
97 "Data Source: Kubernetes API Server Audit Logs",
98 "Service: AWS EKS",
99 "Use Case: Threat Detection",
100 "Tactic: Persistence",
101 "Tactic: Privilege Escalation",
102 "Rule Type: Custom Query (KQL)",
103 "Resources: Investigation Guide",
104 "Profile: Beta",
105]
106timestamp_override = "event.ingested"
107type = "query"
108query = '''
109data_stream.dataset:"aws.eks_audit" and
110aws.eks.audit.objectRef.resource:"certificatesigningrequests" and
111aws.eks.audit.verb:("create" or "update" or "patch") and
112aws.eks.audit.annotations.authorization_k8s_io/decision:"allow" and
113not user.name:(
114 system\:kube-controller-manager or
115 system\:kube-scheduler or
116 system\:node\:* or
117 system\:serviceaccount\:kube-system\:* or
118 eks\:*
119)
120'''
121
122[[rule.threat]]
123framework = "MITRE ATT&CK"
124
125[rule.threat.tactic]
126id = "TA0003"
127name = "Persistence"
128reference = "https://attack.mitre.org/tactics/TA0003/"
129
130[[rule.threat.technique]]
131id = "T1098"
132name = "Account Manipulation"
133reference = "https://attack.mitre.org/techniques/T1098/"
134
135[[rule.threat.technique.subtechnique]]
136id = "T1098.006"
137name = "Additional Container Cluster Roles"
138reference = "https://attack.mitre.org/techniques/T1098/006/"
139
140[[rule.threat]]
141framework = "MITRE ATT&CK"
142
143[rule.threat.tactic]
144id = "TA0004"
145name = "Privilege Escalation"
146reference = "https://attack.mitre.org/tactics/TA0004/"
147
148[[rule.threat.technique]]
149id = "T1098"
150name = "Account Manipulation"
151reference = "https://attack.mitre.org/techniques/T1098/"
152
153[[rule.threat.technique.subtechnique]]
154id = "T1098.006"
155name = "Additional Container Cluster Roles"
156reference = "https://attack.mitre.org/techniques/T1098/006/"
Triage and analysis
Investigating AWS EKS Client Certificate Signing Request Created or Approved
Identify the actor (user.name, groups), client (user_agent.original), and source.ip. Confirm whether the
principal is expected to create or approve CSRs. Review aws.eks.audit.requestURI and, when audit level captures
request bodies, the CSR spec (requested signer, usages, and requested identity / Common Name).
Extracting the Certificate Common Name
For create events, "aws.eks.audit.requestObject.spec.request" holds the base64-encoded PEM certificate signing request. Decode that value to PEM, then inspect the CSR subject (for example with OpenSSL’s CSR subject view) to read the requested Common Name (CN).
Known base64 substrings that often appear inside the encoded request for high-risk identities:
c3lzdGVtOm1hc3Rlcn—system:mastersc3lzdGVtOmt1YmUtY29udHJvbGxlci1tYW5hZ2Vy—system:kube-controller-managerc3lzdGVtOmFkbWlu—system:admin
Priority CNs that usually indicate privilege escalation intent:
system:masters(cluster-admin group)system:kube-controller-manager(broad control-plane–style access, including secrets and token minting)system:kube-scheduler(scheduling across the cluster)system:kube-proxy(node/network–adjacent access)- Any CN that matches an existing ClusterRoleBinding subject name
Possible investigation steps
- Compare the CSR name and extracted CN against approved PKI or bootstrap processes.
- Determine whether the same identity both created and approved or patched the CSR in a short window, which matches self-approval abuse.
- Review
aws.eks.audit.objectRefand subsequent authentication or API activity from unusual networks. - Correlate with RBAC changes, secret access, or TokenRequest activity that preceded CSR activity.
Response and remediation
- If malicious, deny further approval, delete or deny the CSR per incident policy, revoke or rotate cluster signing trust if the CA or signer was abused, and invalidate issued credentials.
- Remove excessive RBAC that allows
certificatesigningrequestscreate/update/patch or approval for untrusted identities; enforce signer restrictions and approved issuers where supported.
References
Related rules
- AWS EKS Authentication Configuration Modified
- AWS EKS Cluster-Admin Role Binding Created
- AWS EKS Creation of a RoleBinding Referencing a ServiceAccount
- AWS EKS Admission Webhook Created or Modified
- AWS EKS Creation or Modification of Sensitive Role