创意安天

 找回密码
 注册创意安天

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

[复制链接]
发表于 2009-10-29 23:07 | 显示全部楼层 |阅读模式
在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 : 5.1.0  */
/*  Author  : RM     */
/*  Comment : 071223 */
/*                   */
/*********************/

_obfuscate_JQYdYn1jfBI
您需要登录后才可以回帖 登录 | 注册创意安天

本版积分规则

小黑屋|手机版|Archiver|创意安天 ( 京ICP备09068574,ICP证100468号。 )

GMT+8, 2024-5-20 00:29

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表