作者:mr.sun | 来源:互联网 | 2017-11-12 00:48
作者:q1ur3n中易广告联盟系统(ZYADS)sql注入和本地包含漏洞解析在indexnews.php1-31行?include_once(top.php);$newsidintval($_GET[id]);$to_typeaddslashes($_GET[type]);if($to_typeindex){$to_type_san
作者:q1ur3n
中易广告联盟系统(ZYADS) sql注入和本地包含漏洞解析
在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 (emptyempty($newsrow)){
-
- zyads_message('zyads_news');
- }
- ?>
可以看到$to_type没定义或者不等于index,webuser,webadver的话 那么$to_type_s是没有定义的
这时候我们就可以提交一个$to_type_s变量来进行sql注入。简单的注入,呵呵。
在/code/adview_cpa_html.php 1-46行
-
-
-
-
-
-
-
-
- _obfuscate_JQYdYn1jfBI