File upload loophole exercise notes (1)
(1) Open the website
(2) We noticed that a picture was uploaded. Send it to jpg first.
(3) you can see Stored in: upload/Tulips.jpg in the result.
Remember that this is the path where the file is saved, which will be used later.
Next, let's take a look at other files, php, or any suffix file to explore his filtering ability.
I wrote a php file for 1text.php
(4) We found that we could not upload the file, but we could not catch the bag, so we could judge that we had filtered the file locally.
At this point, we can look at the source code and find that there is a check with a suffix.
(5) We now change 1test.php to 1test.jpg.
(6) it can be found that the file can be uploaded successfully.
(7) but obviously, this is not the result we want, and the jpg format cannot be parsed directly.
At this point, let's see if we can change the file name back to php when uploading.
(8) unexpectedly, it was a success. Let's connect our kitchen knives. The speed of the Internet is too lame, that's all
(9) increase the difficulty below, if the upload is not successful
Use the case test, or add 1 2 3 4 5, etc., or try the pht file