Kubernetes Threat Model & Attack Chains
An authoritative, interactive reference architecture and threat modeling engine for enterprise Kubernetes. Inspect trust boundaries, threat actors, threat objects, attack vectors, and production hardening policies with real-time deep-linking, multi-layer abstraction depth, traffic flow overlays, and production-tested YAML, Shell, Falco eBPF, and CIS compliance inspectors.
Component Name
Overview & Context
Associated Attack Vectors
Enterprise Architecture & Attack Vector Catalog
This model applies STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) and the MITRE ATT&CK for Containers matrix across Kubernetes components. Click any card below to automatically switch sheets, focus the diagram viewport, and inspect production YAML policies, shell audit commands, Falco eBPF detection rules, and CIS compliance benchmarks.
4 Diagram Sheets Architecture Guide
Master Threat Register & Cluster Overview
High-trust Control Plane envelope (kube-apiserver, etcd), Data Plane worker nodes (kubelet, containerd), 7 threat actors (TA01–07), and 32 threat objects (TO01–32).
Attack Chains & Mitigation Narratives
Step-by-step kill chains spanning P1 (Ingress RCE), P2 (ServiceAccount Token Abuse), P3 (Supply Chain Injection), P4 (Host Breakout), P5 (Cloud IMDS Pivot), and P6 (Secrets Compromise).
Layered Security Reference Architecture
Defense-in-depth concentric zones: Cloud IAM & OIDC boundary, isolated SLSA CI/CD builder & Cosign signing, worker node isolation with Default-Deny NetworkPolicy, and Linux kernel MAC confinement.
Packet and Identity Flow Analysis
Detailed request flow pipeline: TLS 6443 → AuthN → AuthZ → Admission → Storage, ingress/egress data paths, east-west mTLS, and conditional breakout observation points.
Attack Chains & Exploit Narratives (P1–P6)
Real-world adversary trajectories from perimeter breach to host escape. Click any scenario to zoom directly to Sheet 2 and open production remediation policies.
Ingress to Pod Takeover
Attacker targets a public ingress service exploiting RCE/SSRF (e.g. Log4j CVE-2021-44228) to drop a reverse shell into an interactive container pod.
Token Abuse & API Pivot
Attacker harvests mounted ServiceAccount tokens from /var/run/secrets to query the Kubernetes API server and escalate to cluster-admin.
Supply Chain Poisoning
Adversary compromises upstream CI/CD runners or registry credentials to inject a backdoored container image, deployed past runtime perimeters.
Pod Breakout to Node Root
Overprivileged flags (privileged: true, hostPID, SYS_ADMIN) or kernel CVEs (Dirty Pipe) break the container sandbox onto the host OS.
Cloud Metadata IAM Pivot
Attacker probes the link-local metadata address (169.254.169.254) from a container pod, exfiltrating temporary node IAM role security credentials.
Datastore & Secrets Harvest
Attacker accesses unencrypted etcd datastores or backup snapshots without KMS v2 encryption at rest, recovering cluster-wide secrets in plaintext.
Cluster Trust Boundaries (4 Envelopes)
ClusterControlPlane (CP)
High-trust isolation envelope hosting kube-apiserver, kube-scheduler, kube-controller-manager, and cloud-controller-manager. Protected by mTLS, dedicated CAs, and fine-grained RBAC.
ClusterControlPlaneData (CPD)
The datastore boundary protecting etcd and KMS envelope keys. Direct network access must be strictly forbidden except from authorized kube-apiserver endpoints using dedicated client certificates.
ClusterDataPlane (DP)
Worker nodes hosting kubelet, kube-proxy, container runtime engines (containerd/CRI-O), and untrusted customer pods. Pods must be constrained with Seccomp, AppArmor/SELinux, and non-root SecurityContexts.
External & Supply Chain
OCI registries, CI/CD runners, cloud provider APIs (IAM, VPC, metadata service), and public internet actors. Enforce cryptographic image signing (Cosign), SLSA provenance, and IMDSv2 metadata protection.
Threat Actors Catalog (TA01–TA07)
External Attacker
Unauthenticated internet adversary probing public Ingress endpoints, exposed API servers, and unpatched web application vulnerabilities.
Malicious Insider
Authenticated employee, developer, or compromised credential holder attempting privilege escalation to cluster-admin or reading secrets across namespaces.
Compromised Workload
An adversary with an active shell inside a container pod. Steals mounted ServiceAccount tokens and probes the flat CNI network or Cloud IMDS (169.254.169.254).
Rogue Multi-Tenant Actor
A valid tenant in a shared multi-tenant cluster attempting cross-namespace network sniffing, resource starvation (noisy neighbor), or cluster-wide CRD tampering.
Supply Chain Poisoner
Injects backdoor malware into upstream container registries, base images, or CI/CD pipelines, evading boundary firewalls by piggybacking on valid image pulls.
Cloud & Hypervisor Operator
Infrastructure personnel or processes with hypervisor console access, unencrypted storage volume snapshots (EBS), or cloud VPC routing table authority.
Hardware & Physical Adversary
Adversary with physical access to server racks, bare-metal nodes, BMC/IPMI interfaces, or stolen unencrypted NVMe storage volumes executing cold-boot attacks.
API Request & Packet Flow Checkpoints (6 Stages)
Deterministic execution path of every incoming request to the Kubernetes control plane before state persistence.
Client Identity
OIDC tokens, X.509 client certificates, or projected ServiceAccount tokens.
API TLS (6443)
mTLS termination with strict cipher suites, IP whitelisting, and load balancing.
Authentication (AuthN)
TokenReview, Webhook authenticator, or CA verification validating user/group claims.
Authorization (AuthZ)
RBAC ClusterRoleBindings, NodeRestriction, and SubjectAccessReview webhooks.
Admission Control
Mutating webhooks → Validating webhooks → Pod Security Admission (PSA).
Storage & Encryption
etcd v3 key-value persistence with KMS v2 envelope encryption of Secrets at rest.
STRIDE Threat Modeling Taxonomy for Kubernetes
Every component in KubeDaily's architecture is categorized by its primary STRIDE threat vulnerability and mitigation envelope. Click any letter pill to filter the interactive canvas.
Identity & Authenticator Spoofing
Impersonating users, pods, nodes, or ServiceAccounts (anonymous access, ARP spoofing, client CA compromise).
State & Data Tampering
Unauthorized mutation of cluster state, etcd records, container filesystems, or mutating webhook injection.
Audit Failure & Repudiation
Executing administrative or cluster actions without non-repudiable audit logs, tamper-evident trails, or eBPF signals.
Confidentiality & Disclosure
Exposing secrets, API bearer tokens, cloud metadata (169.254.169.254), or unencrypted pod traffic in transit.
Resource Starvation & DoS
Exhausting API rate limits, etcd IOPS/disk space, worker node CPU/memory quotas, or iptables connection tables.
Privilege Escalation
Escalating from unprivileged container process to host root OS, or from developer namespace Role to cluster-admin.
Production Hardening Controls & Detection Probes
Default-Deny Ingress & Egress
Enforces zero-trust isolation on the flat CNI network. Microservices communicate strictly over whitelisted ports and explicit label selectors.
PSA Restricted Profile
Enforces non-root execution, drops all Linux capabilities, and requires read-only root filesystems and RuntimeDefault seccomp profiles.
etcd Envelope Encryption
Encrypts all Secret and ConfigMap resources at rest in etcd using external cloud KMS plugins (AWS KMS, Cloud KMS, Vault) with DEK caching.
Kyverno & Admission Policies
Enforces declarative governance policies across all namespaces, rejecting privileged containers and validating resource quotas in real time.
Falco & Tetragon Probes
Real-time kernel syscall tracing detecting reverse shells, namespace escapes (sys_setns), and IMDS credential access with automated Sigkill.
Cosign Cryptographic Signing
Validates digital signatures and SLSA provenance attestations during image pull, preventing backdoored container images from ever running.
IMDSv2 Hop Limit = 1
Enforces session token authorization and limits IP TTL hop count so link-local metadata requests cannot traverse container bridge interfaces.
RequestResponse Audit Logging
Captures all administrative mutations, secret reads, and exec requests in tamper-evident audit logs streamed to external SIEM storage.
Seccomp RuntimeDefault
Blocks over 60 high-risk Linux system calls (ptrace, bpf, mount, reboot) inside all workload containers.
AppArmor & SELinux Mandatory Access
Enforces kernel Mandatory Access Control profiles that prevent container breakouts, socket hijacking, and unauthorized sensitive directory access.
Multi-Engine Policy-as-Code Library
Select your enforcement standard: Kyverno (declarative YAML & Sigstore Cosign verification), In-Tree CEL (ValidatingAdmissionPolicy Kubernetes 1.30+ GA zero-latency in-apiserver evaluation), or OPA Gatekeeper (Rego ConstraintTemplate). Toggle engines per card or inspect directly in the interactive slide-over drawer.
Disallow Privileged Containers
Blocks workloads declaring privileged: true and host namespace sharing (hostPID, hostIPC, hostNetwork) to neutralize container-to-host breakouts (P4 / CVE-2024-21626).
pattern:
spec:
=(hostPID): false
containers:
- securityContext:
=(privileged): false
Require Read-Only Root Filesystem
Enforces readOnlyRootFilesystem: true across all containers. Attackers exploiting RCE cannot download malware, compile rootkits, or alter binary packages (P1 / AV01).
pattern:
spec:
containers:
- securityContext:
readOnlyRootFilesystem: true
Verify Cryptographic Signatures
Intercepts image pulls at the admission webhook, cryptographically verifying Sigstore Cosign signatures and SLSA build attestations before workloads deploy to cluster nodes (P3 / AV15).
verifyImages:
- imageReferences: ["ghcr.io/myorg/*"]
attestors:
- entries:
- keys:
publicKeys: |- ...
Restrict ServiceAccount Automount
Enforces automountServiceAccountToken: false on pods. Prevents adversaries from exfiltrating projected JWT bearer tokens to execute control plane API discovery (P2 / AV02).
pattern:
spec:
automountServiceAccountToken: false
Block Cloud Metadata (IMDS)
Automatically generates an egress NetworkPolicy denying link-local address 169.254.169.254/32 upon Namespace creation, blocking AWS/GCP/Azure instance role theft (P5 / AV10).
generate:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
data:
spec:
policyTypes: ["Egress"]
Require Non-Root Execution
Rejects any pod configuration running as root (UID 0) by validating runAsNonRoot: true, ensuring containers run under unprivileged Unix UIDs.
pattern:
spec:
securityContext:
runAsNonRoot: true
Drop ALL POSIX Capabilities
Strips all POSIX capabilities (capabilities.drop: ["ALL"]) to eliminate dangerous kernel privileges (CAP_SYS_ADMIN, CAP_NET_RAW, CAP_DAC_OVERRIDE).
pattern:
spec:
containers:
- securityContext:
capabilities:
drop: ["ALL"]
Auto-Generate Default-Deny NetPol
Watches for new Namespace objects and automatically generates synchronized default-deny ingress and egress NetworkPolicies to lock down the flat CNI network.
generate:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
name: default-deny-all
Cluster Hardening Scorecard & Posture Auditor
Audit your Kubernetes cluster security against 20 enterprise controls across 5 core security domains. Toggle controls to compute your live Posture Rating, test CLI verification commands, and dynamically export unified remediation policy bundles (Kyverno, In-Tree CEL, or OPA Gatekeeper) or download a formal compliance audit report.
MITRE ATT&CK® for Containers Matrix Heatmap
Explore the 10 tactical container phases from Initial Access to Impact. Each adversary technique is linked to real Kubernetes attack scenarios, defense controls, detection signatures, and interactive nodes in the architecture diagram. Filter by tactical phase, search by technique name or ID, and export an official MITRE ATT&CK Navigator Layer JSON.
Red/Blue Team Attack Simulation Playbooks
Validate your cluster's defense posture using real, executable attack scripts and counter-measure verifications across all 6 threat model attack scenarios (P1 to P6). Switch between Red Team (offensive simulation) and Blue Team (defensive validation) modes, copy terminal commands with 1 click, or download complete runnable Bash scripts.
Playbook 1: Ingress RCE & Malware Drop Containment
1-Click Production Security Bundles
Deploy enterprise Kubernetes defense guardrails in seconds. Each bundle compiles battle-tested YAML configurations, NetworkPolicies, and eBPF detection rules into unified downloadable manifests ready to pipe directly into kubectl apply -f.
Kyverno Zero-Trust Suite
Enforce PSS Restricted, drop all Linux capabilities, require non-root execution, disallow automounting SA tokens, and auto-generate default-deny NetworkPolicies across all tenant namespaces.
In-Tree CEL Admission Suite
Zero-latency in-apiserver ValidatingAdmissionPolicy bindings evaluating Common Expression Language rules without admission webhook latency or external controller dependencies.
Zero-Trust NetworkPolicy Suite
Tiered CNI architecture locking down pod-to-pod network scanning: default-deny all, CoreDNS allowlist, explicit Cloud IMDS 169.254.169.254 denial, and ingress gateway routing.
Falco eBPF Threat Detection
Real-time kernel syscall tracing rules for interactive shell spawns, rootfs tampering in /bin, nsenter breakout pivots, cloud IMDS reconnaissance, and cryptomining pool traffic.
CIS Benchmark Hardening Suite
Production Pod Security Standards (PSS) Restricted labels, Kubernetes API Server advanced audit policy manifest, and Seccomp RuntimeDefault profile configuration.
Incident Response & Containment Runbooks
Emergency step-by-step containment procedures for SecOps, Platform, and SRE on-call engineers. Rapidly quarantine compromised pods, sever cloud IMDS exfiltration routes, capture live forensic memory checkpoints, and cordon compromised nodes during an active breach.
Automated Elixir Pipeline for Draw.io Compilation
KubeDaily features a built-in Mix task that watches and compiles .drawio XML diagram files into web-optimized, high-resolution vector SVGs and Retina-ready PNG assets using local Playwright and the official diagrams.net GraphViewer rendering engine.
# Compile all 4 threat model diagram sheets
mix kubedaily.drawio
# Compile a custom diagram with 2x Retina PNG export
mix kubedaily.drawio path/to/architecture.drawio --scale 2 --out-dir priv/static/kubedaily/images