SlideShare a Scribd company logo
Hijack a Kubernetes Cluster – a Walkthrough
Nico Meisenzahl
• Senior Cloud & DevOps Consultant at white duck
• Microsoft MVP, GitLab Hero
• Cloud Native, Kubernetes & Azure
© white duck GmbH 2022
Phone: +49 8031 230159 0
Email: nico.meisenzahl@whiteduck.de
Twitter: @nmeisenzahl
LinkedIn: https://www.linkedin.com/in/nicomeisenzahl
Blog: https://meisenzahl.org
About this talk
• this is not an in-depth security talk
• it should make you aware of common attack vectors and
how to prevent them
• you will see demos on how to hijack a cluster
• you will learn how to prevent those with common best practices
• one more slide, then we will start hijacking
• https://github.com/nmeisenzahl/hijack-kubernetes
© white duck GmbH 2022
What we will do
© white duck GmbH 2022
Security quick wins through the DevOps cycle
© white duck GmbH 2022
Ensure secure application code
• automate and enforce code checks
• schedule dependency scanning
• e.g. Dependabot
• enforce Static Application Security Testing (SAST) in PRs
• scans your code to identify potential security vulnerabilities
• more details: https://owasp.org/www-
community/Source_Code_Analysis_Tools
© white duck GmbH 2022
Ensure secure application code
• automate and enforce code checks
• schedule dependency scanning
• e.g. Dependabot
• enforce Static Application Security Testing (SAST) in PRs
• scans your code to identify potential security vulnerabilities
• more details: https://owasp.org/www-
community/Source_Code_Analysis_Tools
© white duck GmbH 2022
Would have shown
the possibility of code
injection
Build secure container images
• build secure/small container images – less is more
• do only include required dependencies (no debugging tools!)
• use self-contained binaries or “distroless” if possible
• https://github.com/GoogleContainerTools/distroless
• otherwise, use a small and secure Linux distro
• use and enforce SAST for validating your Dockerfiles
• scan your container images (on build and regularly)
© white duck GmbH 2022
Build secure container images
• build secure/small container images – less is more
• do only include required dependencies (no debugging tools!)
• use self-contained binaries or “distroless” if possible
• https://github.com/GoogleContainerTools/distroless
• otherwise, use a small and secure Linux distro
• use and enforce SAST for validating your Dockerfiles
• scan your container images (on build and regularly)
© white duck GmbH 2022
Would have made it
much harder to
hijack the container
and further expend
Ensure secure deployment code
• as important as secure application code and Dockerfiles
• validate your deployment manifests using SAST
• and enforce them via PRs
• can help you to implement best practices like denying
• containers running as root
• mounting hostPath
• …
© white duck GmbH 2022
Ensure secure deployment code
• as important as secure application code and Dockerfiles
• validate your deployment manifests using SAST
• and enforce them via PRs
• can help you to implement best practices like denying
• containers running as root
• mounting hostPath
• …
© white duck GmbH 2022
Would have made it
much harder to hijack
the node
SAST Tooling
• Source code
• https://codeql.github.com
• https://security-code-scan.github.io
• https://securego.io
• Kubernetes manifests
• https://kubesec.io
• https://github.com/aquasecurity/trivy
• Dockerfiles
• https://github.com/aquasecurity/trivy
• Terraform
• https://github.com/tfsec/tfsec
• https://github.com/aquasecurity/trivy
© white duck GmbH 2022
Kubernetes policies
• enforce compliance and governance within clusters
• verifying manifests is not enough!
• examples include enforcement of
• read-only filesystems
• denying hostPath mounts
• denying containers running as root
• …
© white duck GmbH 2022
Kubernetes policies
• enforce compliance and governance within clusters
• verifying manifests is not enough!
• examples include enforcement of
• read-only filesystems
• denying hostPath mounts
• denying containers running as root
• …
© white duck GmbH 2022
Would have made it
much harder to
further hijack the
nodes and cloud
resources
Kubernetes policy Tooling
• Open Policy Agent Gatekeeper
• https://github.com/open-policy-agent/gatekeeper
• Kyverno
• https://kyverno.io
• Azure Policies
• based on Open Policy Agent Gatekeeper
• https://docs.microsoft.com/azure/aks/use-azure-policy
© white duck GmbH 2022
Network Policies
• granular deny or explicitly allow between containers and
ingress/egress of the cluster
• limit egress access to the internet
• limit access between applications/namespaces
• deny access to the Cloud provider metadata service
• https://kubernetes.io/docs/concepts/services-
networking/network-policies
© white duck GmbH 2022
Network Policies
• granular deny or explicitly allow between containers and
ingress/egress of the cluster
• limit egress access to the internet
• limit access between applications/namespaces
• deny access to the Cloud provider metadata service
• https://kubernetes.io/docs/concepts/services-
networking/network-policies
© white duck GmbH 2022
Would have denied
network connections
(reverse shell, Redis,
Internet, metadata
service)
Container Runtime Security
• helps to detect malicious threads and workloads
• untrusted process within container
• a shell is running inside a container
• container process mounting a sensitive path
• a process making outbound network connections
• container runtime security tools like Falco can help
• https://github.com/falcosecurity/falco
© white duck GmbH 2022
Container Runtime Security
• helps to detect malicious threads and workloads
• untrusted process within container
• a shell is running inside a container
• container process mounting a sensitive path
• a process making outbound network connections
• container runtime security tools like Falco can help
• https://github.com/falcosecurity/falco
© white duck GmbH 2022
Would have detect all
our “work” within the
containers
Further best practises
• do not
• share service accounts between applications
• enable higher access levels for the default service account if not
required
• mount service account token if not required
• https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-
account/#use-the-default-service-account-to-access-the-api-server
• review all third-party snippets before applying them
• implement a Web Application Firewall (WAF) to further secure
your application
© white duck GmbH 2022
Further best practises
• do not
• share service accounts between applications
• enable higher access levels for the default service account if not
required
• mount service account token if not required
• https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-
account/#use-the-default-service-account-to-access-the-api-server
• review all third-party snippets before applying them
• implement a Web Application Firewall (WAF) to further secure
your application
© white duck GmbH 2022
Wouldn’t have
allowed us to talk to
the API server
Would have denied
our code injection
Questions?
• Slides: https://www.slideshare.net/nmeisenzahl
• Demo: https://github.com/nmeisenzahl/hijack-kubernetes
© white duck GmbH 2022
Phone: +49 8031 230159 0
Email: nico.meisenzahl@whiteduck.de
Twitter: @nmeisenzahl
LinkedIn: https://www.linkedin.com/in/nicomeisenzahl
Blog: https://meisenzahl.org

More Related Content

PDF
EVE Microservices Platform
PDF
Neues aus dem Docker-Universum
PDF
Virtual GitLab Meetup: How Containerized Pipelines and Kubernetes Can Boost Y...
PDF
Azure Zürich User Group: Azure Kubernetes Service – more than just a managed ...
PDF
DevOpsCon Berlin: Helm vs Operators – Do I Need to Decide?
PPTX
FestiveTechCalendar2021 - Have Yourself An​ Azure Container Registry
PDF
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
PDF
Docker Rosenheim Meetup: Policy & Governance for Kubernetes
EVE Microservices Platform
Neues aus dem Docker-Universum
Virtual GitLab Meetup: How Containerized Pipelines and Kubernetes Can Boost Y...
Azure Zürich User Group: Azure Kubernetes Service – more than just a managed ...
DevOpsCon Berlin: Helm vs Operators – Do I Need to Decide?
FestiveTechCalendar2021 - Have Yourself An​ Azure Container Registry
Enhance Your Kubernetes CI/CD Pipelines With GitLab & Open Source
Docker Rosenheim Meetup: Policy & Governance for Kubernetes

What's hot (20)

PDF
Global Azure Bootcamp: Container, Docker & Kubernetes Basics
PPTX
Securing your Cloud Environment v2
PDF
Web Application Firewall - Friend of your DevOps Chain?
PPTX
Kube Apps in action
PDF
Mihai Criveti - PyCon Ireland - Automate Everything
PDF
Jenkins in the real world - DevOpsCon 2017
PDF
Introduction to Kubernetes Security (Aqua & Weaveworks)
PPTX
Kubernetes Security
PDF
ThoughtWorks Technology Radar Roadshow - Brisbane
PDF
Kubernetes security and you
PPTX
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
PPTX
KubeSecOps
PDF
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
PPTX
Monitoring mayhem - Using Prometheus
PDF
Cloud native development without the toil
PPTX
Continuous delivery applied (RJUG)
PDF
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
PDF
Dockers zero to hero
PPTX
AzDevCom2021 - Bicep vs Terraform
PDF
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
Global Azure Bootcamp: Container, Docker & Kubernetes Basics
Securing your Cloud Environment v2
Web Application Firewall - Friend of your DevOps Chain?
Kube Apps in action
Mihai Criveti - PyCon Ireland - Automate Everything
Jenkins in the real world - DevOpsCon 2017
Introduction to Kubernetes Security (Aqua & Weaveworks)
Kubernetes Security
ThoughtWorks Technology Radar Roadshow - Brisbane
Kubernetes security and you
Microservices and Container Management with NGINX Plus and Mesosphere DC/OS
KubeSecOps
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Monitoring mayhem - Using Prometheus
Cloud native development without the toil
Continuous delivery applied (RJUG)
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
Dockers zero to hero
AzDevCom2021 - Bicep vs Terraform
KUBERNETES AS A FRAMEWORK FOR WRITING DEVOPS & MICROSERVICES TOOLING
Ad

Similar to Hijack a Kubernetes Cluster - a Walkthrough (20)

PPTX
Hijack a Kubernetes Cluster - a Walkthrough
PDF
Container Days: Hijack a Kubernetes Cluster - a Walkthrough
PDF
ContainerConf 2022: Hijack Kubernetes
PDF
KCD Munich 2022: How to Prevent Your Kubernetes Cluster From Being Hacked
PDF
How to Prevent Your Kubernetes Cluster From Being Hacked
PDF
Microsoft DevOps Forum 2021 – DevOps & Security
PDF
KCD Munich 2022: Hijack a Kubernetes Cluster - a Walkthrough
PPTX
Kubernetes and container security
PDF
Container Day Security: How to Prevent Your Kubernetes Cluster From Being Hacked
PDF
How to Prevent Your Kubernetes Cluster From Being Hacked by Nico Meisenzahl
PDF
How to Prevent Your Kubernetes Cluster From Being Hacked by Nico Meisenzahl
PDF
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & O...
PDF
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
PDF
ContainerConf 2022: Kubernetes is awesome - but...
PDF
Secure Your Code Implement DevSecOps in Azure
PDF
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
PDF
DevOpsCon London: How containerized Pipelines can boost your CI/CD
PDF
Effiziente CI/CD-Pipelines – mit den richtigen Tools klappt das
PDF
GitHub Actions 101
PDF
Cloud Love Conference: Kubernetes is awesome, but...
Hijack a Kubernetes Cluster - a Walkthrough
Container Days: Hijack a Kubernetes Cluster - a Walkthrough
ContainerConf 2022: Hijack Kubernetes
KCD Munich 2022: How to Prevent Your Kubernetes Cluster From Being Hacked
How to Prevent Your Kubernetes Cluster From Being Hacked
Microsoft DevOps Forum 2021 – DevOps & Security
KCD Munich 2022: Hijack a Kubernetes Cluster - a Walkthrough
Kubernetes and container security
Container Day Security: How to Prevent Your Kubernetes Cluster From Being Hacked
How to Prevent Your Kubernetes Cluster From Being Hacked by Nico Meisenzahl
How to Prevent Your Kubernetes Cluster From Being Hacked by Nico Meisenzahl
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & O...
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
ContainerConf 2022: Kubernetes is awesome - but...
Secure Your Code Implement DevSecOps in Azure
GitLab London Meetup: How Containerized Pipelines and Kubernetes Can Boost Yo...
DevOpsCon London: How containerized Pipelines can boost your CI/CD
Effiziente CI/CD-Pipelines – mit den richtigen Tools klappt das
GitHub Actions 101
Cloud Love Conference: Kubernetes is awesome, but...
Ad

More from Nico Meisenzahl (15)

PDF
Cloud-Native & Sustainability: How and Why to Build Sustainable Workloads
PDF
Festive Tech Calendar: Festive time with AKS networking
PDF
azdevcom - Hijack a Kubernetes Cluster
PDF
Continuous Lifecycle: Enhance Your Compliance and Governance With Policy-Base...
PDF
Continuous Lifecycle: Hijack Kubernetes
PDF
Hijack a Kubernetes Cluster - a Walkthrough
PDF
GitLab Commit: Enhance your Compliance with Policy-Based CI/CD
PDF
Azure Meetup Hamburg: Production-Ready Terraform Deployments on Azure
PDF
GitLab Commit DevOps: How GitLab Can Save your Kubernetes environment from Be...
PDF
Azure Rosenheim Meetup: Azure Service Operator
PDF
Azure Saturday Hamburg: Containerize Your .NET Microservice - the Right Way!
PDF
Cloud Native Day: Cloud-native Anwendungsentwicklung im Jahr 2021
PDF
Die Evolution von Container Image Builds
PDF
Azure Service Operator - Provision Your Resources in a Cloud-Native Way
PDF
GitLab Commit: Your Attackers Won't Be Happy! How GitLab Can Help You Secure ...
Cloud-Native & Sustainability: How and Why to Build Sustainable Workloads
Festive Tech Calendar: Festive time with AKS networking
azdevcom - Hijack a Kubernetes Cluster
Continuous Lifecycle: Enhance Your Compliance and Governance With Policy-Base...
Continuous Lifecycle: Hijack Kubernetes
Hijack a Kubernetes Cluster - a Walkthrough
GitLab Commit: Enhance your Compliance with Policy-Based CI/CD
Azure Meetup Hamburg: Production-Ready Terraform Deployments on Azure
GitLab Commit DevOps: How GitLab Can Save your Kubernetes environment from Be...
Azure Rosenheim Meetup: Azure Service Operator
Azure Saturday Hamburg: Containerize Your .NET Microservice - the Right Way!
Cloud Native Day: Cloud-native Anwendungsentwicklung im Jahr 2021
Die Evolution von Container Image Builds
Azure Service Operator - Provision Your Resources in a Cloud-Native Way
GitLab Commit: Your Attackers Won't Be Happy! How GitLab Can Help You Secure ...

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Electronic commerce courselecture one. Pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Review of recent advances in non-invasive hemoglobin estimation
NewMind AI Monthly Chronicles - July 2025
Electronic commerce courselecture one. Pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Encapsulation_ Review paper, used for researhc scholars
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
Bridging biosciences and deep learning for revolutionary discoveries: a compr...

Hijack a Kubernetes Cluster - a Walkthrough

  • 1. Hijack a Kubernetes Cluster – a Walkthrough
  • 2. Nico Meisenzahl • Senior Cloud & DevOps Consultant at white duck • Microsoft MVP, GitLab Hero • Cloud Native, Kubernetes & Azure © white duck GmbH 2022 Phone: +49 8031 230159 0 Email: nico.meisenzahl@whiteduck.de Twitter: @nmeisenzahl LinkedIn: https://www.linkedin.com/in/nicomeisenzahl Blog: https://meisenzahl.org
  • 3. About this talk • this is not an in-depth security talk • it should make you aware of common attack vectors and how to prevent them • you will see demos on how to hijack a cluster • you will learn how to prevent those with common best practices • one more slide, then we will start hijacking • https://github.com/nmeisenzahl/hijack-kubernetes © white duck GmbH 2022
  • 4. What we will do © white duck GmbH 2022
  • 5. Security quick wins through the DevOps cycle © white duck GmbH 2022
  • 6. Ensure secure application code • automate and enforce code checks • schedule dependency scanning • e.g. Dependabot • enforce Static Application Security Testing (SAST) in PRs • scans your code to identify potential security vulnerabilities • more details: https://owasp.org/www- community/Source_Code_Analysis_Tools © white duck GmbH 2022
  • 7. Ensure secure application code • automate and enforce code checks • schedule dependency scanning • e.g. Dependabot • enforce Static Application Security Testing (SAST) in PRs • scans your code to identify potential security vulnerabilities • more details: https://owasp.org/www- community/Source_Code_Analysis_Tools © white duck GmbH 2022 Would have shown the possibility of code injection
  • 8. Build secure container images • build secure/small container images – less is more • do only include required dependencies (no debugging tools!) • use self-contained binaries or “distroless” if possible • https://github.com/GoogleContainerTools/distroless • otherwise, use a small and secure Linux distro • use and enforce SAST for validating your Dockerfiles • scan your container images (on build and regularly) © white duck GmbH 2022
  • 9. Build secure container images • build secure/small container images – less is more • do only include required dependencies (no debugging tools!) • use self-contained binaries or “distroless” if possible • https://github.com/GoogleContainerTools/distroless • otherwise, use a small and secure Linux distro • use and enforce SAST for validating your Dockerfiles • scan your container images (on build and regularly) © white duck GmbH 2022 Would have made it much harder to hijack the container and further expend
  • 10. Ensure secure deployment code • as important as secure application code and Dockerfiles • validate your deployment manifests using SAST • and enforce them via PRs • can help you to implement best practices like denying • containers running as root • mounting hostPath • … © white duck GmbH 2022
  • 11. Ensure secure deployment code • as important as secure application code and Dockerfiles • validate your deployment manifests using SAST • and enforce them via PRs • can help you to implement best practices like denying • containers running as root • mounting hostPath • … © white duck GmbH 2022 Would have made it much harder to hijack the node
  • 12. SAST Tooling • Source code • https://codeql.github.com • https://security-code-scan.github.io • https://securego.io • Kubernetes manifests • https://kubesec.io • https://github.com/aquasecurity/trivy • Dockerfiles • https://github.com/aquasecurity/trivy • Terraform • https://github.com/tfsec/tfsec • https://github.com/aquasecurity/trivy © white duck GmbH 2022
  • 13. Kubernetes policies • enforce compliance and governance within clusters • verifying manifests is not enough! • examples include enforcement of • read-only filesystems • denying hostPath mounts • denying containers running as root • … © white duck GmbH 2022
  • 14. Kubernetes policies • enforce compliance and governance within clusters • verifying manifests is not enough! • examples include enforcement of • read-only filesystems • denying hostPath mounts • denying containers running as root • … © white duck GmbH 2022 Would have made it much harder to further hijack the nodes and cloud resources
  • 15. Kubernetes policy Tooling • Open Policy Agent Gatekeeper • https://github.com/open-policy-agent/gatekeeper • Kyverno • https://kyverno.io • Azure Policies • based on Open Policy Agent Gatekeeper • https://docs.microsoft.com/azure/aks/use-azure-policy © white duck GmbH 2022
  • 16. Network Policies • granular deny or explicitly allow between containers and ingress/egress of the cluster • limit egress access to the internet • limit access between applications/namespaces • deny access to the Cloud provider metadata service • https://kubernetes.io/docs/concepts/services- networking/network-policies © white duck GmbH 2022
  • 17. Network Policies • granular deny or explicitly allow between containers and ingress/egress of the cluster • limit egress access to the internet • limit access between applications/namespaces • deny access to the Cloud provider metadata service • https://kubernetes.io/docs/concepts/services- networking/network-policies © white duck GmbH 2022 Would have denied network connections (reverse shell, Redis, Internet, metadata service)
  • 18. Container Runtime Security • helps to detect malicious threads and workloads • untrusted process within container • a shell is running inside a container • container process mounting a sensitive path • a process making outbound network connections • container runtime security tools like Falco can help • https://github.com/falcosecurity/falco © white duck GmbH 2022
  • 19. Container Runtime Security • helps to detect malicious threads and workloads • untrusted process within container • a shell is running inside a container • container process mounting a sensitive path • a process making outbound network connections • container runtime security tools like Falco can help • https://github.com/falcosecurity/falco © white duck GmbH 2022 Would have detect all our “work” within the containers
  • 20. Further best practises • do not • share service accounts between applications • enable higher access levels for the default service account if not required • mount service account token if not required • https://kubernetes.io/docs/tasks/configure-pod-container/configure-service- account/#use-the-default-service-account-to-access-the-api-server • review all third-party snippets before applying them • implement a Web Application Firewall (WAF) to further secure your application © white duck GmbH 2022
  • 21. Further best practises • do not • share service accounts between applications • enable higher access levels for the default service account if not required • mount service account token if not required • https://kubernetes.io/docs/tasks/configure-pod-container/configure-service- account/#use-the-default-service-account-to-access-the-api-server • review all third-party snippets before applying them • implement a Web Application Firewall (WAF) to further secure your application © white duck GmbH 2022 Wouldn’t have allowed us to talk to the API server Would have denied our code injection
  • 22. Questions? • Slides: https://www.slideshare.net/nmeisenzahl • Demo: https://github.com/nmeisenzahl/hijack-kubernetes © white duck GmbH 2022 Phone: +49 8031 230159 0 Email: nico.meisenzahl@whiteduck.de Twitter: @nmeisenzahl LinkedIn: https://www.linkedin.com/in/nicomeisenzahl Blog: https://meisenzahl.org