日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

php云人才系统操作,PHP云人才系统任意刷钱(附演示)

發布時間:2023/12/29 php 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php云人才系统操作,PHP云人才系统任意刷钱(附演示) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

### 簡要描述:

PHP云人才系統任意刷錢漏洞,演示詳細過程,利用難度低0-0!

### 詳細說明:

起因在member\model\com.class.php文件中:

```

function dingdan_action(){

if($_POST['price']){

if($_POST['comvip']){

$comvip=(int)$_POST['comvip'];

$ratinginfo = $this->obj->DB_select_once("company_rating","`id`='".$comvip."'");

$price = $ratinginfo['service_price'];

$data['type']='1';

}elseif($_POST['price_int']){

$price = $_POST['price_int']/$this->config['integral_proportion']; //integral_proportion = 20 只是簡單的相除,沒有判斷正負。

$data['type']='2';

}elseif($_POST['price_msg']){

$price = $_POST['price_msg']/$this->config['integral_msg_proportion'];

$data['type']='5';

}else{

$this->obj->ACT_layer_msg("參數不正確,請正確填寫!",8,$_SERVER['HTTP_REFERER']);

}

$dingdan=mktime().rand(10000,99999); //訂單生產的訂單號,使用時間戳加上隨機數。

$data['order_id']=$dingdan;

$data['order_price']=$price;

$data['order_time']=mktime();

$data['order_state']="1";

$data['order_remark']=trim($_POST['remark']);

$data['uid']=$this->uid;

$data['rating']=$_POST['comvip'];

$data['integral']=$_POST['price_int'];

$id=$this->obj->insert_into("company_order",$data); //成功插入了數據庫

if($id){

$this->obj->ACT_layer_msg("下單成功,請付款!",9,"index.php?c=payment&id=".$id);

}else{

$this->obj->ACT_layer_msg("提交失敗,請重新提交訂單!",8,$_SERVER['HTTP_REFERER']);

}

}else{

$this->obj->ACT_layer_msg("參數不正確,請正確填寫!",8,$_SERVER['HTTP_REFERER']);

}

}

```

此處可以插入$_POST['price_int']=-20000 相當于 -1000元

接下來看api\tenpay\index.php文件中的邏輯:

```

if(!is_numeric($_POST['dingdan'])) //判斷了是否為數字

{

die;

}

$userid=(int)$_COOKIE['uid'];

$_POST['is_invoice']=(int)$_POST['is_invoice']; //無用

$_POST['balance']=(int)$_POST['balance']; //化為整數了,此參數只要存在就行了,隨便提交

$member_sql=$db->query("SELECT * FROM `".$db_config["def"]."member` WHERE `uid`='".$userid."' limit 1");

$member=mysql_fetch_array($member_sql);

if($member['username'] != $_COOKIE['username'] || $member['usertype'] != $_COOKIE['usertype']||md5($member['username'].$member['password'].$member['salt'])!=$_COOKIE['shell']){

echo '登錄信息驗證錯誤,請重新登錄!';die;

}

$sql=$db->query("select * from `".$db_config["def"]."company_order` where `order_id`='$_POST[dingdan]'"); //根據訂單號查詢order

$row=mysql_fetch_array($sql);

if($_POST['balance']&&$userid){ //正常登陸用戶,隨便提交balance參數即可

$c_sql=$db->query("select `pay` from `".$db_config["def"]."company_statis` where `uid`='".$userid."'");

$company_statis=mysql_fetch_array($c_sql);

if($company_statis['pay']>=$row['order_price']){ //關鍵來了,判斷用戶余額是否大于訂單,因為order_price 是負數,一定為true

$up_sql=$db->query("update `".$db_config["def"]."company_statis` set `pay`=`pay`-'".$row['order_price']."' where `uid`='".$userid."'"); //此處直接相減了,負負得正!金錢增加。漏洞觸發。

mysql_fetch_array($up_sql);

$up_order=$db->query("update `".$db_config["def"]."company_order` set `order_price`='0'".$invoice_title." where `order_id`='".$row['order_id']."'"); //這里不影響,后面都不影響。

mysql_fetch_array($up_order);

$price=$row['order_price'];

}else{

$price=$company_statis['pay'];

$up_sql=$db->query("update `".$db_config["def"]."company_statis` set `pay`='0' where `uid`='".$userid."'");

$up_sql_status=mysql_fetch_array($up_sql);

$up_order=$db->query("update `".$db_config["def"]."company_order` set `order_price`=`order_price`-'".$price."'".$invoice_title." where `order_id`='".$row['order_id']."'");

mysql_fetch_array($up_order);

}

$insert_company_pay=$db->query("insert into `".$db_config["def"]."company_pay`(order_id,order_price,pay_time,pay_state,com_id,pay_remark,type) values('".$row['order_id']."','-".$price."','".time()."','2','".$userid."','".$row['order_remark']."','2')");

mysql_fetch_array($insert_company_pay);

$new_sql=$db->query("select * from `".$db_config["def"]."company_order` where `order_id`='".$row['order_id']."'");

$row=mysql_fetch_array($new_sql);

}

```

大致成因是這樣的,利用起來也相當的簡單。

```

在文件member\model\com.class.php中:

function paylog_action(){

include(CONFIG_PATH."db.data.php");

$this->yunset("arr_data",$arr_data);

$this->public_action();

/*

省略

*/

}else{

$urlarr=array("c"=>"paylog","page"=>"{{page}}");

$pageurl=$this->url("index","index",$urlarr);

$where="`uid`='".$this->uid."'";

$where.=" and `order_price`>0 order by order_time desc"; //根據這個邏輯只顯示了訂單額大于0的項目,因此訂單號需要我們去猜測。

$this->get_page("company_order",$where,$pageurl,"10");

}

/*

省略

*/

}

```

[](https://images.seebug.org/upload/201409/26134602aa20bcfc0c5bc90f9aa3162f63bc3c34.png)

默認只顯示正數訂單,但是其實訂單都是存在在數據庫中的。

### 漏洞證明:

利用方法:

只要在短時間多次重放訂單數據包,就能在一秒內擁有最多的訂單數,然后跑一遍10000-99999的后綴即可了。

重發使用burpsuite,可以設置大線程。這里有個技巧就是第一個提交一定是一個正常的數據,這樣就可以找到mktime前綴了。

演示一遍。

1、多線程提交訂單

[](https://images.seebug.org/upload/201409/261346376204358a6e25f09eb7986c6235cb974b.png)

2、只會顯示第一個正常的訂單

[](https://images.seebug.org/upload/201409/26134656cdb7306aa1580d6692300e7bff0fb28a.png)

3、數據庫中顯示訂單存在

[](https://images.seebug.org/upload/201409/26134725e86b709d42fafeb3a808032315e3af2e.png)

開始遍歷1411709332這個段的訂單。訂單前綴是在列表中直接顯示的- -。

4、其中blance字段一定要有,值隨意

[](https://images.seebug.org/upload/201409/26134855bf99e8d97cfaa3831621b123867b74ad.png)

坐等跑完

[](https://images.seebug.org/upload/201409/26134931a0627f5f53372f54e164509289c4b675.png)

查看余額

[](https://images.seebug.org/upload/201409/26134950c3327cc3d9995d0e470e650e05e6f2d9.png)

試過這樣就可以使用了,可以買會員,比如上圖的銅牌會員。

總結

以上是生活随笔為你收集整理的php云人才系统操作,PHP云人才系统任意刷钱(附演示)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。