网站地图    收藏   

主页 > 后端 > 网站安全 >

XRayCMS 1.1.1 万能密码及修复 - 网站安全 - 自学ph

来源:自学PHP网    时间:2015-04-17 13:03 作者: 阅读:

[导读] #...

作者: chap0 

下载地址: http://sourceforge.net/projects/xraycms/files/latest/download

影响版本: 1.1.1 

测试平台: Ubuntu 

XRay CMS is含sql注射可以让用户绕过验证登陆. If a malicious 

user supplies ' or 1=1# into the applications user name field 

they will be logged into the applications admin account. 

Jan 29, 2012 – Contacted Vendor No Response 

Feb 05, 2012 – Public Disclosure 

Since the vendor did not reply we attempted to create our own 

fixes for this issue. The vulnerability exist in “login2.php” 

on lines 20 and 21. 

17  if(!isset($_POST['username'])) header("Location: login.php?error_username"); 

18  if(!isset($_POST['password'])) header("Location: login.php?error_password"); 

19 

20  $user = $_POST['username']; 

21  $pass = $_POST['password']; 

If the lines 20 and 21 are changed to: 

$user = mysql_real_escape_string($_POST['username']); 

$pass = mysql_real_escape_string($_POST['password']); 

This will prevent the sql injection from happening in the user name field.

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论