Skip to content
Threat Feed
high advisory

Kubernetes Secrets Enumeration from Non-Loopback Client

Detection of Kubernetes Secrets listing from non-loopback clients targeting cluster-wide secrets or sensitive namespaces, potentially indicating unauthorized credential access or discovery.

This detection identifies Kubernetes Secrets listing events originating from non-loopback clients. Attackers may attempt to enumerate Kubernetes Secrets to gain access to sensitive information such as credentials, API keys, and other confidential data stored within the cluster. The rule specifically focuses on requests targeting cluster-wide secrets or list operations under the kube-system or default namespaces, which are often targeted due to their high concentration of sensitive information. This activity is indicative of potential credential access or discovery attempts within the Kubernetes environment. This rule helps defenders identify and respond to potential reconnaissance or lateral movement activities within their Kubernetes clusters.

Attack Chain

  1. An attacker gains initial access to a node within the Kubernetes cluster or a system with access to the Kubernetes API.
  2. The attacker authenticates to the Kubernetes API server using compromised credentials or by exploiting a vulnerability.
  3. The attacker crafts a list request targeting the /api/v1/secrets endpoint to enumerate all secrets in the cluster.
  4. Alternatively, the attacker targets secrets within the kube-system namespace using /api/v1/namespaces/kube-system/secrets or default namespace using /api/v1/namespaces/default/secrets.
  5. The API server responds with a list of secrets, potentially including sensitive information.
  6. The attacker analyzes the retrieved secrets to identify valuable credentials or configuration data.
  7. The attacker uses the acquired credentials to escalate privileges, move laterally within the cluster, or access external resources.

Impact

Successful enumeration of Kubernetes secrets can lead to the compromise of sensitive credentials, allowing attackers to gain unauthorized access to critical systems and data. This can result in data breaches, service disruptions, and significant financial losses. The targeting of kube-system and default namespaces poses a particularly high risk due to the presence of core system components and sensitive configurations.

Recommendation

  • Deploy the Sigma rule Kubernetes Secrets List in Sensitive Namespaces to your SIEM to detect suspicious secret enumeration activities based on kubernetes.audit.requestURI.
  • Monitor Kubernetes audit logs (logs-kubernetes.audit_logs-*) for list operations on the secrets resource, specifically targeting /api/v1/secrets and sensitive namespaces.
  • Implement network policies to restrict access to the Kubernetes API server from untrusted networks.
  • Review and harden the security configuration of the kube-system and default namespaces.
  • Enforce the principle of least privilege for service accounts and user access to minimize the impact of credential compromise.
  • Investigate any alerts generated by the Sigma rule and correlate with other security events to identify potential attacks.

Detection coverage 2

Kubernetes Secrets List in Sensitive Namespaces

high

Detects listing of Kubernetes secrets in sensitive namespaces (kube-system, default) from non-loopback IPs.

sigma tactics: credential_access, discovery techniques: T1552, T1613 sources: network_connection, kubernetes

Kubernetes Cluster-Wide Secrets List

medium

Detects cluster-wide listing of Kubernetes secrets from non-loopback IPs.

sigma tactics: credential_access, discovery techniques: T1552, T1613 sources: network_connection, kubernetes

Detection queries are kept inside the platform. Get full rules →