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 ahostPathvolume mounting the host root directory (/) to/host, combined withnsenter -t 1to 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/tokencreation, andimpersonateas 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, accessetcdsecrets, and extract.dockerconfigjsonsecrets from the API. - [DATA_EXFILTRATION]: Comprehensive instructions for harvesting cloud provider credentials via Instance Metadata Services (IMDS).
- Evidence: Section 7 provides
curlcommands targeting169.254.169.254(AWS/Azure) andmetadata.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
curlandkubectlcommands 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
kubectloutput. - Evidence: Sections 2.2 and 9 include
python3 -csnippets 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, andkubeaudit. - [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:
kubectloutput,curlresponses 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