当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2014-067045

漏洞标题:置信经典OriTop管理系统sql注入以及任意文件下载

相关厂商:置信经典OriTop管理系统

漏洞作者: BMa

提交时间:2014-07-06 13:20

修复时间:2014-10-04 13:22

公开时间:2014-10-04 13:22

漏洞类型:SQL注射漏洞

危害等级:低

自评Rank:5

漏洞状态:已交由第三方合作机构(cncert国家互联网应急中心)处理

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-07-06: 细节已通知厂商并且等待厂商处理中
2014-07-11: 厂商已经确认,细节仅向厂商公开
2014-07-14: 细节向第三方安全合作伙伴开放
2014-09-04: 细节向核心白帽子及相关领域专家公开
2014-09-14: 细节向普通白帽子公开
2014-09-24: 细节向实习白帽子公开
2014-10-04: 细节向公众公开

简要描述:

详细说明:

置信经典OriTop管理系统sql注入以及任意文件下载
这是一个小的cms,主要是用于医院网站如:
http://xtmc.oritop.com/shixi/admin/
http://www.xtzyyy.com/admin/
http://www.xtguke.com/admin/
http://www.eyehospital.com/admin/
http://www.xtsz.com.cn/admin/
http://www.xtast.org/admin/
http://jingniugqt.com/admin/
sql注入点:http://www.eyehospital.com/About.php?id=4
代码如下,参数id只是简单地检测了变量是否设置,然后直接带入查询:

<?php
if(!isset($_GET['id']) && !isset($_GET['Id']))
{
echo "<script language=javascript>top.location.replace('./');</script>";
exit;
}
$id = isset($_GET['id']) ? $_GET['id'] : $_GET['Id'];
include "Include/global.php";
include "Include/config.php";
$DataBase = new DataBase;
$DataBase->OpenDataBase();
$qid = mysql_query("SELECT * FROM about WHERE id='$id'");
if(mysql_num_rows($qid) > 0)
{
$row = mysql_fetch_row($qid);
}
else
{
header("location: ./");
exit;
}
include "Template/Header.tpl";
include "Template/About.tpl";
include "Template/Footer.tpl";
?>


任意文件下载http://xtsz.com.cn/ShowFile.php?id=../index.php
代码如下,也是没有验证:

<?php
include "Include/global.php";
include "Include/config.php";
if(isset($_GET['id']) && $_GET['id'] != "")
{
$file_name = $_GET['id'];
$file_root_name = "$upfile_root_path/$file_name";
if (!file_exists($file_root_name))
{
echo "文件不存在";
exit;
}
$file_postfix = pathinfo($file_name);
$file_postfix = strtolower($file_postfix["extension"]);

if($file_postfix != "jpg" && $file_postfix != "gif")
{
$file = fopen($file_root_name,"r"); // 打开文件
// 输入文件标签
Header("Content-type: application/octet-stream");
Header("Accept-Ranges: bytes");
Header("Accept-Length: ".filesize($file_root_name));
Header("Content-Disposition: attachment; filename=" . $file_name);
// 输出文件内容
echo fread($file,filesize($file_root_name));
fclose($file);
exit;
}
else
{
// Content type
header('Content-type: image/gif');
if($file_postfix != "gif")
{
$image = imagecreatefromjpeg($file_root_name);
imagejpeg($image);
}
else
{
$image = imagecreatefromgif($file_root_name);
imagegif($image);
}
// Output
ImageDestroy($image);
}
}
?>

漏洞证明:

1.png


2.png


3.png

修复方案:

版权声明:转载请注明来源 BMa@乌云


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2014-07-11 09:39

厂商回复:

CNVD确认所述漏洞情况,由于未能建立与软件生产厂商的联系渠道,该漏洞需要厂商认领,待处置。

最新状态:

暂无