Web - Server

Friday 3 June 2016, 15:34  #1
Web - Server: File upload (MIME-type and double extensions)
nopslide
  • 1 posts

Two things:

1) In double extensions, why does the correct filename (which I’m not allowed to say here) manage to produce a shell? If it ends with .gif, shouldn’t it be opened as a gif, therefore not giving us a shell? Or is it implied that there is also a .htaccess error, meaning that for some reason gifs are opened by PHP? I don’t understand. I think this is also a reason why I can’t work out how to do the MIME-type challenge.

2) I can’t seem to get MIME-type file upload to work. I managed to get a shell.gif (containing PHP code) uploaded by tampering with the MIME headers, but when I try to open that, then it says the image can’t be displayed. When I try to upload shell.php.gif or shell.PHP.gif, then it says "wrong filetype". My next thought would be to try to upload shell.pl.gif, but I feel like I’m probably headed in the wrong direction. Can anyone help with this?

Thursday 16 June 2016, 11:40  #2
Web - Server: File upload (MIME-type and double extensions)
Matthieu
  • 30 posts

Hey,
You’re going in the wrong way for both challenge,
Let’s take information on internet about the double extention you’ll understand fast !!
For the type mime if you you’re trying to upload a .gif, you are totally wrong !
Good Luck