Kubernetes Threat Model
The Threat Model domain tests whether you can reason like an attacker about a Kubernetes environment: what a foothold converts into, and which control breaks the chain.
Frameworks worth naming
STRIDE (spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege) structures enumeration; MITRE ATT&CK for Containers maps techniques; kill-chain and attack-tree reasoning connects initial access to an objective. Threat modelling starts from assets, trust boundaries and entry points - the API server, kubelet, container runtime, image registry, CI pipeline, and the cloud metadata endpoint at 169.254.169.254.
Typical chains
- Publicly exposed dashboard or API server with weak credentials → credential theft → a new
cluster-adminbinding created for persistence. - Stolen ServiceAccount token or cloud workload identity → cloud API enumeration → data exfiltration from object storage.
privileged: true,hostPath, orhostPIDpod → node filesystem or runtime socket access → container escape → lateral movement to other nodes.- Malicious or compromised image in the supply chain → cryptomining or backdoor → persistence through a mutating admission webhook or a DaemonSet.
- Missing NetworkPolicy → unrestricted east-west traffic and service-discovery reconnaissance.
Worked example
An attacker with create pods in one namespace deploys a pod mounting hostPath: /var/run/containerd/containerd.sock. The threat is container escape: the runtime socket lets them start a privileged container on the host. Impact: node, then cluster compromise. Mitigations span layers - restricted Pod Security Admission to exclude privileged pods and hostPath, an admission policy forbidding hostPath outside an allowlist, dropping all capabilities, and runtime detection for socket mounts.
Traps
Treating a vulnerability as a threat (a CVE is a weakness; the threat is an actor exploiting it); modelling only external attackers and ignoring insiders and the supply chain; assuming the internal network is trusted; forgetting that read access to Secrets is a persistence vector, not just disclosure.