码迷,mamicode.com
首页 > 数据库 > 详细

ProjectSend R561 SQL INJ Analysis

时间:2015-08-05 22:07:56      阅读:456      评论:0      收藏:0      [点我收藏+]

标签:

注入出现在./client-edit.php中

 1 ......
 2 if (isset($_GET[‘id‘])) {
 3     $client_id = mysql_real_escape_string($_GET[‘id‘]);
 4     /**
 5      * Check if the id corresponds to a real client.
 6      * Return 1 if true, 2 if false.
 7      **/
 8     $page_status = (client_exists_id($client_id)) ? 1 : 2;
 9 }
10 else {
11     /**
12      * Return 0 if the id is not set.
13      */
14     $page_status = 0;
15 }
16 
17 /**
18  * Get the clients information from the database to use on the form.
19  */
20 if ($page_status === 1) {
21     $editing = $database->query("SELECT * FROM tbl_users WHERE id=$client_id");
22 ......

$client_id通过GET方式获取值,用Mysql_real_escape_string()处理特殊字符,但是这里$_GET[‘id‘]是数值型的,不考虑单引号的问题,可以直接注入。

技术分享

ProjectSend R561 SQL INJ Analysis

标签:

原文地址:http://www.cnblogs.com/debugzer0/p/4705857.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!