Translated ['.github/pull_request_template.md', 'src/pentesting-cloud/az

This commit is contained in:
Translator
2024-12-31 18:57:14 +00:00
parent 7770a50092
commit 77a009d308
244 changed files with 8632 additions and 11470 deletions

View File

@@ -2,36 +2,32 @@
{{#include ../../banners/hacktricks-training.md}}
In Kubernetes it's pretty common that somehow **you manage to get inside a namespace** (by stealing some user credentials or by compromising a pod). However, usually you will be interested in **escalating to a different namespace as more interesting things can be found there**.
In Kubernetes ist es ziemlich häufig, dass **man irgendwie in einen Namespace gelangt** (indem man Benutzeranmeldeinformationen stiehlt oder einen Pod kompromittiert). In der Regel wird man jedoch daran interessiert sein, **in einen anderen Namespace zu eskalieren, da dort interessantere Dinge zu finden sind**.
Here are some techniques you can try to escape to a different namespace:
Hier sind einige Techniken, die du ausprobieren kannst, um in einen anderen Namespace zu entkommen:
### Abuse K8s privileges
### Missbrauch von K8s-Rechten
Obviously if the account you have stolen have sensitive privileges over the namespace you can to escalate to, you can abuse actions like **creating pods** with service accounts in the NS, **executing** a shell in an already existent pod inside of the ns, or read the **secret** SA tokens.
Offensichtlich kannst du, wenn das Konto, das du gestohlen hast, sensible Berechtigungen über den Namespace hat, in den du eskalieren möchtest, Aktionen wie **Pods erstellen** mit Dienstkonten im NS, **eine** Shell in einem bereits existierenden Pod innerhalb des NS ausführen oder die **Secret** SA-Tokens lesen.
For more info about which privileges you can abuse read:
Für weitere Informationen darüber, welche Berechtigungen du missbrauchen kannst, lies:
{{#ref}}
abusing-roles-clusterroles-in-kubernetes/
{{#endref}}
### Escape to the node
### Entkommen zum Knoten
If you can escape to the node either because you have compromised a pod and you can escape or because you ca create a privileged pod and escape you could do several things to steal other SAs tokens:
Wenn du zum Knoten entkommen kannst, entweder weil du einen Pod kompromittiert hast und entkommen kannst oder weil du einen privilegierten Pod erstellen und entkommen kannst, könntest du mehrere Dinge tun, um andere SA-Tokens zu stehlen:
- Check for **SAs tokens mounted in other docker containers** running in the node
- Check for new **kubeconfig files in the node with extra permissions** given to the node
- If enabled (or enable it yourself) try to **create mirrored pods of other namespaces** as you might get access to those namespaces default token accounts (I haven't tested this yet)
- Überprüfe auf **SA-Tokens, die in anderen Docker-Containern** laufen, die auf dem Knoten ausgeführt werden
- Überprüfe auf neue **kubeconfig-Dateien im Knoten mit zusätzlichen Berechtigungen**, die dem Knoten gegeben wurden
- Wenn aktiviert (oder aktiviere es selbst), versuche **gespiegelte Pods anderer Namespaces zu erstellen**, da du möglicherweise Zugriff auf die Standard-Token-Konten dieser Namespaces erhältst (ich habe das noch nicht getestet)
All these techniques are explained in:
All diese Techniken sind erklärt in:
{{#ref}}
attacking-kubernetes-from-inside-a-pod.md
{{#endref}}
{{#include ../../banners/hacktricks-training.md}}