DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Mitigating DevOps Repository Risks
  • Security With Falco
  • Navigating Kubernetes With Helm 3 Charts and ChartCenter
  • How to Implement Kubernetes

Trending

  • AI for Web Devs: Project Introduction and Setup
  • Implementing Stronger RBAC and Multitenancy in Kubernetes Using Istio
  • Build Quicker With Zipper: Building a Ping Pong Ranking App Using TypeScript Functions
  • Lost in Communication and Collaboration
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Introducing kube-hunter: an Open Source Tool for Discovering Security Issues in Kubernetes Clusters

Introducing kube-hunter: an Open Source Tool for Discovering Security Issues in Kubernetes Clusters

Take a look at this tool that can be used to determine if there are any concerning security flaws in your Kubernetes cluster.

Liz Rice user avatar by
Liz Rice
·
Sep. 02, 18 · News
Like (3)
Save
Tweet
Share
7.44K Views

Join the DZone community and get the full member experience.

Join For Free

Aqua Security has been actively participating in the open source community around Kubernetes security, including contributing significantly to the kube-bench project. We have followed that up with the release of the kube-hunter project, named for its ability to hunt for security weaknesses in Kubernetes clusters. Kube-hunter enables Kubernetes administrators, operators and security teams to identify weaknesses in their deployments and address those issues before attackers can exploit them.  

Kube-hunter augments the CIS validation for K8s deployments provided by kube-bench with discovery and penetration testing capabilities. In that respect it works much like an automated penetration testing tool — you give it the IP or DNS name of your Kubernetes cluster, and it will probe for security issues and alert you, for example, if your dashboard is open or your kubelets are accessible. Use kube-hunter to find Kubernetes installations in your environments, assess them for potential security risks, and receive suggestions on remediation for a wide range of vulnerabilities.

Running kube-hunter

The kube-hunter code is open source and Aqua also provides a containerized version to make it easy to run. The containerized version works in conjunction with Aqua’s kube-hunter website where it’s easy to view and share the results. The container includes this source code, plus an additional (closed source) reporting plugin for uploading results into a report that can be viewed at kube-hunter.aquasec.com. Note that running the aquasec/kube-hunter container and uploading reports data are subject to additional terms and conditions.

After navigating to the Aqua kube-hunter site, enter your email address to receive a Docker command to run that includes a token. Copy that command and run it anywhere you have Docker installed, and you’ll be prompted for the address of the cluster to test against. After the tests run you’ll see a unique URL (associated with that token) for viewing the results, which you can send to anyone else who needs to see the results. 

By default kube-hunter will run “passive hunters” only. This is a series of tests that probe for potential access points (like open ports) within your cluster. “Active hunting” can potentially do state-changing operations on the cluster, which could be harmful, so use this with care. 

To turn on “active hunting” simply, add the  --active  parameter when starting kube-hunter. This enables some additional tests that will attempt to leverage any weaknesses found with the passive hunter. Active hunters are intended to give an indication of what an attacker might be able to do. While we don’t intend for any of these tests to do anything destructive, you should exercise caution as they could potentially change the state of the cluster or the code running within it. As an example, here is an active hunter which attempts to exec into a container and run uname  within it.

Be Responsible!

Never use kube-hunter on other people’s clusters. It is possible to use this code to probe other sites, however, this is explicitly forbidden by the terms & conditions. 

You will find a list of the tests that have been implemented so far on the kube-hunter site or by running kube-hunter with the  --list  parameter. It is not yet comprehensive, but it does have a good range of hunters that have the potential to uncover many common issues.  

The underlying test code (which you can also run without using the web site) is open source, and Aqua welcomes feedback, ideas and contributions, especially new hunter modules that perform additional tests. 

 

Kubernetes Docker (software) Open source security

Published at DZone with permission of Liz Rice. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Mitigating DevOps Repository Risks
  • Security With Falco
  • Navigating Kubernetes With Helm 3 Charts and ChartCenter
  • How to Implement Kubernetes

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: