首页 > 数据库技术 > 详细

ProjectSend R561 SQL INJ Analysis

时间:2015-08-05 22:05:05      阅读:335      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!