SlideShare a Scribd company logo
Introducing the
OWASP Top 10
for Kubernetes
Jimmy Mesta
CTO / Co-Founder, KSOC
@jimmesta
jimmy@ksoc.com
Nothing to see here
Move along
OWASP 🤝
Kubernetes
owasp.org/www-project-kubernetes-top-ten
hp://owasp.org/www-project-kubernetes-secu
rity-testing-guide
cheatsheetseries.owasp.org/cheatsheets/Dock
er_Security_Cheat_Sheet.html
cheatsheetseries.owasp.org/cheatsheets/Kuber
netes_Security_Cheat_Sheet.html
Another Top Ten?
Kubernetes is highly
configurable, mature, and has
no shortage of success in
production. Security blind
spots still exist and are
presenting serious challenges
for security teams at scale.
owasp.org/www-project-kubernetes-top-ten
@jimmesta
UNSECURED K8S CREDENTIALS
CLUSTER PRIVILEGE ESCALATION
OPEN API
Tesla
Shopify
Dero Miner
Abuse of Kubernetes at scale is already here
RECENT K8S ECOSYSTEM CVES
Clusternet
CubeFS
Jenkins plugin Crossplane
NOTABLE BREACHES
RBAC ISSUE MANAGING K8S AT SCALE
OVERLY PERMISSIVE RBAC
UNMASKED VALUES
GOLANG LIBRARIES FOR CONTROL PLANE
LEVERAGING RBAC FOR PERSISTENCE
RBAC Buster
runc
CVE-2024-21626 - Critical Container Breakout
GKE
RBAC Privilege Escalation and Abuse
@jimmesta
K00 | Introduction
K01 | Insecure Workload Configurations
K02 | Supply Chain Vulnerabilities
K03 | Overly Permissive RBAC Configurations
K04 | Lack of Centralized Policy Enforcement
K05 | Inadequate Logging and Monitoring
K06 | Broken Authentication Mechanisms
K07 | Missing Network Segmentation Controls
K08 | Secrets Management Failures
K09 | Misconfigured Cluster Components
K10 | Outdated and Vulnerable Kubernetes Components
@jimmesta
1. Insecure
Workload
Configurations
Bring on the YAML
What’s the problem?
Misconfigurations top the charts when it
comes to security issues. The 2021
Kubernetes Security Survey from Redhat
stated that nearly 60% of respondents
have experienced a misconfiguration
incident in their Kubernetes environments
in the last 12 months.
@jimmesta
How can we prevent it?
@jimmesta
What tools are on oer to help us?
@jimmesta
2. Supply chain
vulnerabilities
How can we prevent it?
@jimmesta
Software Bill of Materials (SBOM)
Image Signing (hps://github.com/sigstore/cosign)
Image Composition
Image Runtime Verification (rad.security/catalog)
Policy enforcement
How can we prevent it?
@jimmesta
3. Overly
permissive RBAC
Configuration
@jimmesta
What is the problem?
Role-Based Access Control enables fine
grained access for users, groups, and
service accounts within Kubernetes. RBAC
can be extremely diicult to scope
appropriately which opens up additional
privileges.
@jimmesta
@jimmesta
@jimmesta
@jimmesta
How can we prevent it?
▦ Reduce direct cluster access by end users when possible
▦ Don’t use Service Account Tokens outside of the cluster
▦ Avoid automatically mounting the default service account token
▦ Audit RBAC included with installed third-party components
▦ Utilize RoleBindings to limit scope of permissions to particular
namespaces vs. cluster-wide RBAC policies
@jimmesta
@jimmesta
How can we prevent it?
4. Lack of
centralised policy
enforcement
@jimmesta
What is the problem?
Distributing and enforcing security
policies across multiple clusters, clouds,
and risk tolerances quickly becomes
unmanageable for security teams. The
inability to detect, remediate, and prevent
misconfigurations from a central location
can leave clusters open to compromise.
@jimmesta
Example aack
scenario
Container breakout
in a single tweet! 🤯
@jimmesta
How can we
prevent it?
@jimmesta
5. Inadequate
logging &
monitoring
@jimmesta
What is the problem?
A Kubernetes Environment has the ability
to generate logs at a variety of levels from
many dierent components. When logs
are not captured, stored, or actively
monitored aackers have the ability to
exploit vulnerabilities while going largely
undetected.
@jimmesta
How can we prevent it?
Start reviewing the Kubernetes audit logs!
Centralised logging (events, containers,
cloud logs, traces etc)
Runtime detection using tools such as falco.org
@jimmesta
6. Broken
authentication
@jimmesta
What is the problem?
Kubernetes supports a number
of authentication mechanisms,
however many these are likely only
suitable for non-production or small
clusters and can introduce
significant security risks.
@jimmesta
What is the problem?
Kubernetes supports a number
of authentication mechanisms,
however many these are likely only
suitable for non-production or small
clusters and can introduce
significant security risks.
@jimmesta
@jimmesta
How can we prevent it?
▦ Avoid using certificates for end-user authentication
▦ Enforce MFA when possible
▦ Don’t use Service Account tokens from outside of the cluster
▦ Authenticate users and external services using short-lived tokens
@jimmesta
7. Missing
network
segmentation
@jimmesta
What is the problem?
A Wordpress pod is compromised on a cluster that has no
network segmentation and the aacker is able to utilize
built in networking utilities such as dig and curl to explore
the network.
They discover an internally accessible API running on port
6379 which is typically Redis. They are able to probe the
Redis microservice which was intended to be internal and
only used by backend APIs using curl.
Data is stolen and modified.
@jimmesta
How can we prevent it?
▦ Native Controls (Multi-Cluster)
▦ Native Controls (NetworkPolicies)
▦ Service Mesh
@jimmesta
@jimmesta
8. Secret
management
failures
@jimmesta
What is the problem?
An aacker compromises a web application running in a
Kubernetes and is able to get a shell. They run the following
command to ensure Kubernetes secrets are mounted:
ls /var/run/secrets/kubernetes.io/serviceaccount
The aacker installs kubectl in the compromised pod which
by default will aempt to use the default service account
located in the above directory. The aacker can then
communicate with the Kubernetes API from the inside
leveraging the default service account’s RBAC access.
@jimmesta
How can we prevent it?
▦ Encrypt secrets at rest
▦ Ensure logging and auditing is in place
▦ Think about leveraging runtime detection
@jimmesta
Useful tools for secrets
@jimmesta
hps://github.com/mozilla/sops
hps://github.com/bitnami-labs/sealed-secrets
hps://github.com/hashicorp/vault-k8s
9. Misconfigured
cluster
components
@jimmesta
What is the problem?
An aacker compromises a web application running in a
Kubernetes and is able to get a shell. They run the following
command to ensure Kubernetes secrets are mounted:
ls /var/run/secrets/kubernetes.io/serviceaccount
The aacker installs kubectl in the compromised pod which
by default will aempt to use the default service account
located in the above directory. The aacker can then
communicate with the Kubernetes API from the inside
leveraging the default service account’s RBAC access.
@jimmesta
What is the problem?
The components the encompass
Kubernetes itself are highly
configurable. The Kubelet running
on each node are an example of a
critical piece of infrastructure that
requires hardening. This is
especially true in “DIY” clusters.
@jimmesta
@jimmesta
@jimmesta
How can we prevent it?
https://github.com/ksoclabs/kbom
10. Outdated/vuln
k8s components
@jimmesta
What is the problem?
@jimmesta
https://ksoc.com/blog/addressing-the-new-kubernetes-cves-in-ingress-nginx
https://ksoc.com/blog/addressing-curl-vulnerabilities-cve-2023-3854-and-cve-2023-38545
Some questions
to ask yourself…
@jimmesta
Are you using hardened base images?
Are your images being scanned before being used?
Are your images running as root?
Are your images running as a consistent user and group?
Do you have a labelling taxonomy for resources in your cluster?
Are you enforcing policies using Admission Control?
Have you audited the RBAC configuration of your cluster?
Do you have a process for regularly upgrading Kubernetes?
Do you have a process for regularly upgrading your third party tooling?
Thanks,
happy to take
questions …
ksoc.com
Jimmy Mesta,
Co-founder & CTO @ KSOC
@jimmesta
jimmy@ksoc.com

More Related Content

PPTX
12 Ways Not to get 'Hacked' your Kubernetes Cluster
Suman Chakraborty
 
PDF
K8 Meetup_ K8s secrets management best practices (Git Guardian).pdf
MichaelOLeary82
 
PDF
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
Lacework
 
PDF
Containers At-Risk A Review of 21,000 Cloud Environments
Lacework
 
PDF
Containers at risk a review of 21,000 cloud environments
dhubbard858
 
PDF
Kubernetes in 15 minutes
rhirschfeld
 
PDF
Cloud orchestration risks
Glib Pakharenko
 
PDF
How we can do Multi-Tenancy on Kubernetes
Opsta
 
12 Ways Not to get 'Hacked' your Kubernetes Cluster
Suman Chakraborty
 
K8 Meetup_ K8s secrets management best practices (Git Guardian).pdf
MichaelOLeary82
 
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
Lacework
 
Containers At-Risk A Review of 21,000 Cloud Environments
Lacework
 
Containers at risk a review of 21,000 cloud environments
dhubbard858
 
Kubernetes in 15 minutes
rhirschfeld
 
Cloud orchestration risks
Glib Pakharenko
 
How we can do Multi-Tenancy on Kubernetes
Opsta
 

Similar to GDG Cloud Southlake 29 Jimmy Mesta OWASP Top 10 for Kubernetes (20)

PDF
Secure your K8s cluster from multi-layers
Jiantang Hao
 
PDF
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
DevOpsDays Riga
 
PPTX
Kubernetes for the VI Admin
Kendrick Coleman
 
PDF
Appsecco Kubernetes Hacking Masterclass Presentation Slides
Appsecco
 
PPTX
Kubernetes Security
Karthik Gaekwad
 
PDF
Production ready kubernetes
Arnaud MAZIN
 
PDF
Successful K8S Platforms in Airgapped Environments
KubernetesCommunityD
 
PDF
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Mydbops
 
PPTX
The State of Kubernetes Security
Jimmy Mesta
 
PDF
Security Patterns for Microservice Architectures - Oktane20
Matt Raible
 
PDF
Dok Talks #140 - Data protection of stateful environment
DoKC
 
PDF
DevSecCon Lightning 2021- Container defaults are a hackers best friend
Eric Smalling
 
PDF
Kubernetes 201: Taking your Managed Kubernetes service to the next level
OVHcloud
 
PDF
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Peter Ss
 
PPTX
10 tips for Cloud Native Security
Karthik Gaekwad
 
PDF
Kubernetes at Google Cloud Community Copenhagen
Kevin Simper
 
PDF
Kubernetes Ransomware Threat - How to Protect and Recover.pdf
Urolime Technologies
 
PDF
KubeCon EU 2020 - Provider vSphere All Things vSphere Working Group
David vonThenen
 
PPTX
Kubernetes 101 VMworld 2019 workshop slides
Simone Morellato
 
PDF
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Malcolm Duncanson, CISSP
 
Secure your K8s cluster from multi-layers
Jiantang Hao
 
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
DevOpsDays Riga
 
Kubernetes for the VI Admin
Kendrick Coleman
 
Appsecco Kubernetes Hacking Masterclass Presentation Slides
Appsecco
 
Kubernetes Security
Karthik Gaekwad
 
Production ready kubernetes
Arnaud MAZIN
 
Successful K8S Platforms in Airgapped Environments
KubernetesCommunityD
 
Scaling managed MySQL Platform in Flipkart - (Sachin Japate - Flipkart) - Myd...
Mydbops
 
The State of Kubernetes Security
Jimmy Mesta
 
Security Patterns for Microservice Architectures - Oktane20
Matt Raible
 
Dok Talks #140 - Data protection of stateful environment
DoKC
 
DevSecCon Lightning 2021- Container defaults are a hackers best friend
Eric Smalling
 
Kubernetes 201: Taking your Managed Kubernetes service to the next level
OVHcloud
 
Sf bay area Kubernetes meetup dec8 2016 - deployment models
Peter Ss
 
10 tips for Cloud Native Security
Karthik Gaekwad
 
Kubernetes at Google Cloud Community Copenhagen
Kevin Simper
 
Kubernetes Ransomware Threat - How to Protect and Recover.pdf
Urolime Technologies
 
KubeCon EU 2020 - Provider vSphere All Things vSphere Working Group
David vonThenen
 
Kubernetes 101 VMworld 2019 workshop slides
Simone Morellato
 
Masterless Puppet Using AWS S3 Buckets and IAM Roles
Malcolm Duncanson, CISSP
 
Ad

More from James Anderson (20)

PDF
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
PDF
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
PDF
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
PDF
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
James Anderson
 
PDF
GDG Cloud Southlake #40: Brandon Stokes: How to Build a Great Product
James Anderson
 
PDF
GDG Cloud Southlake #39 Jacek Ostrowski: Platform Engineering Useful Models
James Anderson
 
PDF
GDG Cloud Southlake #38: Alex Snihovyi: The LastDevOps Way for Code Reviews
James Anderson
 
PDF
GDG Cloud Southlake #36: Kyle Forster: AI and Modern Workflow Automation: Aut...
James Anderson
 
PDF
GDG Cloud Southlake #35: Aravind Iyengar: The Role of AI in Cyber Risk Manage...
James Anderson
 
PDF
Alt. GDG Cloud Southlake #35_ Aravind Iyengar_ The Role of AI in Cyber Risk M...
James Anderson
 
PDF
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
James Anderson
 
PDF
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
PDF
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
PDF
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
James Anderson
 
PDF
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
James Anderson
 
PDF
GDG Cloud Southlake 30 Brian Demers Breeding 10x Developers with Developer Pr...
James Anderson
 
PDF
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson
 
PDF
GDG SLK - Why should devs care about container security.pdf
James Anderson
 
PDF
GraphQL Insights Deck ( Sabre_GDG - Sept 2023).pdf
James Anderson
 
PDF
GDG Cloud Southlake #25: Jacek Ostrowski & David Browne: Sabre's Journey to ...
James Anderson
 
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
GDG Cloud Southlake #41: Shay Levi: Beyond the Hype:How Enterprises Are Using AI
James Anderson
 
GDG Cloud Southlake #40: Brandon Stokes: How to Build a Great Product
James Anderson
 
GDG Cloud Southlake #39 Jacek Ostrowski: Platform Engineering Useful Models
James Anderson
 
GDG Cloud Southlake #38: Alex Snihovyi: The LastDevOps Way for Code Reviews
James Anderson
 
GDG Cloud Southlake #36: Kyle Forster: AI and Modern Workflow Automation: Aut...
James Anderson
 
GDG Cloud Southlake #35: Aravind Iyengar: The Role of AI in Cyber Risk Manage...
James Anderson
 
Alt. GDG Cloud Southlake #35_ Aravind Iyengar_ The Role of AI in Cyber Risk M...
James Anderson
 
GDG Cloud Southlake #34: Neatsun Ziv: Automating Appsec
James Anderson
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
James Anderson
 
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
James Anderson
 
GDG Cloud Southlake 30 Brian Demers Breeding 10x Developers with Developer Pr...
James Anderson
 
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson
 
GDG SLK - Why should devs care about container security.pdf
James Anderson
 
GraphQL Insights Deck ( Sabre_GDG - Sept 2023).pdf
James Anderson
 
GDG Cloud Southlake #25: Jacek Ostrowski & David Browne: Sabre's Journey to ...
James Anderson
 
Ad

Recently uploaded (20)

PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Doc9.....................................
SofiaCollazos
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 

GDG Cloud Southlake 29 Jimmy Mesta OWASP Top 10 for Kubernetes

  • 1. Introducing the OWASP Top 10 for Kubernetes Jimmy Mesta CTO / Co-Founder, KSOC @jimmesta [email protected]
  • 2. Nothing to see here Move along
  • 4. Another Top Ten? Kubernetes is highly configurable, mature, and has no shortage of success in production. Security blind spots still exist and are presenting serious challenges for security teams at scale. owasp.org/www-project-kubernetes-top-ten @jimmesta
  • 5. UNSECURED K8S CREDENTIALS CLUSTER PRIVILEGE ESCALATION OPEN API Tesla Shopify Dero Miner Abuse of Kubernetes at scale is already here RECENT K8S ECOSYSTEM CVES Clusternet CubeFS Jenkins plugin Crossplane NOTABLE BREACHES RBAC ISSUE MANAGING K8S AT SCALE OVERLY PERMISSIVE RBAC UNMASKED VALUES GOLANG LIBRARIES FOR CONTROL PLANE LEVERAGING RBAC FOR PERSISTENCE RBAC Buster runc CVE-2024-21626 - Critical Container Breakout GKE RBAC Privilege Escalation and Abuse
  • 6. @jimmesta K00 | Introduction K01 | Insecure Workload Configurations K02 | Supply Chain Vulnerabilities K03 | Overly Permissive RBAC Configurations K04 | Lack of Centralized Policy Enforcement K05 | Inadequate Logging and Monitoring K06 | Broken Authentication Mechanisms K07 | Missing Network Segmentation Controls K08 | Secrets Management Failures K09 | Misconfigured Cluster Components K10 | Outdated and Vulnerable Kubernetes Components @jimmesta
  • 8. What’s the problem? Misconfigurations top the charts when it comes to security issues. The 2021 Kubernetes Security Survey from Redhat stated that nearly 60% of respondents have experienced a misconfiguration incident in their Kubernetes environments in the last 12 months. @jimmesta
  • 9. How can we prevent it? @jimmesta
  • 10. What tools are on oer to help us? @jimmesta
  • 12. How can we prevent it? @jimmesta Software Bill of Materials (SBOM) Image Signing (hps://github.com/sigstore/cosign) Image Composition Image Runtime Verification (rad.security/catalog) Policy enforcement
  • 13. How can we prevent it? @jimmesta
  • 15. What is the problem? Role-Based Access Control enables fine grained access for users, groups, and service accounts within Kubernetes. RBAC can be extremely diicult to scope appropriately which opens up additional privileges. @jimmesta
  • 19. How can we prevent it? ▦ Reduce direct cluster access by end users when possible ▦ Don’t use Service Account Tokens outside of the cluster ▦ Avoid automatically mounting the default service account token ▦ Audit RBAC included with installed third-party components ▦ Utilize RoleBindings to limit scope of permissions to particular namespaces vs. cluster-wide RBAC policies @jimmesta
  • 20. @jimmesta How can we prevent it?
  • 21. 4. Lack of centralised policy enforcement @jimmesta
  • 22. What is the problem? Distributing and enforcing security policies across multiple clusters, clouds, and risk tolerances quickly becomes unmanageable for security teams. The inability to detect, remediate, and prevent misconfigurations from a central location can leave clusters open to compromise. @jimmesta
  • 23. Example aack scenario Container breakout in a single tweet! 🤯 @jimmesta
  • 24. How can we prevent it? @jimmesta
  • 26. What is the problem? A Kubernetes Environment has the ability to generate logs at a variety of levels from many dierent components. When logs are not captured, stored, or actively monitored aackers have the ability to exploit vulnerabilities while going largely undetected. @jimmesta
  • 27. How can we prevent it? Start reviewing the Kubernetes audit logs! Centralised logging (events, containers, cloud logs, traces etc) Runtime detection using tools such as falco.org @jimmesta
  • 29. What is the problem? Kubernetes supports a number of authentication mechanisms, however many these are likely only suitable for non-production or small clusters and can introduce significant security risks. @jimmesta
  • 30. What is the problem? Kubernetes supports a number of authentication mechanisms, however many these are likely only suitable for non-production or small clusters and can introduce significant security risks. @jimmesta
  • 32. How can we prevent it? ▦ Avoid using certificates for end-user authentication ▦ Enforce MFA when possible ▦ Don’t use Service Account tokens from outside of the cluster ▦ Authenticate users and external services using short-lived tokens @jimmesta
  • 34. What is the problem? A Wordpress pod is compromised on a cluster that has no network segmentation and the aacker is able to utilize built in networking utilities such as dig and curl to explore the network. They discover an internally accessible API running on port 6379 which is typically Redis. They are able to probe the Redis microservice which was intended to be internal and only used by backend APIs using curl. Data is stolen and modified. @jimmesta
  • 35. How can we prevent it? ▦ Native Controls (Multi-Cluster) ▦ Native Controls (NetworkPolicies) ▦ Service Mesh @jimmesta
  • 38. What is the problem? An aacker compromises a web application running in a Kubernetes and is able to get a shell. They run the following command to ensure Kubernetes secrets are mounted: ls /var/run/secrets/kubernetes.io/serviceaccount The aacker installs kubectl in the compromised pod which by default will aempt to use the default service account located in the above directory. The aacker can then communicate with the Kubernetes API from the inside leveraging the default service account’s RBAC access. @jimmesta
  • 39. How can we prevent it? ▦ Encrypt secrets at rest ▦ Ensure logging and auditing is in place ▦ Think about leveraging runtime detection @jimmesta
  • 40. Useful tools for secrets @jimmesta hps://github.com/mozilla/sops hps://github.com/bitnami-labs/sealed-secrets hps://github.com/hashicorp/vault-k8s
  • 42. What is the problem? An aacker compromises a web application running in a Kubernetes and is able to get a shell. They run the following command to ensure Kubernetes secrets are mounted: ls /var/run/secrets/kubernetes.io/serviceaccount The aacker installs kubectl in the compromised pod which by default will aempt to use the default service account located in the above directory. The aacker can then communicate with the Kubernetes API from the inside leveraging the default service account’s RBAC access. @jimmesta
  • 43. What is the problem? The components the encompass Kubernetes itself are highly configurable. The Kubelet running on each node are an example of a critical piece of infrastructure that requires hardening. This is especially true in “DIY” clusters. @jimmesta
  • 45. @jimmesta How can we prevent it? https://github.com/ksoclabs/kbom
  • 47. What is the problem? @jimmesta https://ksoc.com/blog/addressing-the-new-kubernetes-cves-in-ingress-nginx https://ksoc.com/blog/addressing-curl-vulnerabilities-cve-2023-3854-and-cve-2023-38545
  • 48. Some questions to ask yourself… @jimmesta Are you using hardened base images? Are your images being scanned before being used? Are your images running as root? Are your images running as a consistent user and group? Do you have a labelling taxonomy for resources in your cluster? Are you enforcing policies using Admission Control? Have you audited the RBAC configuration of your cluster? Do you have a process for regularly upgrading Kubernetes? Do you have a process for regularly upgrading your third party tooling?
  • 49. Thanks, happy to take questions … ksoc.com Jimmy Mesta, Co-founder & CTO @ KSOC @jimmesta [email protected]