Hiding Secret Messages In Cover Files
Hiding Secret Messages In Cover Files
the slave to deliver the message. Others used invisible inks, which are invisible either on application or soon thereafter, and can later be made visible by some means (e.g., heating, exposing under ultraviolet light). Johannes Trithemius first used the term steganography in a book called Steganographia. The word is a combination of the Greek steganos , which means concealed, with graphein , which means writing.
Installing Oracle VirtualBox: In this lab, we will work with a Debian VM done for Oracle VirtualBox. VirtualBox is a free, multi-platform hypervisor. It is an alternative to VMware Workstation Pro. Download VirtualBox from https://www.virtualbox.org/wiki/ Downloads. Be sure to select the version that corresponds to your host operating system and install it on your computer.
Hiding Secret Messages In Cover Files
Downloading and Installing the Debian VM: Download the Debian VM as specified by the instructor. It is a ZIP file. Unzip it and put the resulting folder in your desktop. To add the new Debian VM to VirtualBox Machine menu. Browse and find the folder that you just extracted in your desktop. Inside this folder, you should see a file associated with a blue cube icon , as shown in Figure 1. Now, you should be able to start your Debian VM.
Figure 1: Browsing in Search of the Configuration File of the VM
BMP Files: The format of a BMP file is made of four parts:
File Header: This header is 14-byte long and has information about the type and total size of the BMP file, as well as the starting position of the bitmap data (see Table 2).
DIB Header: There are several versions of the DIB (Device-Independent Bitmap) header. It specifies the dimensions (width and height), compression type, and color format for the bitmap.
Hiding Secret Messages In Cover Files
Color Table: This part is optional and defines as an array containing as many elements as there are colors in the bitmap.
Bitmap Data: This part contains the actual image data, represented by consecutive rows or scan lines of the bitmap. The lines are scanned from the lowest to the upmost. Each scan line consists of consecutive bytes representing the pixels in the scan line, in left-to-right order.
There are several types of BMP files, according to the color depth: 1 bit per pixel: This format just has two colors (generally, black and white). The pixels with 0 indicate one
color, while the pixels with 1 represent the other color. In this case, one byte stores the information of eight pixels.
2 bits per pixel: This format supports four distinct colors and stores four pixels per byte. 4 bits per pixel: This format supports sixteen distinct colors and stores two pixels per byte. 8 bits per pixel: This format supports 256 distinct colors and stores one pixel per byte. 16 bits per pixel: This format supports 65,536 distinct colors and stores 1 pixel per 2-byte word. 24 bits per pixel: This format supports 16,777,216 distinct colors and stores 1 pixel per 3-byte word.
In this lab, we will focus on BMP images with a 24-bit color depth and no compression. Hence, each pixel will be represented by three bytes (Red-Green-Blue or RGB) in the actual bitmap data area. Images stored in this format do not have a color table (not required since the colors of the pixels are directly represented in the RGB system). Also, note that we will be using the BITMAPINFOHEADER type for the DIB header (see Table 3).
Name of Field Offset in
hexadecimal Size in Bytes
Description
FileType 0000 2 A 2-character string value in ASCII to specify a BMP file type. It must be BM or 42 4D .
FileSize 0002 4 The total number of bytes in a BMP file. Reserved1 0006 2 Reserved. Reserved2 0008 2 Reserved.
PixelDataOffset 000A 4 The offset in bytes to find the start of the bitmap data aera, from the beginning of the file. In other words, it is the number of bytes between the start of the file and the first byte of the bitmap data.
Table 2: File Header for BMP Files
Name of Field Offset in
hexadecimal Size in Bytes
Description
Hiding Secret Messages In Cover Files
HeaderSize 000E 4 The size of the DIB header in bytes. It should be 40 in decimal to represent a DIB header of type BITMAPINFOHEADER.
ImageWidth 0012 4 The width of the image in pixels. ImageHeight 0016 4 The height of the image in pixels.
Planes 001A 2 The number of color planes of the target device. Must be 1 in decimal.
BitsPerPixel 001C 2 The number of bits to represent the color of a pixel in the bitmap data. This is also known as the color depth (e.g., 1, 4, 8, 16, 24, or 32).
Compression 001E 4 The compression method to be used. It should be 0 in decimal to represent no-compression.
ImageSize 0022 4 The size of the compressed image. It should be 0 in decimal when no compression algorithm is used.
XpixelsPerMeter 0026 4 The horizontal resolution of the target device. This parameter will be adjusted by the image processing application but should be set to 0 in decimal to indicate no preference.
YpixelsPerMeter 002A 4 The vertical resolution of the target device (same as the above).
TotalColors 002E 4 The number of colors in the color table. If this is set to 0 in decimal, hence there is no color table, and the number of used colors is 2^BitsPerPixel.
ImportantColors 0032 4 The number of important colors used. Generally ignored by setting 0 in decimal as its value.
Table 3: DIB Header for 24-bit Color Depth BMP Files
To better understand the 24-bit color depth BMP format, let us consider a very small image of size 16×4, that is, with a width of sixteen pixels and a height of four pixels, as shown in Figure 2. In this example, to make it easier to understand, the sixteen pixels of each scan line have the same color. The lowest scan line is blue (