ZYADS SQL injection and local inclusion Vulnerabilities

Source: Internet
Author: User

ZYADS SQL injection and local inclusion Vulnerabilities

Rows 1-31 in index/news. php
<?
Include_once ("top. php ");

$ Newsid = intval ($ _ GET [id]);

$ To_type = addslashes ($ _ GET [type]);

If ($ to_type = index)
{
$ To_type_s = "and to_type = 1 ";
}

If ($ to_type = webuser)
{
$ To_type_s = "and to_type! = 3 ";
}

If ($ to_type = webadver)
{
$ To_type_s = "and to_type! = 2 ";
}

$ Newssql = select * from zyads_news WHERE 'id' =. $ newsid.

. $ To_type_s .;

$ Newsre = $ db-> query ($ newssql );
$ Newsrow = $ db-> fetch_array ($ newsre );
If (empty ($ newsrow )){

Zyads_message (zyads_news );
}
?>

We can see that $ to_type is not defined or is not equal to index, webuser, webadver, then $ to_type_s is not defined.

At this time, we can submit a $ to_type_s variable for SQL injection. Simple injection.

In/code/adview_cpa_html.php 1-46
<? Php
/*********************/
/**/
/* Version: 5.1.0 */
/* Author: RM */
/* Comments: 071223 */
/**/
/*********************/

_ Obfuscate_JQYdYn1jfBI

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.