Skip to content
FunCoding

cloud-k8s-hunting

K8s/容器面快速入口:发现 6443/10250/2375/2379 或拿到容器壳时,按本页枚举控制面/节点面;云元数据、凭据、逃逸全链见 cloud-attack-methods。

Star
631
Category
Ops & cloud
License
AGPL-3.0
Last commit
Dec 1, 2026

skills/cloud-k8s-hunting/SKILL.md

View on GitHub

K8s / 容器面入口

先加载 cloud-attack-methods:元数据、STS/IAM、对象存储、容器逃逸、CI/CD 都在那里。 本页只补控制面/节点面的枚举顺序与判据。

枚举顺序

  1. API Server::6443/version、/api/v1/namespaces、/apis; 有 token 时 kubectl --token=<t> --server=https://<host>:6443 auth can-i --list。
  2. Kubelet::10250/pods、:10250/runningpods/、:10250/metrics; 匿名可列 pod 即节点面打开。
  3. etcd::2379/v2/keys、:2379/health;etcdctl --endpoints=<host>:2379 endpoint health。
  4. Docker API::2375/version、:2375/containers/json;docker -H tcp://<host>:2375 ps。
  5. 容器内:/var/run/secrets/kubernetes.io/serviceaccount/token、env | grep -i kube; capsh --print、mount、/proc/1/root、/var/run/docker.sock。

通过判据

  • 能列出 namespace/pod/secret/configmap,或能读到 SA token 对应的 API 权限;
  • Kubelet 匿名 /pods 返回真实 pod 列表(不是 401/403);
  • etcd 能读 keys;Docker API 能列容器/镜像;容器内能读宿主文件或宿主进程;
  • 只是端口开放/证书错误/统一 403,不算面打开。

常见假点

  • 6443 返回 401 但换 SA token 后有权限;先枚举 token 再判死。
  • 10250 需要客户端证书;/pods 403 不代表 /metrics 也关。
  • 2375 只开 TLS 版(2376)或被网络策略挡住;先看握手。
  • 云元数据 401/403 多为 IMDSv2/加固,换 PUT token 再试。

Similar Skills

Featured

internal-comms

Write internal communications following company formats, including status reports, leadership updates, and newsletters.

ANanthropics/skills203k3,265 new stars in the last 7 days

canary

GAgarrytan/gstack143k598 new stars in the last 7 days

observability-and-instrumentation

ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days

Featured

shipping-and-launch

A pre-launch checklist covering monitoring, staged rollouts and rollback plans.

ADaddyosmani/agent-skills122k1,667 new stars in the last 7 days

paperclip-board

PApaperclipai/paperclip119k1,966 new stars in the last 7 days

ruview-configure

RUruvnet/RuView106k739 new stars in the last 7 days