kubernetes-pentesting

Warn

Audited by Gen Agent Trust Hub on Nov 12, 2026

Risk Level: MEDIUMPRIVILEGE_ESCALATIONDATA_EXFILTRATIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [PRIVILEGE_ESCALATION]: The skill provides a specific manifest for creating a privileged pod designed to escape the container environment and gain root access to the underlying host node.
  • Evidence: Section 3.2 contains a YAML manifest using hostPID: true, hostNetwork: true, privileged: true, and a hostPath volume mounting the host root directory (/) to /host, combined with nsenter -t 1 to execute commands in the host's process namespace.
  • [PRIVILEGE_ESCALATION]: Instructions are provided to identify and exploit dangerous RBAC permissions to gain administrative control over the cluster.
  • Evidence: Section 2.3 identifies high-risk permissions such as pods/exec, serviceaccounts/token creation, and impersonate as critical escalation paths.
  • [DATA_EXFILTRATION]: The skill details methods for accessing and extracting sensitive credentials from multiple sources including service account tokens, etcd, and container registries.
  • Evidence: Sections 1.2, 3.1, 4, and 9 provide commands to read /var/run/secrets/kubernetes.io/serviceaccount/token, access etcd secrets, and extract .dockerconfigjson secrets from the API.
  • [DATA_EXFILTRATION]: Comprehensive instructions for harvesting cloud provider credentials via Instance Metadata Services (IMDS).
  • Evidence: Section 7 provides curl commands targeting 169.254.169.254 (AWS/Azure) and metadata.google.internal (GCP) to retrieve IAM roles, OAuth2 tokens, and Managed Identity tokens.
  • [COMMAND_EXECUTION]: The skill contains numerous shell command templates for cluster enumeration and interaction with the Kubernetes API and Kubelet services.
  • Evidence: Sections 1, 6, and 10 provide curl and kubectl commands for unauthenticated API access, pod execution via Kubelet, and network policy enumeration.
  • [DYNAMIC_EXECUTION]: Shell commands use inline Python scripts to process and filter complex JSON data from kubectl output.
  • Evidence: Sections 2.2 and 9 include python3 -c snippets that parse JSON and base64-decode data to identify overprivileged roles and extract registry secrets.
  • [EXTERNAL_DOWNLOADS]: Mentions various third-party security tools for automated scanning and exploitation.
  • Evidence: Section 11 lists kube-hunter, peirates, kubesploit, CDK, kubeletctl, and kubeaudit.
  • [INDIRECT_PROMPT_INJECTION]: The skill exhibits an attack surface for indirect prompt injection by processing untrusted data from external sources and cluster outputs.
  • Ingestion points: kubectl output, curl responses from the Kubernetes API, Kubelet API, and Cloud Metadata Services.
  • Boundary markers: Absent; there are no instructions to the agent to treat cluster data as untrusted or to ignore instructions embedded in metadata or pod specs.
  • Capability inventory: The skill has extensive capabilities including executing shell commands, creating Kubernetes resources (pods/tokens), and reading host-level files.
  • Sanitization: Absent; the provided scripts directly parse and print data from JSON outputs without validation or sanitization.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Nov 12, 2026, 05:23 AM