From Container Escape to Cloud Takeover
Lab-based cloud security assessment covering four attack paths: a privileged hostPID pod escaped to the node with nsenter, deleting the kube-apiserver static pod manifest to crash the control plane, Trivy Operator vulnerability reports piped into BigQuery, and a malicious PR exploiting a pull_request_target workflow that checks out PR code to steal a GCP Workload Identity Federation token via Terraform's external data source during plan. Each section pairs the exploit with defenses (Pod Security Standards, Kyverno/Gatekeeper, Falco rules, split plan/comment workflows, least-privilege service accounts) and ties them into one kill chain.
TL;DR Lab walkthrough of k8s privileged-pod escape, API server manifest deletion, and GCP WIF token theft via pull_request_target + terraform plan, with defenses.
CVEs named here
- CVE-2019-11253
- CVE-2019-1002100
Technologies named here
- nsenter
- Kubernetes
- Falco
- OPA Gatekeeper
- Terraform
- Kyverno
- Pod Security Standards
- GCP Workload Identity Federation with GitHub OIDC
- Trivy Operator
- Google Cloud Storage production bucket
- GKE
- BigQuery and Cloud Logging sink
- kubectl
- gcloud
- GitHub Actions
- Workload Identity Federation
- GCP
- Trivy
Techniques named here
- Persistence simulation
- GitHub Actions pull_request_target abuse
- Exfiltration of token to attacker server
- Pwn Request
- Container escape
Related in Cloud & Infra


Orca Security: GenAI Risks in Cloud Environments
.png)
Google API keys keep working after you delete them
