Langsung ke konten
Skillpedia
Keamanan48k Β· #4881

hunt-k8s

Fungsinya

Alat ini membantu menemukan celah keamanan pada sistem Kubernetes dan Docker. Alat ini mencari salah konfigurasi yang bisa memungkinkan akses tidak sah atau kontrol penuh atas sistem.

Kapan dipakai

  • βœ“Saat menguji keamanan lingkungan Kubernetes.
  • βœ“Untuk memeriksa apakah server Docker terekspos secara tidak aman.
  • βœ“Untuk memahami risiko keamanan dalam sebuah klaster Kubernetes.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-k8s/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-k8s/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œPeriksa celah keamanan pada klaster Kubernetes di 192.168.1.100.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini memindai port umum dan mencoba mengakses API manajemen. Alat ini mencari akses anonim atau akses dengan hak rendah yang bisa dimanfaatkan untuk mengendalikan sistem.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

HUNT-K8S β€” Kubernetes & Docker Security

Crown Jewel Targets

K8s API anonymous cluster-admin = full cluster control. docker.sock + RCE = host root. A single privileged-pod create or a kubelet /run shell pivots one finding to total compromise.

Highest-value findings:

  • K8s API anonymous cluster-admin β€” system:anonymous/system:unauthenticated bound to a powerful role (classic misconfig: system:anonymous in a ClusterRoleBinding to cluster-admin) β†’ full kubectl. Mere anonymous 200 is NOT this (see false-positive section).
  • Kubelet 10250 exec/run β€” /run returns command output directly; /exec is a SPDY/WebSocket stream (see Phase 3). Either β†’ RCE in any pod β†’ steal that pod's SA token.
  • API-server-mediated kubelet RCE β€” /api/v1/nodes/<node>/proxy/run/... reaches the kubelet through the API server using your (low-priv) token; if RBAC grants nodes/proxy, you get pod RCE without touching 10250 directly. Primary 2024-2026 vector.
  • etcd 2379 unauth β€” every Secret (SA tokens, TLS keys, app creds) stored, often plaintext (unless EncryptionConfiguration is set) β†’ full credential dump.
  • docker.sock exposure β€” SSRF/LFI/RCE reaching /var/run/docker.sock β†’ create --privileged container, bind-mount host / β†’ host root.
  • Container escape via runc β€” Leaky Vessels (CVE-2024-21626): WORKDIR/process.cwd pointing at a leaked /proc/self/fd/<n> host FD β†’ break out of an attacker-controlled image/exec to host root.
  • SA token abuse β€” auto-mounted token at /var/run/secrets/kubernetes.io/serviceaccount/token; check its real grants with SelfSubjectRulesReview before claiming impact.
  • K8s Dashboard skip-login / token-less API β€” full cluster management UI reachable unauthenticated.

OOB / Confirmation Gate (Read First)

K8s findings are RCE/credential-disclosure class. House rule: prove state change or data read, never infer from a status code.

  • A 200 on /api/v1/namespaces does not mean cluster-admin. The API server returns 200 with an RBAC-filtered (often empty items: []) list to any principal that can reach list namespaces β€” anonymous read on a few resources is common and low-impact. Confirm real privilege with SelfSubjectRulesReview / SelfSubjectAccessReview, then by actually reading a Secret value.
  • 10255 (read-only) vs 10250 (exec) are constantly conflated. 10255 (HTTP, no auth) is info-disclosure only β€” it has /pods, /stats, /metrics, NO exec/run. 10250 (HTTPS) is where /run and /exec live. Do not report "kubelet RCE" off a 10255 hit.
  • Blind/outbound vectors need OOB. If you exploit SSRFβ†’IMDSβ†’K8s, or a pod's egress, confirm the outbound hop with a Burp Collaborator / interactsh subdomain (e.g. curl http://<token>.<collab> from inside the pod via /run). A delayed response or an echoed URL is NOT proof.
  • Impact proof = the artifact. For exec: the literal id/hostname output. For etcd/Secret: the decoded token bytes (redact in report). For docker.sock escape: the host file content (/etc/hostname of the node, distinct from the container's).
  • Use a dedicated test namespace / test pod when you have create rights; never exec into production workloads to "prove" RCE β€” list the pod and exec a read-only id in a pod you spun up if policy allows, or limit to a single non-destructive id and stop.

Phase 1 β€” Fingerprint & Port Discovery

# Common Kubernetes / container ports
PORTS="443,6443,8443,8080,10250,10255,10256,2379,2380,4194,9090,9100,30000-30010"
nmap -sV -p $PORTS $TARGET 2>/dev/null | grep open


…
Pertanyaan umum

Apa itu Kubernetes?

Kubernetes adalah sistem untuk mengelola aplikasi berbasis container (seperti Docker) dalam skala besar, yang mengotomatiskan proses deployment, penskalaan, dan pengelolaan.

Apa itu Docker?

Docker adalah platform yang memungkinkan Anda mengemas aplikasi beserta dependensinya ke dalam 'container', sehingga mudah dijalankan di berbagai lingkungan.

Mengapa memeriksa keamanan itu penting?

Celah keamanan dapat memungkinkan penyerang mengakses data sensitif, mengendalikan sistem Anda, atau menyebabkan gangguan.

Detail

Deskripsi asli dari pembuat

Hunt Kubernetes & Docker

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#4881
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa