Skip to content

Guide · Agent skill

How to use the Kubernetes Cluster Attack Techniques agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The offensive-k8s-attacks skill is a Kubernetes attack playbook for an AI agent, published in the SnailSploit/Claude-Red repository under Skills/container. It is written for security testers who already have a foothold in a cluster, such as a shell in a pod, a stolen token or an exposed API server, and who are authorised to test it. After this guide you will know how to install the skill, how to ask for it in natural language, what it needs and which safety limits to set before you use it.

Kubernetes Cluster Attack TechniquesSnailSploit/Claude-Red · MIT

Quick start

  1. 1Download the ZIP. Download the offensive-k8s-attacks ZIP from this page.
  2. 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project.
  3. 3Or upload in the Claude apps. In the Claude apps, open Settings, go to Capabilities and upload the skill under Skills.
  4. 4Confirm authorisation and scope. Write down the cluster, namespaces and identities you are permitted to test before you start.
  5. 5Make a natural request. Describe your starting position and the goal, such as checking RBAC permissions from a pod shell.
  6. 6Review each step. Read the commands and findings as the agent works and stop if anything reaches beyond your scope.

What the skill makes the agent do

An agent skill is a folder containing a SKILL.md file with instructions that the agent reads when a request matches the skill's description. This one contains a structured workflow for Kubernetes: determine the starting position, enumerate permissions and resources, identify escalation vectors, chain misconfigurations, and then look at secrets, other namespaces and cloud metadata.

The description lists the attack areas it covers: service account token theft and impersonation, RBAC misconfiguration including wildcard permissions and role binding escalation, etcd access for secret extraction, kubelet API abuse on ports 10250 and 10255, pod escape through hostPID, hostNetwork and hostPath, secrets enumeration, admission controller and network policy bypass, cloud metadata access on EKS, GKE and AKS, CRD and operator persistence, and node compromise through DaemonSets. It maps these to MITRE ATT&CK techniques T1609, T1610 and T1613.

The skill names the tools it expects the agent to use: kubectl, kube-hunter, peirates, kubeaudit, kdigger and kubeletctl. Where kubectl is missing, the SKILL.md tells the agent to fall back to curl with the service account token.

Install the skill on your machine

Download the ZIP for this skill from this page. Unzip it so the offensive-k8s-attacks folder, containing SKILL.md, sits in your personal skills directory at ~/.claude/skills/. To limit it to one project instead, place the folder in that project's .claude/skills/ directory.

If you use the Claude apps rather than a local setup, open Settings, go to Capabilities, and upload the skill under Skills.

  • Personal install: ~/.claude/skills/offensive-k8s-attacks/
  • Project install: .claude/skills/offensive-k8s-attacks/ inside your project
  • Claude apps: Settings → Capabilities → Skills

Trigger the skill with natural requests

You do not need to name the skill. The agent loads it when your request matches the description, which mentions assessing Kubernetes clusters, attacking from within a compromised pod, exploiting RBAC or kubelet misconfigurations, and cloud-native lateral movement. State the scope and your starting position in the request so the agent knows what it has.

Check the first step before going further. The skill begins by establishing your position, so tell the agent what you already have.

  • I have a shell in a pod in an authorised test namespace. Work out what my service account can do.
  • Use the offensive-k8s-attacks skill to check my RBAC permissions from this kubeconfig, which is part of a signed-off lab cluster.
  • Audit this lab cluster's RBAC roles for wildcard permissions and tell me which bindings are risky.
  • I am in a deliberately vulnerable training cluster. Which kubelet misconfigurations are exposed on the nodes?
kubectl auth can-i --list

What you need before you start

kubectl is optional. Without it the skill falls back to curl with the service account token. You also need Kubernetes cluster access that you are authorised to test, such as a pod shell, a kubeconfig file or an API server endpoint.

The third-party tools kube-hunter, peirates, kubeaudit, kdigger and kubeletctl are optional. The skill references them, so install only the ones your engagement needs. The skill runs scripts and uses the network, so review what the agent executes in your environment.

  • kubectl (optional)
  • Cluster access you are authorised to test
  • Optional: kube-hunter, peirates, kubeaudit, kdigger, kubeletctl

Safety, scope and rollback

This skill performs active enumeration and exploitation. The SKILL.md itself frames its objective as escalating privileges, moving laterally and compromising the cluster or underlying cloud infrastructure, so it must only be used against systems you have written authorisation to test. Attacking clusters or cloud accounts without that authorisation is illegal and harms the owners.

Do not point it at production clusters without a rollback and scope plan. Enumeration and exploitation can disrupt workloads or trigger alerts. The skill is an offensive playbook and does not include hardening steps, so use it to find the weaknesses you then fix.

  • Confirm written scope and authorisation before the first request.
  • Prefer a lab or deliberately vulnerable cluster for learning.
  • Set a rollback plan for any change the agent proposes, such as creating roles or bindings.
  • Review every script and network call before running it in a shared environment.

Tips for better results

Give the agent the least information it needs to start, then add context as findings come in. Ask it to report each finding with the permission or misconfiguration behind it so you can map it to a fix. Because the skill is organised as phases, you can ask for only one phase, such as enumeration, and stop there.

  • Start with enumeration only and review results before escalation.
  • Name the namespace and the identity you are testing to keep scope tight.
  • Ask for the MITRE ATT&CK technique behind each finding for your report.
  • Use a lab cluster first to see how the agent behaves.

What people use it for

  • Checking what a service account in an authorised test pod can read, create or patch.
  • Finding cluster roles and bindings that use wildcard permissions or grant cluster-admin.
  • Planning a red-team exercise that maps findings to MITRE ATT&CK T1609, T1610 and T1613.
  • Helping platform teams see which RBAC, kubelet or metadata misconfigurations an attacker would target, so they can fix them.
  • Practising Kubernetes attack paths in a lab or deliberately vulnerable cluster.

Frequently asked questions

How do I install the offensive-k8s-attacks skill?

Download the ZIP from this page and unzip it so the offensive-k8s-attacks folder sits in ~/.claude/skills/. For a single project, put it in that project's .claude/skills/ folder. In the Claude apps you can instead upload it under Settings, then Capabilities, then Skills.

What does the offensive-k8s-attacks skill need to run?

It needs cluster access you are authorised to test, such as a pod shell, a kubeconfig or an API server endpoint. kubectl is optional because the skill can fall back to curl with the service account token. Tools such as kube-hunter, peirates, kubeaudit, kdigger and kubeletctl are optional extras.

Is the offensive-k8s-attacks skill free?

The source material I was given does not state pricing or licence terms beyond the MIT licence shown for the repository item, so check the repository's licence file for the full terms. Note that the third-party tools it references have their own licences.

Which tools does the skill use?

The skill names kubectl, kube-hunter, peirates, kubeaudit, kdigger and kubeletctl. It uses kubectl auth can-i for permission checks and falls back to curl against the API server when kubectl is not installed.

Can I use this skill on a production cluster?

Only with written authorisation and a rollback and scope plan. Active enumeration and exploitation can disrupt workloads or trigger alerts, so a lab or deliberately vulnerable cluster is the safer choice for practice.

Does the skill help me secure my cluster?

Not directly. It focuses on offence and does not provide hardening steps. Platform teams can use its findings to see which RBAC, kubelet or metadata misconfigurations to fix, but they will need separate hardening guidance.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

This skill suits security engineers running authorised penetration tests or red-team exercises, platform teams who want to see which misconfigurations an attacker would exploit, and students working in a lab. It is a poor fit for anyone without written authorisation, anyone working on production clusters without a rollback plan, or beginners who want hardening guidance rather than attack techniques.

Download the skill