tag (zip)

archive

magic file: hide a zip archive inside a jpeg image file Mar
30
1
0

I'm not an expert on file formats so I can't explain why this actually works, but it is possible to append zip files onto a jpeg image. I've been told this works because both .jpg and .zip interpreters are pretty hardy. Word on the street is they both have well defined headers that explicitly locate the relevant bits and ignores any extraneous information, but I can't verify this.

In any case, If you type something like this in the terminal:

cat picture.jpg program.zip > magicfile.jpg

you'll end up with what will look like an ordinary image file that will display just fine on your web page. However, if you change the extension on <magicfile.jpg> to <magicfile.zip> you get a file that you can then unzip; or if you're feeling frisky you can just go ahead and directly unzip the .jpg file.

You can use this to hide files, create unique distribution packages, or land that cute geeky chick in the corner that you've had a crush on all year. I don't know what you'd actually use this for, perhaps sneaking files past your email firewall, but it's nice to know it works.

So venture forth now that I've got you unzipping everyone's jpegs searching for porn archives and password files.

comments