service account token Secret
A Kubernetes Secret holding a service account token that never expires, created on request and valid until the Secret is deleted.
A stolen or planted long-lived token keeps working until someone finds and deletes it.
In more detail
Attackers mint these long-lived tokens so they can return even after their pods are removed. Prefer short-lived projected tokens, restrict who may create Secrets of this type, and delete every such Secret during eradication.
Related terms
- projected service account token — A short-lived, signed token for a service account that the kubelet mounts into a pod and refreshes, valid only for a stated audience.
- service account — An identity for a program rather than a person; in Kubernetes each pod runs as one and gets a signed token for it.
- persistence — Anything an attacker sets up so their access survives reboots, logoffs and password changes, such as a scheduled task or a new key.
Taught in
- Detecting Persistence: Tasks, Registry & Services — Security Operations & Threat Hunting (SOC)
- Containment & Eradication: Host, Net & Identity — Security Operations & Threat Hunting (SOC)