🚀 Submit a Challenge — SecDim AppSec Village CTF at DEF CON 34 and Win a ROG Xbox Ally

Kubernetes Security for Developers

5h 30mIntermediateKubernetes

Kubernetes secures nothing by default. The service account token is auto-mounted into every pod, every pod can reach every other pod in the cluster, and a wildcard ClusterRole -- the pattern AI tools generate reliably -- gives any compromised workload full control of the cluster and every secret it contains. This course covers the attack paths that run through a real Kubernetes deployment, grounded in real incidents: the Tesla Kubernetes breach, Siloscape malware, SCARLETEEL, IngressNightmare, and the Slow Pisces crypto exchange heist. Each module explains a class of misconfiguration, shows the attack it enables, and gives the manifest or configuration that closes it.

Topics

  1. Introduction

    Lesson5m

    Course overview, learning objectives and syllabus

  2. Exposed Control Plan

    Video20m

    The Exposed Control Plane | The API server, etcd, and kubelet each represent a different path to full cluster control. This module traces how attackers reach each component and what compromise means for every workload running on the cluster, anchored by the 2018 Tesla Kubernetes breach where an unauthenticated dashboard gave attackers unrestricted access to AWS credentials.

  3. Wildcard Permissions and Cluster Takeover

    Video25m

    A ClusterRole with wildcard verbs and resources -- the default pattern AI code generators produce -- gives any compromised pod full access to every resource and secret in the cluster. This module explains how Kubernetes RBAC works, shows how Siloscape malware checked RBAC permissions before spreading to 313 clusters, and shows how to scope roles to the minimum a workload actually needs.

  4. RBAC Hardening Lab

    Lab30m

    A diagnostics service with a command injection vulnerability runs under a wildcard ClusterRole bound to the default service account. Learners extract the auto-mounted service account token through the injection endpoint and use it to read production credentials from another namespace, then harden the RBAC manifest and disable token automounting to contain the blast radius to the pod itself.

  5. Privileged Pods and Container Escape

    Video25m

    Three pod manifest settings -- `privileged: true`, `hostPID`, and `hostPath` -- each remove a different layer of container isolation, together reducing cluster compromise to a single HTTP request. This module walks through what each setting enables for an attacker, anchored by NVIDIAScape (CVE-2025-23266), and shows how SecurityContext fields and Pod Security Admission enforce a hardened baseline at deploy time.

  6. Pod Security Lab

    Lab30m

    A debug server deployed with `privileged: true`, `hostPID`, and a `hostPath` mount gives any attacker who reaches its command injection endpoint complete access to the node filesystem and host processes. Learners read the k3s cluster bootstrap token and escape to the host namespace using nsenter, then harden the pod manifest with a minimal SecurityContext and enforce the Pod Security Admission restricted profile on the namespace.

  7. Unbounded Workloads and Denial of Service

    Lesson20m

    Kubernetes containers run with no resource limits by default, meaning a single vulnerable workload can consume all CPU on a node and starve every other pod scheduled there. This module demonstrates the blast radius of a ReDoS vulnerability in an unbounded container -- the same class of bug that took Cloudflare offline for 27 minutes -- and shows how resource limits, replicas, and LimitRange turn a cluster-wide outage into a contained pod failure.

  8. Resource Limits Lab

    Lab30m

    An email validation service accepts user-supplied regex patterns with no CPU limits and a single replica -- one ReDoS request pins the container and blocks every subsequent request. Learners watch the service go offline from a single curl command, then add CPU and memory limits, increase replicas, and apply a LimitRange to the namespace so the same attack is throttled and the service stays available.

  9. Secrets Stored in Plain Sight

    Lesson20m

    Kubernetes Secrets are base64-encoded, not encrypted -- a distinction that matters when developers commit Secret YAML to version control or store credentials as environment variables. This module explains how a 2023 research scan found 203 sets of valid Fortune 500 registry credentials in public GitHub repositories, traces how secrets reach a running pod, and evaluates etcd encryption at rest and external secrets operators as the real mitigations.

  10. Flat Networks and Lateral Movement

    Video25m

    Kubernetes allows all pod-to-pod traffic by default across every namespace -- the property the SCARLETEEL attacker used to move from a single compromised Jupyter pod to AWS credentials and every node in the cluster. This module demonstrates the flat network in practice, shows how to write NetworkPolicy resources to restrict ingress and egress, and explains where service mesh mTLS adds protection that network policies alone cannot provide.

  11. Network Isolation Lab

    Lab30m

    A private application stores production credentials behind a ClusterIP service in a separate namespace with no NetworkPolicy restricting ingress. Learners create an attacker pod in a different namespace and retrieve the credentials using only the cluster-internal DNS name, then write a NetworkPolicy that denies cross-namespace ingress and verify that the same request is blocked.

  12. Service Account Token Theft

    Video25m

    Kubernetes automatically mounts a service account token into every pod, giving any code running in the pod a credential for the Kubernetes API whether it needs one or not. This module explains how token theft was the pivot point in the 2025 Slow Pisces crypto exchange breach, and shows how to replace ambient tokens with bound service account tokens and cloud workload identity scoped to specific resources.

  13. Unauthenticated Admission Webhooks

    Video25m

    Admission webhooks intercept every manifest before it reaches the cluster, making them both the most powerful enforcement point and a high-value attack surface. This module explains how IngressNightmare (CVE-2025-1974, CVSS 9.8) exploited an unauthenticated webhook to read every secret in 43% of surveyed cloud environments, and shows how Kyverno enforces security baselines at deploy time while the webhook itself must be hardened against the same class of attack.

  14. Undetected Intrusion

    Lesson20m

    The Tesla breach ran for weeks because no audit log captured who accessed which secrets and no runtime tool alerted when a cryptominer started. This module configures Kubernetes audit logging to capture the events that reveal credential abuse and lateral movement, maps each event to the attack patterns from earlier modules, and introduces Falco rules for detecting container escape indicators at runtime.