I'm really curious about security for the web. I have read a lot of articles about the issue with the upload file in php and particularly the one about the double extension: img.php.jpg or img.php.gif.
I've tried to understand how this thing works. I have already understand what is the security vulnerability and I have created my own image with some PHP code inside. For that, I have used HxD for writing in Hexa inside of my image. But unfortunately, I cannot run the code in my img on my local server (I'm using WAMP). Something seems missing but I don't know what. Do I have to configure something in particular in my WAMP?
Edit
I'm not trying to find a way for implementing a script against this vulnerability. I want to reproduce this vulnerability on my computer for understanding how that works exactly. But as I said before, the php interpreter doesn't read the php inside my img and I don't know why. I have tried during a long time and I don't understand why the php is not read inside the image. I have read a lot of articles about it and that seems to be automatic. If I understand clearly when you are trying to show the image the php inside is interpreted. But not in my case, why?