ltrace

Shell

This executable can spawn an interactive system shell.
  1. This function can be performed by any unprivileged user.
    ltrace -b -L /bin/sh
    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 ....
    ltrace -b -L /bin/sh

File write

This executable can write data to local files.
  1. CommentThe data to be written appears amid the library function call log, quoted and with special characters escaped in octal notation. The string representation will be truncated, pick a value big enough instead of 999. More generally, any binary that executes whatever library function call passing arbitrary data can be used in place of ltrace -F DATA.
    This function can be performed by any unprivileged user.
    ltrace -s 999 -o /path/to/input-file ltrace -F DATA
    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 ....
    ltrace -s 999 -o /path/to/input-file ltrace -F DATA

File read

This executable can read data from local files.
  1. CommentThe file is parsed as a configuration file and its content is shown as error messages.
    This function can be performed by any unprivileged user.
    ltrace -F /path/to/input-file /dev/null
    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 ....
    ltrace -F /path/to/input-file /dev/null
    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.
    ltrace -F /path/to/input-file /dev/null
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.