AWS EKS Secret get or list from Node or Pod Service Account
Description
Kubernetes audit identities for kubelet (system:node:*) and workloads (system:serviceaccount:*) are meant to operate with tight, predictable API usage. Direct get or list on the Secrets API from those principals is often a sign of credential access. Attackers who stole a pod service-account token or node credentials sweep Secret objects for tokens, registry credentials, TLS keys, or application configuration. Even denied attempts still reveal intent to reach sensitive material. Legitimate controllers do read secrets they mount or manage, so this signal is most valuable when paired with triage (namespace scope, user agent, RBAC, and whether the identity should touch those secret names at all).
Query · kuery
data_stream.dataset:"aws.eks_audit" and
event.action:(get or list) and
aws.eks.audit.objectRef.resource:"secrets" and
user.name:(system\:serviceaccount\:* or system\:node\:*) and
source.ip:(* and not ("127.0.0.1" or "::1")) and
not aws.eks.audit.user.groups:(
"system:serviceaccounts:flux-system" or
"system:serviceaccounts:kyverno" or
"system:serviceaccounts:ibm-csi" or
"system:serviceaccounts:harvester-system" or
"system:serviceaccounts:cattle-system" or
"system:serviceaccounts:cattle-monitoring-system" or
system\:serviceaccounts\:cluster-fleet-local-local-* or
"system:serviceaccounts:rabbitmq-system" or
"system:serviceaccounts:cattle-fleet-system"
) and
not aws.eks.audit.user.username:(
"system:serviceaccount:security:trivy-operator" or
"system:serviceaccount:cert-manager:cert-manager-cainjector" or
"system:serviceaccount:cert-manager:cert-manager"
)
Implementation guide
This rule reads EKS control-plane audit logs collected by the AWS integration
into logs-aws.eks_audit-*, where the AWS EKS audit ingest
pipelines normalize each audit record under aws.eks.audit.*.
Enable the audit control-plane log type on the EKS cluster, send its
CloudWatch log group through the AWS integration, and confirm events carry
data_stream.dataset: aws.eks_audit and
cloud.provider: aws before enabling this rule.
Known false positives
- In-cluster operators, CSI drivers, GitOps agents, and some platform controllers legitimately list or get Secrets in namespaces they manage; exclude known service accounts, namespaces, or user agents after baselining.
- Rare kubelet or node maintenance tooling may touch Secret APIs; validate against change windows and approved node management paths.
Analyst notes
Investigating AWS EKS Secret get or list from Node or Pod Service Account
This rule fires on Kubernetes audit events where the authenticated user is a node (system:node:<nodename>) or a
pod service account (system:serviceaccount:<namespace>:<name>) and the verb maps to read-style access
(get, list) on the secrets resource. Treat node-originated secret reads as high priority: kubelet should
not broadly enumerate cluster secrets. For service accounts, prioritize cross-namespace access, access to
high-value secret names, and clients that do not match the workload’s normal user agent or deployment.
Possible investigation steps
- Resolve
user.name(oraws.eks.audit.user.usernameif present) to the node or workload and review RBAC RoleBindings and ClusterRoleBindings for secretget/listscope. - Inspect
aws.eks.audit.objectRef.namespace,aws.eks.audit.objectRef.name, source IP, anduser_agent.originalfor automation you recognize versus anomalous scripts or generic HTTP clients. - Review
aws.eks.audit.annotations.authorization_k8s_io/decisionfor successful reads versus probing denials. - Correlate with pod exec, token creation, RoleBinding changes, or secret modification in the same time window.
False positive analysis
- Controllers that reconcile Secrets (e.g. cert-manager, external-secrets, sealed-secrets) may match; allowlist their service accounts if behavior is expected and scoped.
- Helm and package managers can list release secrets during deploys; correlate with pipelines and chart releases.
Response and remediation
- If malicious, revoke the token or node credentials, cordon or isolate the host or workload, rotate exposed secrets, and tighten RBAC to least privilege for the affected identity.