On 2017-09-27, Bram Moolenaar wrote: > Dor Azouri wrote: > > > I would like to report a possible abuse one can perform on Vim's > > extensibility mechanism, that may lead to privilege escalation.
> In my opinion, if a user can use "sudo" he can do anything. He could > also edit /root/.bashrc for example, and put any command there. > > I don't know what you mean with "non-elevated mode", sudo always results > in an elevated mode with more permissions. And you can also do "sudo > -i" or "sudo bash". I don't see how this is related to Vim. If I understand him correctly, Dor is saying that Vim can be used as part of a Trojan horse attack on a system. An attacker, requiring no special permissions, adds a plugin to, or modifies an existing plugin in, a user's ~/.vim/plugin directory. Then that user, who has permission to use sudo and knows the sudo password, executes "sudo vim". The plugin is executed with the sudo user's permissions and the attacker can use system(), for example, to do all sorts of mischief requiring the sudo user's elevated permissions. Regards, Gary -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
