### 简要描述: 过滤不严。 不考虑GPC。 ### 详细说明: 第一处在control/ajax/ajax_shop.php中 ``` switch ($action) { case "load_sale" : $shop_id and $list = db_factory::query(' select price,title,service_id,pic from '.TABLEPRE.'witkey_service where shop_id = '.$shop_id.' and service_status=2 order by on_time desc limit 0,4'); break; } require keke_tpl_class::template ('ajax/ajax_shop'); ``` 在这里 $shop_id 未单引号。 且无过滤。 在control/ajax.php中 ``` $views = array('prom','ajax','upload','indus','score','code','share','menu','message','file','task','shop'); in_array($view,$views) or $view ="ajax"; require 'ajax/ajax_'.$view.'.php'; ``` 这里 包含漏洞文件进来。 直接注入那。 第二处在payment\chinabank\notify.php中 ``` $key = $chinabank_seller_id; $v_oid = trim ( $_POST ['v_oid'] ); // 商户发送的v_oid定单编号 $v_pmode = trim ( $_POST ['v_pmode'] ); // 支付方式(字符串) $v_pstatus = trim ( $_POST ['v_pstatus'] ); //支付状态 :20 成功,30 失败 $v_pstring = trim ( $_POST ['v_pstring'] ); // 支付结果信息 $v_amount = trim ( $_POST ['v_amount'] ); // 订单实际支付金额 $v_moneytype = trim (...
### 简要描述: 过滤不严。 不考虑GPC。 ### 详细说明: 第一处在control/ajax/ajax_shop.php中 ``` switch ($action) { case "load_sale" : $shop_id and $list = db_factory::query(' select price,title,service_id,pic from '.TABLEPRE.'witkey_service where shop_id = '.$shop_id.' and service_status=2 order by on_time desc limit 0,4'); break; } require keke_tpl_class::template ('ajax/ajax_shop'); ``` 在这里 $shop_id 未单引号。 且无过滤。 在control/ajax.php中 ``` $views = array('prom','ajax','upload','indus','score','code','share','menu','message','file','task','shop'); in_array($view,$views) or $view ="ajax"; require 'ajax/ajax_'.$view.'.php'; ``` 这里 包含漏洞文件进来。 直接注入那。 第二处在payment\chinabank\notify.php中 ``` $key = $chinabank_seller_id; $v_oid = trim ( $_POST ['v_oid'] ); // 商户发送的v_oid定单编号 $v_pmode = trim ( $_POST ['v_pmode'] ); // 支付方式(字符串) $v_pstatus = trim ( $_POST ['v_pstatus'] ); //支付状态 :20 成功,30 失败 $v_pstring = trim ( $_POST ['v_pstring'] ); // 支付结果信息 $v_amount = trim ( $_POST ['v_amount'] ); // 订单实际支付金额 $v_moneytype = trim ( $_POST ['v_moneytype'] ); //订单实际支付币种 $remark1 = trim ( $_POST ['remark1'] ); //备注字段1 $remark2 = trim ( $_POST ['remark2'] ); //备注字段2 $v_md5str = trim ( $_POST ['v_md5str'] ); //拼凑后的MD5校验值 /* 重新计算md5的值 */ $text = "{$v_oid}{$v_pstatus}{$v_amount}{$v_moneytype}{$key}"; $md5string = strtoupper ( md5 ( $text ) ); //echo $md5string; $total_fee = $_POST ['total_fee']; //获取总价格 chmod('log.txt',777); KEKE_DEBUG and $fp = file_put_contents ( 'log.txt', var_export($_POST,1),FILE_APPEND);//信息录入 /* 判断返回信息,如果支付成功,并且支付结果可信,则做进一步的处理 */ if ($v_md5str == $md5string) { list ( $_, $charge_type, $uid, $obj_id, $order_id, $model_id ) = explode ( '-', $v_oid, 6 ); if ($v_pstatus == "20" && $_ == 'charge') { /* charge */ $fac_obj = new pay_return_fac_class ( $charge_type, $model_id, $uid, $obj_id, $order_id, $v_amount, 'chinabank' ); ``` key为空的 不用考虑。 这里验证了一下md5是否相等。 简单通过。 第三处在control/user/user_message.php中 ``` switch ($op) { case 'mulit_del': if($msg_id){ foreach ($msg_id as $v){ list($msg_id,$status) = explode(',', $v); if($status==0 &&$msg_type == 'output'){ $res = db_factory::execute("update ".TABLEPRE."witkey_msg set msg_status=1 where msg_id in ($msg_id)"); }else if($msg_type == 'accept'&&$status == 0){ $res = db_factory::execute("update ".TABLEPRE."witkey_msg set msg_status=2 where msg_id in ($msg_id)"); }else{ msg_del($msg_id); } } ``` 直接赋值 然后带入查询 无过滤。 ### 漏洞证明: 第一处漏洞证明: [<img src="https://images.seebug.org/upload/201404/27105744b55c8d71eb1aec07955b500f55e8f837.jpg" alt="k1.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201404/27105744b55c8d71eb1aec07955b500f55e8f837.jpg) 第二处漏洞证明: [<img src="https://images.seebug.org/upload/201404/271102582d9f457a6f373c21c1b2282e59a36c4b.jpg" alt="k2.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201404/271102582d9f457a6f373c21c1b2282e59a36c4b.jpg) 成功带入查询。 第三处漏洞证明: [<img src="https://images.seebug.org/upload/201404/2711224052ef7c5e40f8b4d9dc27ceb29987fc55.jpg" alt="k3.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201404/2711224052ef7c5e40f8b4d9dc27ceb29987fc55.jpg)