Skip to content
Threat Feed
medium advisory

Kubernetes Secret Access by Node or Pod Identities

Attackers are exploiting compromised pod service accounts and node identities to perform unauthorized 'get' or 'list' operations on the Kubernetes Secrets API to harvest sensitive credentials.

Kubernetes environments face significant risk from credential access techniques where compromised pod service accounts or node identities (kubelet) are used to query the Kubernetes API for sensitive secrets. Because these identities are meant to operate with predictable, limited API access, direct enumeration of 'Secrets' objects is highly anomalous. Attackers utilize these stolen tokens or node credentials to sweep the cluster for registry credentials, TLS certificates, private keys, and application configuration. This behavior is particularly dangerous as it enables lateral movement and privilege escalation. While some legitimate in-cluster controllers perform these actions, unauthorized use by service accounts or nodes - especially those originating from non-local IP addresses - indicates malicious intent to access protected material. Defensive teams must monitor Kubernetes API server audit logs to detect these unauthorized read operations.

Impact

Successful exploitation allows attackers to bypass security boundaries and exfiltrate sensitive data stored within Kubernetes Secrets. This can lead to full cluster compromise, unauthorized access to external services through exposed registry credentials, and the potential for persistent backdoors. The scope of impact includes any workload, infrastructure component, or secret managed within the cluster namespace.

Recommendation

  • Deploy the Sigma rules provided in this brief to detect unauthorized 'get' or 'list' requests on the Secrets API from nodes and service accounts.
  • Establish a baseline for legitimate service account activity to identify anomalous user agents, namespace access, or resource requests.
  • Implement least-privilege RBAC policies, ensuring that service accounts and node identities only have access to the specific secrets required for their function.
  • Monitor Kubernetes audit logs for authorization_k8s_io/decision field values that indicate denied access attempts, as these serve as early warning signs of discovery activity.
  • Rotate credentials and revoke tokens immediately upon detecting unauthorized secret enumeration.

Immediate actions

Deploy detection rules for unauthorized secret reads.

Detection Engineering 48h

Mitigations

Review and restrict RBAC permissions for pod service accounts and nodes.

short_term IT Operations

T1552.007

Detection coverage 1

Detect Unauthorized Kubernetes Secret Read

medium

Detects potential credential access by monitoring kubelet or pod service account identities performing 'get' or 'list' operations on the Secrets API resource.

sigma tactics: credential_access techniques: T1552.007 sources: webserver

Detection queries are available on the platform. Get full rules →