Use steganography to hide a text message in an image!

Download Tool & Image

  1. Download (right click, Save link as...) bmpsteg.exe and save it to your downloads folder. You may get a warning from your browser that the download is "unsafe" - it isn't, so you can allow the download!
  2. Open your "Downloads" folder and confirm that bmpsteg.exe is in there.
  3. Now, open a standard Command Prompt/Shell and navigate to the downloads folder (C:\>cd downloads).
  4. Type C:\>bmpsteg and hit enter.
  5. You should see a "usage" menu - indicating that you can now use the program!
  6. Next, go out on the internet and find a .bmp image to use for the exercise. Alternatively, you can simply use the image of the ski patroller and toboggan (toboggan.bmp) from the previous page. Whichever image you use, you will need to download it to the same folder that bmpsteg.exe is in (probably the downloads folder).

Using BMPSTEG to Embed Message

  1. Use bmpsteg to embed a simple text message into the image. The command will look something like this:
    bmpsteg -h -i original_file_name.bmp -o new_file_name.bmp -t "We attack at dawn"
    Note 1: "original_file_name.bmp" should be replaced with the filename of the .bmp image you're using. "new_file_name.bmp" is the NEW file you're creating with this command - you can name it anything!)
    Note 2: 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!
    Note 3: bmpsteg doesn't provide a confirmation message - if you don't get an error, it probably worked! If you get an error about opening a file, either you're not in the downloads folder or the file you're trying to modify isn't in there.

    This should have created a new .bmp image file in the folder. Open your new .bmp image and verify that there is little to no difference between it and the original (unaltered) image.

  2. If you want to try to embed an entire word document - first find a document to use, and copy/download it to the same folder that bmpsteg.exe is in (probably the downloads folder). The command will look something like this:
  3. bmpsteg -h -i original_file_name.bmp -o new_file_name.bmp -f doc_file_name.docx
    Again, this command should have created a new .bmp image file in the folder. Even with an entire document embedded in it, there should be little to no difference between the original image and the new image!
    Remember - the new file you created is referred to as the "stego-medium"!

You can now share your file (i.e. via email), and your recipient can "extract" the secret message using the instructions below.

Using BMPSTEG to Extract Message

  1. You can also use bmpsteg to extract a message from a stego-medium image.
  2. First, ensure that the image your partner sent you is in the same folder as bmpsteg.exe (probably the downloads folder).
  3. Then, use a command like this to extract the secret message:
    bmpsteg -r -i new_file_name.bmp -o secret.txt
    Note 1: This is the command to extract an embedded line of text. If your partner embedded a word document, see the command below to extract it.
    Note 2: "new_file_name.bmp" should be replaced with the filename of the .bmp image your partner sent you.
    Note 3: "secret.txt" is the text file that bmpsteg will create with the extracted message (you can name the file anything you like).

    This should have created a new .txt file in the folder. You can go open it to view the extracted message!

  4. If your partner embedded a word document in the image, you can use a command like this to extract it:
  5. bmpsteg -r -i new_file_name.bmp -o secret.docx
    Note 1: Take note of the file extension of the output file - since you are extracting an entire word document, it needs to be .docx!

    This should have created a new .docx file in the folder. You can go open it to view the secret document!

Once you have a file with an embedded message in it (steg-medium), you can either email it to me or upload it to the assignment in Canvas!