GTFOBins.github.io icon indicating copy to clipboard operation
GTFOBins.github.io copied to clipboard

[Update] Run-parts

Open Aegrah opened this issue 1 year ago • 0 comments

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)

Aegrah avatar Aug 27 '24 11:08 Aegrah