SlideShare a Scribd company logo
Hijack a Kubernetes Cluster – a Walkthrough
Continuous Lifecycle / Container Conf 2022
Nico Meisenzahl
• Head of DevOps Consulting & Operations
at white duck
• Microsoft MVP, GitLab Hero
• Cloud Native, Kubernetes & Azure
© white duck GmbH 2022
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
• three more slide, then we will start hijacking
• https://github.com/nmeisenzahl/hijack-kubernetes
© white duck GmbH 2022
Why do we need to care about security?
https://www.redhat.com/en/resources/state-kubernetes-security-report
What we will do
© white duck GmbH 2022
Log4Shell
https://www.splunk.com/en_us/surge/log4shell-log4j-response-overview.html
Think about
• ensure secure application / deployment code
• build secure container images
• implement Kubernetes policies
• introduce Kubernetes Network policies
• rely on Container Runtime Security
• many more…
© 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
• Software Bill of Materials (SBOM)
• Dependabot / Renovate
• 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
Build secure container images
• build secure/small container images – less is more
• do only include required dependencies (no debugging tools!)
• use self-contained binaries, “distroless” or “(Un)distro” if
possible
• https://github.com/GoogleContainerTools/distroless
• https://github.com/wolfi-dev/os
• 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, “distroless” or “(Un)distro” if
possible
• https://github.com/GoogleContainerTools/distroless
• https://github.com/wolfi-dev/os
• 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
Would have shown
the possibility of code
injection
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
Tooling
• Source code
• https://codeql.github.com
• https://security-code-scan.github.io
• https://securego.io
• SBOM
• https://github.com/anchore/syft
• https://github.com/anchore/grype
• Dockerfiles
• https://github.com/aquasecurity/trivy
• https://github.com/bridgecrewio/checkov
• Kubernetes manifests
• https://kubesec.io
• https://github.com/aquasecurity/trivy
• https://github.com/bridgecrewio/checkov
• https://github.com/Checkmarx/kics
• Terraform
• https://github.com/tfsec/tfsec
• https://github.com/aquasecurity/trivy
• https://github.com/bridgecrewio/checkov
© 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
• Pod Security Admission
• stable since 1.25
• https://kubernetes.io/docs/concepts/security/pod-security-
admission
• Open Policy Agent Gatekeeper
• https://github.com/open-policy-agent/gatekeeper
• Kyverno
• https://kyverno.io
© 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 of Tetragon can
help
• https://github.com/falcosecurity
• https://github.com/cilium/tetragon
© 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 of Tetragon can
help
• https://github.com/falcosecurity
• https://github.com/cilium/tetragon
© 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
• changed with 1.24
• 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
• changed with 1.24
• 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
Email: nico.meisenzahl@whiteduck.de
Twitter: @nmeisenzahl
LinkedIn: https://www.linkedin.com/in/nicomeisenzahl
Blog: https://meisenzahl.org

More Related Content

PPTX
Hijack a Kubernetes Cluster - a Walkthrough
PDF
Hijack a Kubernetes Cluster - a Walkthrough
PDF
Container Days: Hijack a Kubernetes Cluster - a Walkthrough
PDF
KCD Munich 2022: How to Prevent Your Kubernetes Cluster From Being Hacked
PDF
How to Prevent Your Kubernetes Cluster From Being Hacked
PDF
KCD Munich 2022: Hijack a Kubernetes Cluster - a Walkthrough
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
Hijack a Kubernetes Cluster - a Walkthrough
Hijack a Kubernetes Cluster - a Walkthrough
Container Days: Hijack a Kubernetes Cluster - a Walkthrough
KCD Munich 2022: How to Prevent Your Kubernetes Cluster From Being Hacked
How to Prevent Your Kubernetes Cluster From Being Hacked
KCD Munich 2022: Hijack a Kubernetes Cluster - a Walkthrough
How to Prevent Your Kubernetes Cluster From Being Hacked by Nico Meisenzahl
How to Prevent Your Kubernetes Cluster From Being Hacked by Nico Meisenzahl

Similar to ContainerConf 2022: Hijack Kubernetes (20)

PDF
Container Day Security: How to Prevent Your Kubernetes Cluster From Being Hacked
PPTX
Kubernetes and container security
PDF
The Future of Security and Productivity in Our Newly Remote World
PPTX
Secure development on Kubernetes by Andreas Falk
PPTX
Three Years of Lessons Running Potentially Malicious Code Inside Containers
PDF
Continuous Security: From tins to containers - now what!
PDF
GDG Cloud Southlake 29 Jimmy Mesta OWASP Top 10 for Kubernetes
PDF
Docker London: Container Security
PDF
Hacking Kubernetes Threat Driven Analysis and Defense 1st Edition Andrew Martin
PDF
Securing Containerized Applications: A Primer
PDF
Containerizing your Security Operations Center
ODP
Continuous Security
PPTX
Container security Familiar problems in new technology
PDF
Securing your Kubernetes cluster_ a step-by-step guide to success !
PDF
The Container Security Checklist
PPTX
12 Ways Not to get 'Hacked' your Kubernetes Cluster
PPTX
DevSecOps in a cloudnative world
PDF
DevOpsDaysRiga 2017: Chris Van Tuin - A DevOps State of Mind: Continuous Secu...
PDF
Let's Do Bad Things to Unsecured Containers
PDF
SecDevOps containers
Container Day Security: How to Prevent Your Kubernetes Cluster From Being Hacked
Kubernetes and container security
The Future of Security and Productivity in Our Newly Remote World
Secure development on Kubernetes by Andreas Falk
Three Years of Lessons Running Potentially Malicious Code Inside Containers
Continuous Security: From tins to containers - now what!
GDG Cloud Southlake 29 Jimmy Mesta OWASP Top 10 for Kubernetes
Docker London: Container Security
Hacking Kubernetes Threat Driven Analysis and Defense 1st Edition Andrew Martin
Securing Containerized Applications: A Primer
Containerizing your Security Operations Center
Continuous Security
Container security Familiar problems in new technology
Securing your Kubernetes cluster_ a step-by-step guide to success !
The Container Security Checklist
12 Ways Not to get 'Hacked' your Kubernetes Cluster
DevSecOps in a cloudnative world
DevOpsDaysRiga 2017: Chris Van Tuin - A DevOps State of Mind: Continuous Secu...
Let's Do Bad Things to Unsecured Containers
SecDevOps containers

More from Nico Meisenzahl (20)

PDF
Cloud-Native & Sustainability: How and Why to Build Sustainable Workloads
PDF
Festive Tech Calendar: Festive time with AKS networking
PDF
ContainerConf 2022: Kubernetes is awesome - but...
PDF
Cloud Love Conference: Kubernetes is awesome, but...
PDF
Azure Zürich User Group: Azure Kubernetes Service – more than just a managed ...
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
Microsoft DevOps Forum 2021 – DevOps & Security
PDF
DevOpsCon Berlin: Helm vs Operators – Do I Need to Decide?
PDF
GitLab Commit DevOps: How GitLab Can Save your Kubernetes environment from Be...
PDF
GitHub Actions 101
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
Cloud-Native & Sustainability: How and Why to Build Sustainable Workloads
Festive Tech Calendar: Festive time with AKS networking
ContainerConf 2022: Kubernetes is awesome - but...
Cloud Love Conference: Kubernetes is awesome, but...
Azure Zürich User Group: Azure Kubernetes Service – more than just a managed ...
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
Microsoft DevOps Forum 2021 – DevOps & Security
DevOpsCon Berlin: Helm vs Operators – Do I Need to Decide?
GitLab Commit DevOps: How GitLab Can Save your Kubernetes environment from Be...
GitHub Actions 101
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

Recently uploaded (20)

PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Big Data Technologies - Introduction.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
Building Integrated photovoltaic BIPV_UPV.pdf
Empathic Computing: Creating Shared Understanding
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Digital-Transformation-Roadmap-for-Companies.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Big Data Technologies - Introduction.pptx
Review of recent advances in non-invasive hemoglobin estimation
CIFDAQ's Market Insight: SEC Turns Pro Crypto
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Unlocking AI with Model Context Protocol (MCP)
Reach Out and Touch Someone: Haptics and Empathic Computing

ContainerConf 2022: Hijack Kubernetes

  • 1. Hijack a Kubernetes Cluster – a Walkthrough Continuous Lifecycle / Container Conf 2022
  • 2. Nico Meisenzahl • Head of DevOps Consulting & Operations at white duck • Microsoft MVP, GitLab Hero • Cloud Native, Kubernetes & Azure © white duck GmbH 2022 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 • three more slide, then we will start hijacking • https://github.com/nmeisenzahl/hijack-kubernetes © white duck GmbH 2022
  • 4. Why do we need to care about security? https://www.redhat.com/en/resources/state-kubernetes-security-report
  • 5. What we will do © white duck GmbH 2022
  • 7. Think about • ensure secure application / deployment code • build secure container images • implement Kubernetes policies • introduce Kubernetes Network policies • rely on Container Runtime Security • many more… © white duck GmbH 2022
  • 8. Security quick wins through the DevOps cycle © white duck GmbH 2022
  • 9. Ensure secure application code • automate and enforce code checks • schedule dependency scanning • Software Bill of Materials (SBOM) • Dependabot / Renovate • 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
  • 10. Build secure container images • build secure/small container images – less is more • do only include required dependencies (no debugging tools!) • use self-contained binaries, “distroless” or “(Un)distro” if possible • https://github.com/GoogleContainerTools/distroless • https://github.com/wolfi-dev/os • 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
  • 11. Build secure container images • build secure/small container images – less is more • do only include required dependencies (no debugging tools!) • use self-contained binaries, “distroless” or “(Un)distro” if possible • https://github.com/GoogleContainerTools/distroless • https://github.com/wolfi-dev/os • 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 Would have shown the possibility of code injection
  • 12. 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
  • 13. 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
  • 14. Tooling • Source code • https://codeql.github.com • https://security-code-scan.github.io • https://securego.io • SBOM • https://github.com/anchore/syft • https://github.com/anchore/grype • Dockerfiles • https://github.com/aquasecurity/trivy • https://github.com/bridgecrewio/checkov • Kubernetes manifests • https://kubesec.io • https://github.com/aquasecurity/trivy • https://github.com/bridgecrewio/checkov • https://github.com/Checkmarx/kics • Terraform • https://github.com/tfsec/tfsec • https://github.com/aquasecurity/trivy • https://github.com/bridgecrewio/checkov © white duck GmbH 2022
  • 15. 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
  • 16. 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
  • 17. Kubernetes policy tooling • Pod Security Admission • stable since 1.25 • https://kubernetes.io/docs/concepts/security/pod-security- admission • Open Policy Agent Gatekeeper • https://github.com/open-policy-agent/gatekeeper • Kyverno • https://kyverno.io © white duck GmbH 2022
  • 18. 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
  • 19. 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)
  • 20. 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 of Tetragon can help • https://github.com/falcosecurity • https://github.com/cilium/tetragon © white duck GmbH 2022
  • 21. 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 of Tetragon can help • https://github.com/falcosecurity • https://github.com/cilium/tetragon © white duck GmbH 2022 Would have detect all our “work” within the containers
  • 22. 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 • changed with 1.24 • review all third-party snippets before applying them • implement a Web Application Firewall (WAF) to further secure your application © white duck GmbH 2022
  • 23. 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 • changed with 1.24 • 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
  • 24. Questions? • Slides: https://www.slideshare.net/nmeisenzahl • Demo: https://github.com/nmeisenzahl/hijack-kubernetes © white duck GmbH 2022 Email: nico.meisenzahl@whiteduck.de Twitter: @nmeisenzahl LinkedIn: https://www.linkedin.com/in/nicomeisenzahl Blog: https://meisenzahl.org