44134 - Pentesting Tiller (Helm)
Osnovne informacije
Helm je upravljač paketima za Kubernetes. Omogućava pakovanje YAML fajlova i distribuciju istih u javnim i privatnim repozitorijumima. Ovi paketi se nazivaju Helm Charts. Tiller je servis koji se podrazumevano pokreće na portu 44134 i pruža uslugu.
Podrazumevani port: 44134
Enumeracija
Ako možete izlistati podove i/ili servise različitih imenskih prostora, izlistajte ih i potražite one koji imaju "tiller" u svom imenu:
Pentesting Tiller (Helm)
Introduction
Tiller is the server-side component of Helm, a package manager for Kubernetes. It manages the deployment of charts, which are packages of pre-configured Kubernetes resources. Pentesting Tiller involves identifying security vulnerabilities and misconfigurations that could be exploited by an attacker.
Enumeration
To begin the pentesting process, you need to enumerate the Tiller service. This can be done using tools like nmap
or masscan
to scan for open ports. The default port for Tiller is 44134
.
Exploitation
Once you have identified an open Tiller port, you can attempt to exploit it. One common vulnerability is the lack of authentication, which allows anyone to connect to the Tiller server without credentials. This can be exploited using the helm
command-line tool.
Post-Exploitation
After successfully exploiting Tiller, you can perform various post-exploitation activities. For example, you can search for sensitive information, such as Kubernetes secrets, by using the helm search
command. Additionally, you can deploy malicious charts to gain persistence or execute arbitrary code on the Kubernetes cluster.
Mitigation
To mitigate the risks associated with Tiller, it is recommended to follow these best practices:
Enable authentication for Tiller by configuring it with a secure authentication mechanism, such as TLS certificates or RBAC.
Restrict network access to the Tiller service by using firewalls or network policies.
Regularly update Helm and Tiller to ensure you have the latest security patches.
Use RBAC to limit the permissions of Tiller, ensuring it only has the necessary privileges to perform its functions.
Monitor Tiller logs for any suspicious activity or unauthorized access attempts.
By following these mitigation techniques, you can enhance the security of your Tiller installation and protect your Kubernetes cluster from potential attacks.
Takođe možete pokušati da pronađete ovu uslugu proverom porta 44134:
Jednom kada ste otkrili to, možete komunicirati s njim preuzimanjem klijentske aplikacije helm. Možete koristiti alate poput homebrew
, ili pogledati zvaničnu stranicu izdanja. Za više detalja ili druge opcije, pogledajte vodič za instalaciju.
Zatim, možete izlistati uslugu:
Eskalacija privilegija
Podrazumevano je da je Helm2 instaliran u kube-system namespace-u sa visokim privilegijama, pa ako pronađete uslugu i imate pristup njoj, to vam može omogućiti eskalciju privilegija.
Sve što trebate da uradite je da instalirate paket poput ovog: https://github.com/Ruil1n/helm-tiller-pwn koji će omogućiti podrazumevani pristup tokena usluge svemu u celokupnom klasteru.
U http://rui0.cn/archives/1573 imate objašnjenje napada, ali u osnovi, ako pročitate datoteke clusterrole.yaml i clusterrolebinding.yaml unutar helm-tiller-pwn/pwnchart/templates/ možete videti kako se sve privilegije dodeljuju podrazumevanom token-u.
Last updated