Escape to the node
Example:
If we have admin access to the cluster, we can create any resources we want.
We can create a "bad" pod that mounts the node's file system.
EVERYTHING-ALLOWED-EXEC-POD: https://github.com/BishopFox/badPods/blob/main/manifests/everything-allowed/pod/everything-allowed-exec-pod.yaml
STEPS:
kubectl apply -f BAD_POD.yml --token={TOKEN} (Create the "bad" pod for privesc)kubectl get pods --token={TOKEN}kubectl exec -it BAD_POD --token={TOKEN} -- /bin/bashBreakout of the Kubernetes environment
After we created an ran our malicious pod, we can escape the Kubernetes environment by mounting the file system to the /tmp directory (example)
Last updated