Use steganography to hide a text message in an image on your website

  1. ssh to rona and cd to the www directory
  2. choose an image file that's already a local file on the site to serve as the cover-medium.
  3. if the image is not already a .bmp image, use the convert command to convert to bmp. For example
    convert cat.jpg cat.bmp
  4. choose a text message or a second file to serve as the embedded message.
  5. Using a ! in the message is problematic if you put ""s not ''s around the message, as ! means something special to the shell. So don't use it!
    use bmpsteg to embed the message and create the stego-medium If you embed a text message, the command will look something like
    bmpsteg -h -i vacation.bmp -o newvacation.bmp -t 'We attack at dawn'
    If you embed a file (like secret.docx) it'd look like
    bmpsteg -h -i vacation.bmp -o newvacation.bmp -f secret.docx
    A new file is created, whose name is given by the -o option (in my example newvacation.bmp), and this is the "stego-medium".
  6. Change permissions on your new file to allow the webserver to read it. The syntax is chmod a+r filename. So, for example, if newvacation.bmp is the file with the hidden message, you'd give the command:
    chmod a+r newvacation.bmp
  7. change the <img> tag's src attribute in the .html file so that it refers to this new "stego-medium" file. There are two ways to do this: