Lenovo happy Q bar Upload Vulnerability and repair

Source: Internet
Author: User

The old rule is, what is the site?
Http://ask.lenovomobile.com/lenovo is the topic of the Lenovo product! This time I am not a good B.
 
 
2. Let me also ask a question. Here is just a test! Accidentally saw a place to upload images! Have a try! I want to upload a normal image first.
 
 
3.upload test.jpg, my most common avatar. Haha! Click Upload
 
 
4. During the upload process, capture a package and check how to upload the file. Can I change the file name to "test.jpg?
 
 






 
 
 
5. Check the returned results. It may contain the relative address of the uploaded file! Sure enough!
 
 
6. Access this address and the result is as follows:
 
 
7.re-upload the file. In the case of www.2cto.com.pdf, change the filenamevalue test.jpg to test. php, as shown below:
 
 
8. Let's look at the returned address again. Oh, I am sorry, the server did not really make a decision. Is the suffix still. php?
 
 
9. Don't talk about anything. Fuck the kitchen knife:
 

 
Solution:

1. The filtering and judgment of the client are all on the cloud, and the server still needs to make a judgment;
2. The file name is changed to a random name, but the suffix should be changed;
3. It is recommended that you save the uploaded files to another Intranet server or another server that stores static files. This way, even if the PHP file is uploaded successfully, it cannot be executed;
4. If you do not have any conditions, we recommend that you set the directory of the uploaded file to be unexecutable.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.