kube-hunterRuns kube-hunter in interactive mode to select scan types manually.
Hunts for security weaknesses in Kubernetes clusters from inside or outside, reporting exposed components and known issues. Archived upstream but still informative.
pipx install kube-hunterkube-hunterRuns kube-hunter in interactive mode to select scan types manually.
kube-hunter --listLists all available passive and active hunters (plugins) currently supported.
kube-hunter --versionDisplays the current version of the kube-hunter tool.
kube-hunter --helpShows the help menu with all available command-line arguments and flags.
kube-hunter --remote [IP]Scans a specific remote IP address for Kubernetes vulnerabilities.
Example
kube-hunter --remote 192.168.1.100kube-hunter --remote [DNS_NAME]Scans a specific remote domain name for Kubernetes exposure.
Example
kube-hunter --remote k8s-cluster.example.comkube-hunter --cidr [CIDR_BLOCK]Performs a scan across an entire network CIDR range to find Kubernetes nodes.
Example
kube-hunter --cidr 192.168.0.0/24kube-hunter --remote [IP1] --remote [IP2]Scans multiple distinct remote IP addresses in a single execution.
Example
kube-hunter --remote 192.168.1.50 --remote 192.168.1.51kube-hunter --url [URL]Targets a specific Kubernetes API server URL for assessment.
Example
kube-hunter --url https://192.168.1.100:6443kube-hunter --activeEnables active hunting mode to attempt harmless exploitation of found vulnerabilities.
kube-hunter --remote [IP] --activePerforms an active vulnerability scan against a specific remote target.
Example
kube-hunter --remote 192.168.1.100 --activekube-hunter --cidr [CIDR] --activeScans a network range and actively verifies vulnerabilities on discovered nodes.
Example
kube-hunter --cidr 10.0.0.0/16 --activekube-hunter --report jsonOutputs the scan results in JSON format for automated parsing.
kube-hunter --report yamlOutputs the scan results in YAML format for configuration management tools.
kube-hunter --report plainOutputs the scan results in plain text format for human readability.
kube-hunter --log [LEVEL]Sets the logging verbosity level to debug for detailed troubleshooting.
Example
kube-hunter --log debugkube-hunter --log warnReduces logging verbosity to show only warnings and errors.
kube-hunter --statisticsDisplays execution statistics at the end of the scan.
kube-hunter --include-hunters [HUNTER_NAME]Runs only the specified hunter, skipping all other checks.
Example
kube-hunter --include-hunters KubeletDiscoverykube-hunter --exclude-hunters [HUNTER_NAME]Runs all hunters except the one specified.
Example
kube-hunter --exclude-hunters KubeletDiscoverykube-hunter --include-hunters [LIST]Runs a comma-separated list of specific hunters for a focused audit.
Example
kube-hunter --include-hunters KubeletDiscovery,DashboardDiscoverykube-hunter --remote [IP] --include-hunters GKEKubeletAnonymousChecks specifically for anonymous Kubelet access on GKE clusters.
Example
kube-hunter --remote 35.1.1.1 --include-hunters GKEKubeletAnonymouskube-hunter --remote [IP] --include-hunters EKSKubeletAnonymousChecks specifically for anonymous Kubelet access on EKS clusters.
Example
kube-hunter --remote 54.1.1.1 --include-hunters EKSKubeletAnonymouskube-hunter --remote [IP] --include-hunters AKSKubeletAnonymousChecks specifically for anonymous Kubelet access on AKS clusters.
Example
kube-hunter --remote 20.1.1.1 --include-hunters AKSKubeletAnonymouskube-hunter --remote [IP] --report json > scan_results.jsonSaves remote scan results to a JSON file for defensive analysis.
Example
kube-hunter --remote 192.168.1.100 --report json > scan_results.jsonkube-hunter --cidr [CIDR] --active --log warnRuns a low-noise active scan over a large network to identify critical misconfigurations.
Example
kube-hunter --cidr 10.0.0.0/8 --active --log warnkube-hunter --list | grep [KEYWORD]Filters the hunter list to identify available checks for specific components like etcd.
Example
kube-hunter --list | grep etcdkube-hunter --remote [IP] --include-hunters EtcdRemoteAccessVerifies if the etcd service is exposed and accessible remotely.
Example
kube-hunter --remote 192.168.1.20 --include-hunters EtcdRemoteAccesskube-hunter --remote [IP] --report json --dispatch http --dispatch-url [URL]Combines JSON reporting with HTTP dispatch for immediate remote logging.
Example
kube-hunter --remote 10.10.10.10 --report json --dispatch http --dispatch-url https://webhook.site/uuidkube-hunter --pod --active --report yamlRuns inside a pod in active mode and generates a YAML report for GitOps processing.
kube-hunter --cidr [CIDR] --exclude-hunters [NOISY_HUNTERS]Scans a network while excluding specific noisy discovery hunters.
Example
kube-hunter --cidr 192.168.0.0/16 --exclude-hunters KubeletDiscovery,ProxyDiscoverykube-hunter --active --include-hunters RCEAttempts to verify Remote Code Execution vulnerabilities in discovered services.
kube-hunter --cidr [CIDR] --report json --log noneRuns a silent scan outputting only JSON, ideal for parsing in CI pipelines.
Example
kube-hunter --cidr 172.16.0.0/12 --report json --log nonekube-hunter --include-hunters CVE-2018-1002105Checks specifically for the critical Kubernetes privilege escalation vulnerability (if supported by version).
kube-hunter --remote [IP] --include-hunters ProxyDiscoveryChecks specifically for an exposed Kubernetes Proxy service.
Example
kube-hunter --remote 192.168.1.1 --include-hunters ProxyDiscoverykube-hunter --remote [IP] --include-hunters AzureSpnExposureChecks for exposed Azure Service Principal Names in the cluster.
Example
kube-hunter --remote 192.168.1.5 --include-hunters AzureSpnExposurekube-hunter --cidr [CIDR] --quick --report jsonPerforms a fast network discovery scan and outputs results as JSON.
Example
kube-hunter --cidr 192.168.1.0/24 --quick --report jsonkube-hunter --remote [IP] --active --log debugRuns a comprehensive active audit on a single host with full debug logging.
Example
kube-hunter --remote 192.168.1.10 --active --log debugdocker run -it --rm --network host aquasec/kube-hunterRuns the official kube-hunter container using the host network for visibility.
docker run --rm aquasec/kube-hunter --cidr [CIDR]Runs the kube-hunter container to scan a specific remote CIDR.
Example
docker run --rm aquasec/kube-hunter --cidr 192.168.1.0/24docker run --rm aquasec/kube-hunter --podRuns the container in pod mode (useful when deployed as a Job inside K8s).
kube-hunter --cidr [CIDR] --active --dispatch http --dispatch-url [URL] --report jsonMaximal command combining range scan, active hunting, JSON reporting, and HTTP dispatch.
Example
kube-hunter --cidr 10.0.0.0/8 --active --dispatch http --dispatch-url http://log-server:8080 --report jsonkube-hunter --include-hunters ApiServerDiscoveryLimits the scan to identifying if the API server is discoverable.
kube-hunter --include-hunters EtcdDiscoveryLimits the scan to identifying if the Etcd service is discoverable.
kube-hunter --active --include-hunters KubectlClientActively checks if an exposed kubectl client configuration can be exploited.
kube-hunter --active --include-hunters HelmDiscoveryChecks for exposed Helm Tiller instances (relevant for older clusters).
kube-hunter --remote [IP] --request-timeout [SECONDS]Sets a custom timeout for network requests to handle slow networks.
Example
kube-hunter --remote 192.168.1.1 --request-timeout 5pkill -f kube-hunterForcefully terminates running kube-hunter processes.