44134 - Helm
💡 学习提示: 本文档介绍 44134 - Tiller/Helm 的渗透测试方法,适合信息安全初学者和从业人员参考。
⚠️ 法律声明: 本文档仅供学习和授权测试使用。未经授权的系统测试可能违反法律法规。
⚠️ 法律声明: 本文档仅供学习和授权测试使用。未经授权的系统测试可能违反法律法规。
44134 Tiller / Helm
基本信息
Helm is the package manager for Kubernetes. It allows to package YAML files and distribute them in public and private repositories. These packages are called Helm Charts. Tiller is the service running by default in the port 44134 offering the service.
默认 port: 44134
信息收集
If you can enumerate pods and/or services of different namespaces enumerate them and search for the ones with “tiller” in their name:
Examples:
You could also try to find this service running checking the port 44134:
Once you have discovered it you can communicate with it downloading the client helm application. You can use tools like homebrew, or look at the official releases page. For more details, or for other options, see the installation guide.
Then, you can enumerate the service:
提权
By default Helm2 was installed in the namespace kube-system with high privileges, so if you find the service and has access to it, this could allow you to escalate privileges.
All you need to do is to install a package like this one: https://github.com/Ruil1n/helm-tiller-pwn that will give the default service token access to everything in the whole cluster.
In http://rui0.cn/archives/1573 you have the explanation of the attack, but basically, if you read the files clusterrole.yaml and clusterrolebinding.yaml inside helm-tiller-pwn/pwnchart/templates/ you can see how all the privileges are being given to the default token.