大汉版通JIS统一身份认证系统后台文件另一处上传漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: 一处有点奇葩的文件上传……………… ### 详细说明: 关键点:找到路径、绕过某个无聊的if判断。需要管理员权限 ### 漏洞证明: jis/manage/sys/opr_logo.jsp ``` String strLoadPath = request.getSession().getServletContext().getRealPath("/front"); Convert.createDirectory( strLoadPath + "/tmp/" ); CommonUploadFile upload = new CommonUploadFile( strLoadPath +"/tmp", ""); ``` 路径在front下的tmp文件夹 接着看: ``` if(strFileName.toLowerCase().endsWith("gif")||strFileName.toLowerCase().endsWith("jpg")){ //修改文件名 file = new File( strLoadPath + "/tmp/" + strFileName ); fileNew = new File( strLoadPath + "/logo/t_logo.gif" ); if(fileNew.exists()) fileNew.delete(); file.renameTo( fileNew); } ``` 这段if是我们要绕过的,为什么呢?因为只要是后面3位字符是gif或jpg,他就会将文件重命名!修改为t_logo.gif 如果我们不是这3个字符结尾的话,就不会重命名!也就是说,可以直接上传jsp文件,找到路径就可以了!在tmp文件夹下他不会重命名文件的。感觉很神奇 [<img src="https://images.seebug.org/upload/201402/06115108a71178980af56cdaaf5dd1c7a28601ac.png" alt="image069.png" width="600"...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息