GTFOBins.github.io
GTFOBins.github.io copied to clipboard
[Update] Run-parts
Summary
This PR adds command execution capabilities to the run-parts binary. Run-parts is capable of executing shell scripts, which allows for proxied command execution.
> root@vm:/home/ruben_groenewoud# printf '#!/bin/sh\n/bin/sh -c "/bin/id > /tmp/id.out"\n' > /tmp/run-parts/id && chmod +x /tmp/run-parts/id
> root@vm:/home/ruben_groenewoud# cat /tmp/run-parts/id
#!/bin/sh
/bin/sh -c "/bin/id > /tmp/id.out"
> root@vm:/home/ruben_groenewoud# run-parts /tmp/run-parts
> root@vm:/home/ruben_groenewoud# cat /tmp/id.out
uid=0(root) gid=0(root) groups=0(root)