GIF+ZIP = cheap steganography

Random questions or observations about and around computers
Post Reply
User avatar
Posts: 3077
Joined: Fri Apr 07, 2006 12:10 pm
Location: Schtroumpf

GIF+ZIP = cheap steganography

Post by Vincent » Sun Oct 05, 2008 4:36 pm

l stumbled upon a very nice bit of computer magic on this page.
Robert de Bath wrote:There are two tiny facts about GIF files and ZIP files you might like to know about: GIF files have their length defined at the start of the file; any bytes after are ignored. ZIP files have a table at the end; anything at the start of the file is ignored. The result is that a file can be both a GIF and a ZIP, just change the extension.
It is very easy to use that observation to create GIF files with hidden data: for instance the following innocent-looking image
stega.gif (48.32 KiB) Viewed 13465 times
contains my timetable for next week in PDF format. Just rename it as a zip file and extract everything; you may see an error message, but you will get the file nonetheless.

The nice thing about this method is that it is trivial on any *nix system: to create a file Z.gif, looking like the image X.gif, hiding, just type cat X.gif > Z.gif

There are probably many other pairs of fileformats sharing this property on which the method could be applied.

(nice page about formats)
{ Vincent Hugot }

Post Reply

Who is online

Users browsing this forum: No registered users and 44 guests