### 简要描述: 过滤不严。 ### 详细说明: 下的最新版了 在destoon\api\pay\chinabank\notify.php中 ``` $_POST = $_DPOST; if(!$_POST) exit('error'); $bank = 'chinabank'; $PAY = cache_read('pay.php'); if(!$PAY[$bank]['enable']) exit('error'); //这里 必须要启用了这个支付方式才行 if(!$PAY[$bank]['keycode']) exit('error'); $key = $PAY[$bank]['keycode']; $v_oid =trim($_POST['v_oid']); $v_pmode =trim($_POST['v_pmode']); $v_pstatus =trim($_POST['v_pstatus']); $v_pstring =trim($_POST['v_pstring']); $v_amount =trim($_POST['v_amount']); $v_moneytype =trim($_POST['v_moneytype']); $remark1 =trim($_POST['remark1' ]); $remark2 =trim($_POST['remark2' ]); $v_md5str =trim($_POST['v_md5str' ]); $md5string = strtoupper(md5($v_oid.$v_pstatus.$v_amount.$v_moneytype.$key)); if($v_md5str == $md5string) { if($v_pstatus == "20") { $r = $db->get_one("SELECT * FROM {$DT_PRE}finance_charge WHERE itemid='$v_oid'"); ``` key 默认都是空的 不用考虑。 然后 对一些可控的进行md5一次。然后只要相等 pstatus 为20的话 就直接带入了查询 就可以直接来注入了。 ### 漏洞证明: [<img...
### 简要描述: 过滤不严。 ### 详细说明: 下的最新版了 在destoon\api\pay\chinabank\notify.php中 ``` $_POST = $_DPOST; if(!$_POST) exit('error'); $bank = 'chinabank'; $PAY = cache_read('pay.php'); if(!$PAY[$bank]['enable']) exit('error'); //这里 必须要启用了这个支付方式才行 if(!$PAY[$bank]['keycode']) exit('error'); $key = $PAY[$bank]['keycode']; $v_oid =trim($_POST['v_oid']); $v_pmode =trim($_POST['v_pmode']); $v_pstatus =trim($_POST['v_pstatus']); $v_pstring =trim($_POST['v_pstring']); $v_amount =trim($_POST['v_amount']); $v_moneytype =trim($_POST['v_moneytype']); $remark1 =trim($_POST['remark1' ]); $remark2 =trim($_POST['remark2' ]); $v_md5str =trim($_POST['v_md5str' ]); $md5string = strtoupper(md5($v_oid.$v_pstatus.$v_amount.$v_moneytype.$key)); if($v_md5str == $md5string) { if($v_pstatus == "20") { $r = $db->get_one("SELECT * FROM {$DT_PRE}finance_charge WHERE itemid='$v_oid'"); ``` key 默认都是空的 不用考虑。 然后 对一些可控的进行md5一次。然后只要相等 pstatus 为20的话 就直接带入了查询 就可以直接来注入了。 ### 漏洞证明: [<img src="https://images.seebug.org/upload/201403/29170320d27599925b6e0ae7c2cf06e0e732061e.jpg" alt="d1.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201403/29170320d27599925b6e0ae7c2cf06e0e732061e.jpg) 来看看所执行的语句。 [<img src="https://images.seebug.org/upload/201403/29170355a15851f15ab67ea13d25610eb331efb4.jpg" alt="d2.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201403/29170355a15851f15ab67ea13d25610eb331efb4.jpg) [<img src="https://images.seebug.org/upload/201403/2917042803e69986678bec1256de7fecf8819060.jpg" alt="d3.jpg" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201403/2917042803e69986678bec1256de7fecf8819060.jpg)