返回列表 发帖

中易广告联盟系统(ZYADS) sql注入和本地包含漏洞

作者:q1ur3n

在index/news.php 1-31行


<?
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’);
      }
?>
可以看到to_type没定义或者不等于index,webuser,webadver的话 那么to_type_s是没有定义的

这时候我们就可以提交一个to_type_s变量来进行sql注入。简单的注入,呵呵。

在/code/adview_cpa_html.php 1-46行

<?php
/*********************/
/*                   */
/*  Version : 50  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

_obfuscate_JQYdYn1jfBI

返回列表