Kubernetes Pentesting Part 6: Exploiting Dashboards & Harvesting Service Account Tokens

In this installment, we will focus on one of the most prevalent high-value targets within a cluster: the Kubernetes Dashboard. While these interfaces provide significant visibility for administrators, they often become the “Achilles’ heel” of an environment when misconfigured with excessive privileges.

This video demo goes beyond theory to show a live attack path that transforms a minor configuration oversight into a full-blown cluster takeover.

Discovery & Access: Identifying exposed Dashboards and bypassing weak authentication barriers.

The Manual Secret Injection: Demonstrating how to use the Dashboard’s own “Create” interface to force the generation of a Legacy Service Account Token.

Token Harvesting: Extracting long-lived JWT tokens directly from the browser to establish persistence.

Remote Cluster Takeover: Configuring an external Kali box with harvested credentials to achieve full kubectl control from outside the network.

Privilege Escalation Validation: Used auth can-i to confirm the transition from a service-level account to Full Cluster Admin.

Post-Exploitation & C2: Deploying a malicious pod to the cluster to execute a Sliver beacon, bridging the gap between Kubernetes orchestration and traditional Command & Control (C2).

The exploitation of misconfigured Kubernetes Dashboards represents a critical failure point in cluster security. By demonstrating how a simple interface can be leveraged to harvest “god-mode” credentials, we highlight the dangerous gap between operational convenience and infrastructure hardening. We view these offensive maneuvers as the ultimate diagnostic tool. Transforming a “how to hack” scenario into a “how to defend” roadmap allows us to move beyond reactive patching and toward a resilient, Least Privilege architecture. Securing the control plane isn’t just about closing ports; it’s about eliminating the long-lived, high-privilege secrets that attackers depend on for persistence.

Share the Post:

Table of Contents

Subscribe To Our Blog

Light