ZzCMS是站长招商网内容管理系统,目前官方版本为V 8.1,本期带来该版本某处上传点因过滤不严谨导致上传任意脚本文件漏洞的复现过程。
基础环境
1. 虚拟机win2003搭建phpstudy作为web环境,ip地址为:192.168..159.135
2. ZzCMS V8.1源码一份。
源码部署
1.首先web环境的选择上,使用PHP 5.2.17+apache的环境,打开apache的配置文件,将#AddType application/x-httpd-php .php .phtml的“#”注释符去掉,然后重启PHPStudy。
2.下载ZzCMS V8.1的源码部署到网站根目录上。
百度云盘下载地址为链接:http://pan.baidu.com/s/1mhGZWOo 密码:ylh4

3.网站安装,访问http://ip/install

提示我们安装向导已经安装过,重安装需删除根目录下的 /install/install.lock 文件。删除之后再重新访问该安装页面。
一路选择下一步,直到设置页面,创建数据库。

完成安装。

漏洞复现:
1.任意文件上传点:http://192.168.159.135/uploadimg_form.php

2.制作一句话图片马
使用edjpgcom工具制作一句话图片马,将1.jpg拖到edjpgcom.exe,写入一句话。

工具百度链接:http://pan.baidu.com/s/1o8x9q0E 密码:euzx
3.浏览器配置Burp代理拦截,上传制作好的一句话图片马。




4.连接一句话木马

使用菜刀连接:


总结:
我们访问http://192.168.159.135/uploadimg_form.php这个双页面是需要登陆会话的,但那时POST请求传文件缺不需要Cookie信息。这个漏洞的根本在于apache会把phtml后缀的文件当成php文件来执行。网上有大牛针对这个漏洞写了一个python脚本,地址如下:
链接:http://pan.baidu.com/s/1hsxf5eG
密码:6lpd,
使用如图所示:


网友评论