Kubernetes
Kubernetes
By default, the Kubelet allows anonymous access.
K8's API Server Interaction
$ curl https://10.129.10.11:6443 -k
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "forbidden: User \"system:anonymous\" cannot get path \"/\"",
"reason": "Forbidden",
"details": {},
"code": 403
}By default, access to the root path is generally restricted to authenticated and authorized users with administrative privileges and the API server denied the request
Extracting Pods
Kubelet API
Kubeletctl
Available Commands
Executing Commands
Privilege Escalation
Extracting Tokens
Extracting Certificates
Now that we have both the token and certificate, we can check the access rights in the Kubernetes cluster.
List Privileges
get, create, and list pods
Create a YAML file that we can use to create a new container and mount the entire root filesystem from the host system into this container's /root director
Pod YAML
Creating a new Pod
Extracting Root's SSH Key
Dirty Pipe Container Escape
Tools
Last updated