attacking-eks-gke-aks

attacking-eks-gke-aks is a skill for Claude Code from trilwu/secskills. It costs 109 tokens per session (4,337 once invoked), scanned A, original, MIT.

A security-testing guide for managed Kubernetes services on Amazon, Google, and Microsoft clouds. Kubernetes runs container workloads, while the cloud provider controls a separate identity system, and the guide examines how those two systems connect.

In plain words
What is it for?
Use it to assess EKS, GKE, and AKS clusters, review role bindings and service accounts, test pod access to cloud credentials, inspect identity mappings, and evaluate namespace isolation and admission controls.
Why use it?
It helps find privilege-escalation paths that are missed when cloud permissions and Kubernetes permissions are reviewed separately. A pod, service account, or cluster mapping may unintentionally provide access to cloud resources or administrator actions.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the secskills-offense plugin — 40 skills shipped together

Good fit Use it to assess EKS, GKE, and AKS clusters, review role bindings and service accounts, test pod access to cloud credentials, inspect identity mappings, and evaluate namespace isolation and admission controls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/trilwu/secskills/attacking-eks-gke-aks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add trilwu/secskills --skill attacking-eks-gke-aks
Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills

Made for: Claude Code.

Or install secskills-offense, the plugin that ships this one along with the rest of its 40 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for attacking-eks-gke-aks

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/attacking-eks-gke-aks/github.svg)](https://agentmods.dev/skills/trilwu/secskills/attacking-eks-gke-aks)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-eks-gke-aks"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-eks-gke-aks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for attacking-eks-gke-aks

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-eks-gke-aks"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-eks-gke-aks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,337 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Sonnet 5 · 6 Sept 2026 📄 Read the review Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 19 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 52
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Server-Side Request Forgery · line 101
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 102
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 106
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 109
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 133
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 315
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 357
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 120
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Server-Side Request Forgery · line 122
    Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
    Fix: Remove access to cloud metadata endpoints unless strictly required. If metadata is needed, restrict it (e.g. IMDSv2 with hop limit) and never expose returned credentials.
  • high Tool Misuse · line 151
    Code deploys a privileged Kubernetes workload (privileged container, hostPath mount, or host namespaces). This grants root on the node and is a node/cluster takeover vector.
    Fix: Remove privileged, hostPath, and host-namespace settings from workloads. Use a least-privilege securityContext, drop capabilities, and avoid mounting the host filesystem.
  • high Tool Misuse · line 152
    Code deploys a privileged Kubernetes workload (privileged container, hostPath mount, or host namespaces). This grants root on the node and is a node/cluster takeover vector.
    Fix: Remove privileged, hostPath, and host-namespace settings from workloads. Use a least-privilege securityContext, drop capabilities, and avoid mounting the host filesystem.
  • high Tool Misuse · line 157
    Code deploys a privileged Kubernetes workload (privileged container, hostPath mount, or host namespaces). This grants root on the node and is a node/cluster takeover vector.
    Fix: Remove privileged, hostPath, and host-namespace settings from workloads. Use a least-privilege securityContext, drop capabilities, and avoid mounting the host filesystem.
  • high Privilege Escalation · line 161
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Tool Misuse · line 164
    Code deploys a privileged Kubernetes workload (privileged container, hostPath mount, or host namespaces). This grants root on the node and is a node/cluster takeover vector.
    Fix: Remove privileged, hostPath, and host-namespace settings from workloads. Use a least-privilege securityContext, drop capabilities, and avoid mounting the host filesystem.
  • high Privilege Escalation · line 173
    Potential security issue detected. Manual review is recommended.
    Fix: Review the flagged content for security risks. Ensure no credentials, secrets, or sensitive data are exposed.
  • high Privilege Escalation · line 176
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Tool Misuse · line 180
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Prompt Injection · line 393
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00109 $0.04337
Opus 5 $0.00055 $0.02168
Sonnet 5 $0.00022 $0.00867
Haiku 4.5 $0.00011 $0.00434

Measured 7d ago against content hash 8001072f8ccf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

attacking-eks-gke-aks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

secskills-offense/skills/attacking-eks-gke-aks/SKILL.md · 423 lines

How it starts

The opening of the file, as written. The whole thing — 423 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Attacking Managed Kubernetes (EKS, GKE, AKS)

Managed Kubernetes is a special target because it operates across two independent authorization planes: the cloud provider's IAM layer and Kubernetes' own RBAC layer. Each plane has its own identities, policies, and trust boundaries. The escalation paths live at the seams -- where a Kubernetes service account maps to a cloud IAM role, where a pod inherits a node's cloud credentials via the instance metadata service, or where a cluster-admin binding was granted through a cloud identity mapping that nobody audits. An attacker who understands only one plane misses the paths that cross into the other.

Only against systems you are authorized to test.

When to Use

  • Assessing EKS, GKE, or AKS clusters during a penetration test
  • Reviewing Kubernetes RBAC bindings and service account permissions
  • Testing pod-to-cloud escalation via IMDS or workload identity
  • Evaluating network policy enforcement and namespace isolation
  • Auditing cloud-to-cluster identity mappings (aws-auth, Workload Identity, AAD)
  • Checking admission controller effectiveness and bypass potential

When NOT to Use

  • Generic Docker container escapes or vanilla k8s without a cloud provider -- use exploiting-containers
  • Cloud IAM and control-plane-only assessment (no cluster involved) -- use exploiting-cloud-platforms
  • Defending or hardening the cluster rather than attacking it -- use defending-kubernetes
  • SSRF hitting IMDS from a web application, not from inside a pod -- use exploiting-ssrf
  • Writing detection rules for the attacks described here -- use engineering-detections

Cluster Discovery and Unauthenticated Access

# Discover clusters
aws eks list-clusters --region us-east-1        # EKS
gcloud container clusters list                   # GKE
az aks list                                      # AKS

# Unauthenticated API server check
curl -k https://<api-server>:443/api/v1/namespaces
curl -k https://<api-server>:443/version

# Anonymous RBAC check -- system:anonymous may have bindings
kubectl auth can-i --list --as=system:anonymous

# Kubelet read-only port (10255) -- often disabled, worth checking
curl http://<node-ip>:10255/pods

Read the full file on GitHub · 423 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 423 lines · 109 tokens per session scan E 8001072f8ccf

Subscribe to this mod's changes

attacking-eks-gke-aks is a skill published in the GitHub repository trilwu/secskills (138 stars, last pushed 6d ago), licensed MIT. It adds 109 tokens to every session and 4,337 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

application-design-center-design-deploy

Processes GCP infrastructure design and deployment workflows within Application Design Center (ADC). Use when: - Designing GCP infrastructure with Terraform. - Validating local HCL. - Performing best-practice plan scans. - Importing templates to Application Design Center (ADC). - Deploying templates. - Troubleshooting…

google/skills · 94 tokens

gke-alert-configuration

Configures alerting policies in Terraform for Google Kubernetes Engine (GKE) clusters, workloads, and services using PromQL and Google Cloud Managed Service for Prometheus. Use when writing, analyzing, validating, or deploying Terraform alerting policies to monitor GKE service latency, traffic, error rates using…

google/skills · 120 tokens

gke-compute-classes

Configures, optimizes, and troubleshoots GKE ComputeClasses. Use when configuring Spot VMs with on-demand fallback, targeting specific accelerators (GPUs/TPUs) or machine families, restricting ComputeClass access, or debugging pending pods related to node pool auto-creation. Do not use for cluster-level Node Auto…

google/skills · 83 tokens

google-cloud-solution-n-tier-serverless-web-app

Assists in designing and implementing secure n-tier serverless web applications and microservices on Google Cloud. Use when users need architecture designs, security checklists, Terraform code, or deployment guidance for multi-tier serverless apps, regional data residency / European sovereignty compliance, zero-trust…

google/skills · 91 tokens