首页 电脑 电脑学堂 查看内容

dvbbs php 的一个小注入

2008-12-29 10:03 596 0

摘要: dispuser.php文件 $UserName = trim($name);          ...
关键词: nbsp UserName showUserID WHERE phpeval UserID 安全性 stmt dispuser 直接

dispuser.php文件 $UserName = trim($name);                    //这句开始出问题if( is_numeric($id) ){  $showUserID = intval($id);} else{                                     //一个逻辑问题   if( $UserName == '' ){    $ErrCodes = $lang['UrlArgError'];        //by: phpeval  }} 没有考虑到,如果id变量不存在且UserName存在的情况,$showUserID就不会被初始化,这样就给直接get或post提交我们自己构造的$showUserID 下面   if( empty($showUserID) ){    $updStmt .= " WHERE UserName='{$UserName}' ";    $stmt .= " WHERE UserName='{$UserName}' ";    $onstat = " WHERE UserName='{$UserName}' ";  } else{    $updStmt .= " WHERE UserID={$showUserID} ";    $stmt .= " WHERE UserID={$showUserID} ";    $onstat = " WHERE UserID={$showUserID} ";  }  if( $query = $db->query($stmt) ){      //注入了,by: http://www.phpeval.cn 直接 http://www.phpeval.cn/dispuser.php?name=phpeval&showUserID=1%20and%201=2 猜 dv php的安全性和dv asp 的安全性不在一个档次。
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部