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

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

缺陷编号:wooyun-2014-078923

漏洞标题:bookingeCMS ktvCMS无任何限制重装

相关厂商:珠海中新信息科技有限公司

漏洞作者: 路人甲

提交时间:2014-10-15 11:34

修复时间:2015-01-13 11:36

公开时间:2015-01-13 11:36

漏洞类型:设计缺陷/逻辑错误

危害等级:高

自评Rank:10

漏洞状态:未联系到厂商或者厂商积极忽略

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-10-15: 积极联系厂商并且等待厂商认领中,细节不对外公开
2015-01-13: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

有人争论重装算不算通用,如果cms连最基本的安装锁都没有用呢?或者没有生成一个按钮提示用户删除install呢?再或者安装完成后没有把安装目录rename一下?

详细说明:

安装前能判断一下lock吗?安装步骤能判断一下吗?生成lock放那里是摆设吗?
看下面安装代码,install/index.php

$install = new install();
$step = isset($_GET['step']{0}) ? $_GET['step'] : 1;
if($step == 1) {
$license = file_get_contents(MY_ROOT.'license.html');
include MY_ROOT.'templates'.DIRECTORY_SEPARATOR.'step-1.html';
} elseif($step == 2) {
$isError = FALSE;
$sp_gd = $install->checkGD();
$isError = ($sp_gd > 0 ? $isError : TRUE);
$sp_allow_url_fopen = (ini_get('allow_url_fopen') ? array('<img src="images/ok.gif" alt="成功" />', 'allow_url_fopen 已开启!') : array('<img src="images/error.gif" alt="失败" />', 'allow_url_fopen 未开启!'));
$sp_safe_mode = (ini_get('safe_mode') ? array('<img src="images/error.gif" alt="失败" />', 'safe_mode 已开启!') : array('<img src="images/ok.gif" alt="成功" />', 'safe_mode 已关闭!'));
$sp_gd = ($sp_gd > 0 ? array('<img src="images/ok.gif" alt="成功" />', 'GD 扩展已开启!') : array('<img src="images/error.gif" alt="失败" />', 'GD 扩展未开启!'));
$sp_mysql = (function_exists('mysql_connect') ? array('<img src="images/ok.gif" alt="成功" />', 'MySQL 扩展已开启!') : array('<img src="images/error.gif" alt="失败" />', 'MySQL 扩展未开启!'));
$isError = (function_exists('mysql_connect') ? $isError : TRUE);
$sys_file = array(
'data' => array('Cache', 'Config', 'Xml'),
'lib' => array('Controller' => 'admin', 'Model' => 'admin', 'My', 'Plugin', 'View' ),
'theme',
'upload'
);
$auth = $install->checkAuthority(APP_ROOT, $sys_file);
include MY_ROOT.'templates'.DIRECTORY_SEPARATOR.'step-2.html';
} elseif($step == 3) {
$return = '';
if(isset($_POST['sql_name']{0})) {
$return = $install->initDb();
if($return === TRUE) {
header('Location:index.php?step=4');
exit();
}
}
include MY_ROOT.'templates'.DIRECTORY_SEPARATOR.'step-3.html';
} elseif($step == 4) {
$return = '';
if(isset($_POST['adminName']{0})) {
$return = $install->initAdmin();
if($return === TRUE) {
header('Location:index.php?step=5');
exit();
}
}
include MY_ROOT.'templates'.DIRECTORY_SEPARATOR.'step-4.html';
} elseif($step == 5) {
$admin = $install->getAdmin();
$file = fopen(MY_DATADIR.'install.lock', 'ab');
if(!$file) {
fwrite($file, '');
fflush($file);
fclose($file);
}
include MY_ROOT.'templates'.DIRECTORY_SEPARATOR.'step-5.html';
}

安装前敢不敢判断一下lock?
步骤控制变量step用户可控,可直接查看安装完成后的界面,demo演示:http://ktv.cms.bookinge.com/install/index.php?step=5

demo_step5副本.jpg

漏洞证明:

第一次测试时把demo给重装了,见谅~~下载用本机环境截图作证明吧

step5副本.jpg

修复方案:

安装前判断lock
或者 强制删除install目录
再或者 把安装目录rename一下
安装过程对step进行判断

版权声明:转载请注明来源 路人甲@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝