Analysis of a Kubernetes Hack(medium.com)
medium.com
Analysis of a Kubernetes Hack
https://medium.com/handy-tech/analysis-of-a-kubernetes-hack-backdooring-through-kubelet-823be5c3d67c
2 comments
I'm trying to understand what the issue here was. Did they publicly expose the kubelet port on the internet?
Yep. The kubelet ports were exposed. From the article:
As it turns out, our coworker’s server was also publicly exposing the kubelet ports (tcp 10250, tcp 10255). Although the problem here was obvious, it should raise some questions about your own Kubernetes deployment, as it did for us.
As it turns out, our coworker’s server was also publicly exposing the kubelet ports (tcp 10250, tcp 10255). Although the problem here was obvious, it should raise some questions about your own Kubernetes deployment, as it did for us.
Try a quick nmap scan on an AWS or Google IP range for tcp port 10250 to see some scary results.
OTOH some endpoints on the `--read-only-port=10255` API are completely open for unauthenticated requests... that leaks all the pod metadata/spec/status information:
Not what I expected, and the `--authorization-mode=AlwaysAllow` default seems like a very bad idea :/