

See the pic below, I am using my generic 'tiny shell' code to allow me to pass shell commands to the server on the fly. (Edit: My good pal Hooded Robin wrote a nifty exif editor and shell builder in Ruby, check it out here ).Ĭreate a small image (avatar size) in MSPaint (white background), we can use Exif Pilot to open/edit the file and edit the Exif data- inserting our PHP code into the 'comment' section. For purposes of this tutorial I use Exif Pilot. EXIF 'meta' data such as the camera model the image was taken on, image descriptions, and comments are editable with progams such as GIMP and even a hex editor. There is an amazing amount of information that can be stored in a jpg file along side the actualy image data. We turn to the trusty JPG file as our example image. The only full-proof solution is to actually upload a real image which will actually pass these checks rather than trying to bypass them. At this point, all the other methods will fail (there are other functions that can be used with a similar goal such as checking image dimensions). Air Force pilot navigates an F-35A Lightning II aircraft assigned to the 58th Fighter Squadron, 33rd Fighter Wing into position to refuel with a KC-135 Stratotanker assigned to the 336th Air Refueling Squadron over the northwest coast of Florida May 16, 2013. $imageinfo = getimagesize ( $_FILES ) The function getimagesize() effectively confirms whether the uploaded file is an image or not. Perform further checks once uploaded to make sure it is a REAL image:
