Ever wanted to share some confidential info invisible to the normal human eye with a friend? Though you can encrypt the data you send, a password protected file or a file that cannot be opened with normal applications smells fishy. However, you can send your message embedded in a small JPEG file to hide it in plain sight. The advantage is the image can still be opened in an image viewer and no one will suspect without a strong reason to do so. Here’s a simple way to do that on Linux.

Edit a plaintext file and add your note. Save the file. Let’s say the filename is plaintext. Check the size of the file (preferably small in size) $ stat myimage.jpg ... Size: 20990 ... Append some zeroes (here 16 bytes) to the end of the image for easy reading $ dd if=/dev/zero bs=1 count=16 >> myimage.jpg Append the file to the image $ dd if=./plaintext bs=1 >> myimage.jpg The receiver can view the text using hexdump and scrolling to the end $ hexdump -C ./myimage.jpg | more The receiver can also retrieve the full text file by skipping the length of the original image from Step 2 + zero padding $ dd if=./myimage.jpg of=textfile bs=1 skip=21006

Though I took text as an example, you can add any file as a payload to an image this way. So you can encrypt the plaintext file and append it. You cna also edit the magic number of a file or the start and end markers to make it more difficult to recognize the correct format.