Kubernetes Secrets List Across Cluster or Sensitive Namespaces
Detects list operations on Kubernetes Secrets from a non-loopback client when the request URI targets cluster-wide secrets or list operations under kube-system or default namespaces, indicating potential credential access or discovery attempts.
This detection rule identifies potential malicious activity within Kubernetes environments by monitoring API requests for listing secrets. Specifically, it focuses on list operations against Kubernetes Secrets originating from non-loopback clients. The rule triggers when these requests target cluster-wide secrets or attempt to enumerate secrets within the kube-system or default namespaces. Such behavior can indicate an attacker attempting to broadly discover and access sensitive credentials stored as Kubernetes secrets. This is critical for defenders because successful enumeration of secrets can lead to privilege escalation and data breaches. This rule is part of the Elastic detection rules and was last updated on 2026/05/11.
Attack Chain
- The attacker gains initial access to a compromised pod or node within the Kubernetes cluster.
- The attacker executes commands within the compromised resource to interact with the Kubernetes API.
- The attacker attempts to enumerate Kubernetes secrets using
kubectlor a similar API client. - The attacker constructs a list operation targeting
/api/v1/secretsto enumerate all secrets in the cluster. - Alternatively, the attacker targets secrets within sensitive namespaces such as
/api/v1/namespaces/kube-system/secretsor/api/v1/namespaces/default/secrets. - The Kubernetes API server processes the request and returns a list of secrets to the attacker.
- The attacker extracts sensitive information such as passwords, API keys, or certificates from the enumerated secrets.
- The attacker uses the acquired credentials to further compromise the cluster or access external resources.
Impact
Successful exploitation can lead to the exposure of sensitive credentials stored as Kubernetes secrets. This can enable attackers to gain unauthorized access to other resources within the cluster, escalate privileges, and potentially compromise the entire environment. Sensitive data stored within the secrets could be exfiltrated.
Recommendation
- Deploy the Sigma rule
Kubernetes Secrets List in Cluster or Sensitive Namespacesto your SIEM and tune it to your environment by adjusting thefilterconditions to avoid false positives from legitimate administrative activities. - Review and harden the RBAC policies in your Kubernetes cluster to limit access to secrets based on the principle of least privilege, mitigating the impact of successful
T1552.007. - Investigate any alerts generated by the
Kubernetes Secrets List in Cluster or Sensitive Namespacesrule, focusing on the actor (user.name, groups), request URI (kubernetes.audit.requestURI), and client information to determine if the activity is legitimate. - Monitor Kubernetes audit logs for suspicious API requests related to secrets using the
logs-kubernetes.audit_logs-*index as described in the rule configuration.
Detection coverage 2
Kubernetes Secrets List in Cluster or Sensitive Namespaces
highDetects list operations on Kubernetes Secrets across the cluster or in sensitive namespaces (kube-system, default) from a non-loopback client, excluding known system accounts.
Kubernetes Secrets List with Limit Parameter
mediumDetects list operations on Kubernetes Secrets with the `limit` parameter in the request URI, indicating potential attempts to bypass pagination restrictions for enumeration.
Detection queries are available on the platform. Get full rules →