Lab 1 Information Hiding: Before You Start
Lab 1 Information Hiding: Before You Start
Lab 1
Information Hiding
Within each computer, information can be stored as a normal file, hidden file, or in the slack or free
space. The purpose of this lab is to demonstrate each of these approaches to data/information hiding.
In particular, in Part 1, we will examine how one can hide standalone files and folders in Windows OS.
In Part 2, we will examine how data can be stored onto the storage device without actually being
saved as a file in the operating system. In Part 3, we will investigate the use of digital images for the
purpose of data hiding.
What are their respective names and sizes (as shown in Windows Explorer)?
_______________________________________________________________
_______________________________________________________________
2. Now, click on to Windows Start -> Control Panel -> Appearance and Personalization -> Folder
Options -> View. Under ‘Hidden files and folders’, check ‘Show hidden files, folders, and drives’
option. Click Apply. Go back to the Windows Explorer.
How many files do you see now in the folder C:\3482\Lab1\Part1? ___________ .
3. In Control Panel -> Appearance and Themes -> Folder Options -> View, switch back to ‘Don’t
show hidden files, folders, or drives’ option under ‘Hidden files and folders’. Click Apply. (Verify
that, again, you can see only SimpleText_1.txt and SimpleText_2.txt in C:\3482\Lab1\Part1
directory.)
4. Now, open/run another Windows Explorer, but this time ‘as administrator’. (Go to Windows Start ->
All Programs -> Accessories, right-click on Windows Explorer, and select ‘Run as administrator’.)
In this Windows Explorer browse to C:\3482\Lab1\Part1. Right-click on SimpleText_1.txt. Under
Properties -> General -> Attributes check ‘Hidden’ option. Click OK. (Select the Refresh option on
the Right Mouse menu to ensure that the latest change is applied.)
How many files do you see now in the folder C:\3482\Lab1\Part1? ___________ .
5. Open the Command Prompt in Windows (e.g., by going to Start -> (type) cmd). Use the CD
command to navigate to C:\3482\Lab1\Part1. Type: >attrib –h SimpleText_1.txt.
(Back in Windows Explorer) how many files do you see now in the folder
C:\3482\Lab1\Part1? ______________________________________________ .
______________________________________________________________ .
7. Type: >attrib. Observe the output. What is the purpose of attrib command?
______________________________________________________________
______________________________________________________________
In Windows, in addition to making a file ‘hidden’, it is also possible to hide a file ‘behind’ a file. This
feature is known as Alternate Data Streams (ADS), and its use is demonstrated below.
8. In the Command Prompt window, type: >attrib –h LittlePrince_1.jpg. Verify that
LittlePrince_1.jpg can now be seen in the Windows Explorer.
9. Type: >type LittlePrince_1.jpg > SimpleText_1.txt:LittlePrince_1.jpg.
10. Type: >erase LittlePrince_1.jpg.
Can LittlePrince_1.jpg now be seen in Windows Explorer? ______________ .
_______________________________________________________________
_______________________________________________________________
________________________________________________________________
2. Hiding Data in Files [30 points]
In order to do this exercise, you will need to install Hex Workshop Editor on your VM from the
following site: www.hexworkshop.com. Follow the instructions as indication in the installation
procedure.
7. Adjust the mid pane so that it displays 15 bytes per row (i.e., data should be arranged into 15
columns: 0 to E).
8. Now, scroll to memory location 000 000 1E, or use Edit -> Goto menu option to reach this location.
You should see a row of zeros, indicating that this is (likely) an area of the executable that is not
being used and would be an ideal location to start inserting some of our own code. Change this
entire row to be a row of 1-s (11 11 11 11 … 11). Save this new version of Hearts.exe as
Hearts_modified_1.exe.
9. Run the new Hearts_modified_1.exe from Windows Explorer. Verify that the new executable still
runs despite the change.
The filesize of Hearts_modified_1.exe is: ___________ KB.
11. In addition to changing 0000001E, change the last several rows of Hearts_modified_1.exe –
specifically, rows 0001EFD2 to 0001EFFF – from all-‘00’ to all-‘11’. Save this new version of the
executable as Hearts_modified_2.exe. Verify that even this version of the executable still runs as
intended. (With further experimentation, you would find that you could insert quite a bit of code
before the executable eventually ‘broke’, i.e., was not running properly. Be careful when
experimenting, though, since you could accidentally create code with unintended consequences,
e.g., you could damage the file system or corrupt computer memory.1)
The filesize of Hearts_modified_2.exe is: ___________ KB.
13. By comparing the previously recorded values, answer the following question.
What is the impact of data inserting on the file’s size and file’s checksum?
________________________________________________________________
________________________________________________________________
14. Close all files in Hex Workshop. Go to Tools -> Compare -> Compare Files ... . Click the button
(with ellipses) to the right of the Source box, and browse to C:\3482\Lab1\Part2\Hearts.exe. Click
the button (with ellipses) to the right of the Target box and browse to
C:\3482\Lab1\Part2\Hearts_modified_2.exe. Make sure the Resynchronizing Compare radio
button option is selected. Click Ok to begin comparing the two files.
15. View the results of the Compare File operation in Results pane (appears at the bottom of Hex
Workshop window).
How many Replaced/Inserted/Deleted segments have been identified?
_________________________________________________________________
16. Finally, run SecretHearts.exe from Windows Explorer. Verify that this executable also runs as
intended.
17. SecretHearts.exe hides a secret message. By following the procedure described in 14. identify the
content of the secret message. (Hint: inspect the content of all Replaced/Inserted/Deleted
segments.)
The secret message is: _____________________________________________
__________________________________________________________________
__________________________________________________________________
1 To avoid potentially destructive consequences, try experimenting with image instead of executable files.
3. Steganography [50 points]
Steganography is the art of secret writing. With steganography,
message can be hidden in an image or a sound file. While in
cryptography the attacker knows that there is a secret message
and attempts to decipher it, in steganography the objective is
to keep the attacker from knowing that a secret message exists.
1. Find Jphswin (JPHS) icon on the computer’s desktop, and double-click on it to launch the
application. After accepting the licence terms, you should see the following screen.
4. From JPHS menu, choose ‘Open.jpeg’, navigate to C:\3482\Lab1\Part3, and open MonaLisa.jpeg.
JPHS will populate the ‘Input jpeg file’ information from the selected file. Notice that it will specify a
maximum file size that can be hidden within this image (under “Approximate max capacity”), and
recommend a limit that will make it less likely that the corruption of the image will be visually
detectable (under “recommended limit”).
What is the recommended limit to the data
file size that can be hidden in MonaLisa.jpeg? __________________________
5. In the Windows Explorer, right click on the secret/confidential file CONFIDENTIAL.pdf, and
choose ‘Properties’.
The filesize of CONFIDENTIAL.pdf is: ________________ KB.
10. Restart JPHS. Repeat steps 4. to 9., but this time use nature.jpeg as the image in which you will
hide CONFIDENTIAL.pdf. Save the newly created image (containing CONFIDENTIAL.pdf) as
nature_modified.jpeg. Open both nature.jpeg and nature_modified.jpeg in Windows Picture
Viewer. Switch between the two files to study visual differences.
What differences between nature.jpeg and
nature_modified.jpeg can you detect? _________________________
11. Now, use Windows Picture Viewer ‘zoom in’ feature. Zoom into the sky at/above the horizon line
on both images, equally.
What differences between the two images can you now detect? Explain!
________________________________________________________________
________________________________________________________________
_______________________________________________________________
13. In the Windows Explorer, double-click on flowers.jpeg to bring it up in the Windows Picture
Viewer. Inspect the image.
Do you observe anything unusual about this image? _____________________
14. Restart JPHS one more time. Choose ‘Open jpeg’ from the menu. Select flowers.jpeg.
15. Choose ‘Seek’ from the menu. A passphrase dialog box will open. Enter ‘surprise’ into both - the
passphrase and confirmation text boxes. Click ‘OK’.
16. A dialog box will open to allow you to choose a file name and location in which to deposit the
recovered information. Enter the file name myFile.pdf. (As can be observed in Windows Explorer,
a new file named MyFile.pdf will consequently appear in the directory C:\3482\Lab1\Part3.)
17. From the Windows Explorer, open myFile.pdf.
What is the content of myFile.pdf?
________________________________________________________________