DFM LAB MANUAL 1
DFM LAB MANUAL 1
LAB MANUAL
Course Outcomes:
Upon the successful completion of the course, students will be able to:
Knowledge
Level (Based on
CO Nos. Course Outcomes
revised Bloom’s
Taxonomy)
Outline and Explore the fundamentals of Digital Forensics
CO1 K2
and Crimes.
Describe the types and goals of digital forensic investigation
CO2 K2
1
CSPL-18 Computer Forensics Laboratory
LIST OF EXPERIMENTS
S.L. Experiment Page
No. No.
1 Study of Computer Forensics and different tools used for forensic
investigation
2 To extract Exchangeable image file format (EXIF) Data from Image Files.
Tool-Exifreader Software
3 Forensics Case Investigation using live data
Tool-Autopsy
4 To Recover Deleted Files using Forensics Tools
Tool- FTK / File Analyzer
5 To Find Last Connected USB on your system
Tool- Parse
6 To View Last Activities on Your PC
Tool- Register Editor / Registry Explorer
7 To analyze network-related incident
Tool- Wireshark
8 To make the forensic image of the hard drive to find the suspicious activity
Tool-EnCase
9 To Restore the Evidence Image to find criminal activity
Tool- EnCase
10 To hide and extract any text file behind an image file/ Audio file using
Command Prompt.
Shell comments / Shell Bags Explorer
11 To capture the physical memory of a computer and analyze artifacts in
memory
Tool- Magnet RAM Capture
12 To Collect Email Evidence in Victim PC
Tool-E Mail Analyzer
Page | 1
EX.NO-01 Study of Computer Forensics and different tools
used for forensic investigation
Aim:
Study of Computer Forensics and different tools used for forensic investigation
Descriptions:
What Is Digital Forensics?
Digital forensics is the field of determining who was responsible for a digital intrusion
or other computer crime. It uses a wide range of techniques to gain attribution to the
perpetrator.
It relies upon the fundamental concept that whenever a digital intrusion or crime is
committed, the perpetrator inadvertently leaves a bit of themselves behind for the
investigator to find. These "bits" could be entries in log files, changes to the registry,
hacking software, malware, remnants of deleted files, etc. All of these can provide
clues and evidence to determine their identity and lead to the capture and arrest of the
hacker.
As a hacker, the more you know and understand about digital forensics, the better you
can evade the standard forensic techniques and even implement anti-forensic measures
to throw off the investigator.
Page | 2
These three suites are comprised of multiple tools and reporting features and can be
fairly expensive. While these suites are widely used by law enforcement, they use the
same or similar techniques as the free open-source suites without the fancy interfaces.
By using the open-source and free suites, we can come to understand how such tools
as EnCase work without the expense. EnCase is the most widely used tool by law
enforcement, but not necessarily the most effective and sophisticated. These tools are
designed for user-friendliness, efficiency, certification, good training, and reporting.
There are a number of the free, open-source forensic suites, including the following
three.
1. The Sleuthkit Kit (TSK)
2. Helix
3. Knoppix
Page | 3
Some of the better tools in BackTrack include the following, among many others.
What Is Anti-Forensics?
Anti-forensics are techniques that can be used to obfuscate information and evade the
tools and techniques of the forensic investigator. Some of these techniques include the
following.
• Hiding Data: Hiding data can include such things as encryption and steganography.
• Artefact wiping: Every attack leaves a signature or artefact behind. Sometimes
it's wise to attempt to wipe these artefacts from the victim machine so as to leave no
tell-tale trail for the investigator.
• Trail Obfuscation: A decent forensic investigator can trail nearly any remote
attack to an IP address and/or MAC address. Trail obfuscation is a technique that
leads them to another source of the attack, rather than the actual attack.
• Change the timestamp: Change the file timestamp (modify, access, and change)
to evade detection by forensic tools.
Forensics tool. Autopsy is a digital forensics platform and graphical interface to The
Sleuth Kit® and other digital forensics tools. It can be used by law enforcement,
military, and corporate examiners to investigate what happened on a computer. You
can even use it to recover photos from your camera's memory card.
Page | 5
CAINE (Computer Aided Investigative Environment)
Page | 6
EX.NO-02 To extract Exchangeable image file format (EXIF)
Data from Image Files.
Aim: How to Extract Exchangeable image file format (EXIF) Datafrom Image Files
using Exifreader Software.
Description:
In many cases when a computer, phone, or mobile device is seized for evidence, the
system will have graphic images that might be used as evidence. Obviously, in some
cases, these graphic images may be evidence such as in child pornography cases.
Most digital devices "stamp" information on these graphic images that can tell us a lot
about the who, what, when, and where the pictures were taken. This information is
known as EXIF data and can very often be useful to the forensic investigator.
Exchangeable image file format (EXIF) is a standard set by the digital camera industry
to identify formats for digital images and sound files. This information includes
camera settings, time, date, shutter speed, exposure, whether a flash was used,
compression, the name of the camera, and other information critical to viewing and
editing the image in image-editing software. This information can be useful to the
forensic investigator.
There are numerous applications that can extract this EXIF data from graphic files.
Nearly every one of the major forensic suites (EnCase, FTK, Oxygen, etc.) has this
capability built-in. For this lab, we will be using a simple, Windows-based tool called
ExifReader (free).
Procedure for Extract EXIF Data from Image
FilesStep-01:
Download the ExifReader from the above link and click on the .exe file
(ExifRead.exe) and it will open a clean and simple GUI Wizard as shown below:
Page | 7
Page | 8
Now, simply click on the "Open" button and browse to the pictures from the system
or media. Normally, JPEG and JPG contain the maximum information, so let's use a
JPEG file.
Step-02: Open a Picture File
Once the selected picture opens the picture, it will load the picture into the thumbnail
to the left and display the EXIF data to the right down the page as shown below.
There are lots of information you can collect in the EXIF data, but most are related to the technical
specifications of the camera and photography. GPS coordinates of wherethe picture was taken. Most of this is
of limited value to the forensic investigator.
Page | 9
EX.NO-03 Forensics Case Investigation using live data
Aim: Live Forensics Case Investigation using Autopsy
Procedure:
First Download autopsy from here and install in your pc. Click ‘New Case’ option.
A new page will open. Enter the details in ‘Case Name’ and ‘Base Directory’ and
choose the location to save the report e.g. :Autoreport. Then click on next to proceed
Page | 10
to the next step.
Here in the next step, you have to enter the case number and Examiner details and
click on finish to proceed to the next step.
Page | 11
A new window will open. It will ask for the add data source in Step 1. Select source type to add
& browse the file Path and click on NEXT option to proceed further.
Page | 12
Configure ingest Modules I have chosen all the modules as I am looking for complete
information on evidence device or disk or system etc. and click next to proceed further.
Page | 13
In Add Data Source just click on Finish to generate the report of the device and you
can perform complete investigate on the victim device or system or any other disk. It
will process the data Source and add it to the local database.
After Process completion, it will show the Forensic Investigation Report. Now click
on Devices Attached option, it will show the list of the attached device with the
system.
Now click on EXIF Metadata (Exchangeable image file format for images, sound
used by Digital Camera, Smartphone and scanner), click on Installed Programs to see
the entire installed programs in the system, Click Operating System Information. It
will show the entire operating system list, Now Select Operating System User
Account Option. It will Display the name of all the user Accounts, Now click on
Recent Documents Option, it will display the latest created or opened documents,
Click Web Bookmarks Option to see all the bookmarks by system users in different
browsers, To see web cookies, select web cookies option, To See Web Downloads,
Click on Web Downloads option, To check internet History, click on Web History
Option, To see the history of internet search, click on Web Search Option, To see the
list of all email ids in the system, click on email address.
And try to explore other option in autopsy.
Page | 14
EX.NO-04 To Recover Deleted Files using Forensics Tools
Aim:
How to Recover Deleted Files using Forensics Tools
Procedure:
Step-01: Create a File
To demonstrate how to recover deleted files, let's create a malicious document. We will
call this document "Malicious" and create it with Notepad in Windows.
Page | 15
Right-click on the malicious file and select delete. If you put the file in the Recycle Bin, you have
made it even easier for the forensic investigator to recover. The Recycle Bin is actually simply a
folder where the files are moved until you empty the Recycle Bin. Nothing is deleted until you
empty the Recycle Bin.
Step 3: Create an Image
The first step a forensic investigator will do when examining your computer is to make a
bit-by-bit copy of your hard drive or in this case your flash drive. There are numerous
tools that can do this and in Linux, we have the dd command that does an excellent job of
making bit-by-bit copies (it's on all Linux distributions including BackTrack). File
backups and copies are not forensically sound as they will not copy deleted files and
folders and in many cases will actually change the data.
Most forensic investigators use commercial tools. The two most popular being Encase by
Guidance Software and Forensic Tool Kit by Access Data.
FTK, as it is commonly known in the industry, has a free imager that creates a bit-by-bit
copy of the drive. This imager is probably the most widely used in the industry and its
price is right, so let's use it.
You can download it here.
Now that have downloaded the FTK imager, we need to create a bit-by-bit image of the
flash drive.
Page | 16
Go to the menu at the top of the application and select:
Page | 17
Now that we've created an image of the flash drive, we are ready to recover the deleted
files.
Step 4: Recover Deleted Files
There are many tools on the market to recover deleted files and all of them are adequate
to do the job. Deleted file recovery is probably the simplest of forensic tasks. Here, I will
be using a trial version of RecoverMyFiles.
You can download a trial version here.
Once you have installed RecoverMyFiles, select the Start Recovery icon in the upper left
corner. It will ask you to select either Recover Files or Recover Drive. Select Recover a
Drive. It will then search and display all your drives like that in the screenshot below.
Since we are using a forensic image, select Add Image button to the right. You will need
to provide a path to your image file created with FTK.
Once you select an image file, start the automatic file recovery. When the recovery is completed,
you will see a screen similar to the one below.
Page | 18
I then selected the File Type tab above the Explorer window to categorize the files
by type.
As you can see, there are numerous file types recovered from this flash drive. Since
our malicious document was a .txt, I have selected the TXT UTF-16 file type. It then
puts all 158 .txt files on display in the upper right window. As you can see, it has
recovered our malicious.txt file and everything on it. Busted!
Page | 19
I'm hoping that this tutorial clearly showed you how simple it is for a forensic
investigator to recover the files you have deleted. This should be a lesson that you
need to be exceedingly cautious and when possible, overwrite any deleted files to
remove evidence. In some cases, even that may not be enough to keep your files
from a skilled forensic investigator.
Page | 20
EX.NO-05 To Find Last Connected USB on your system
Aim: Find Last Connected USB on your system (USB Forensics)
USBDeview is a small utility that lists all USB devices that currently connected to
your computer, as well as all USB devices that you previously used.
For each USB device, extended information is displayed: Device name/description,
device type, serial number (for mass storage devices), the date/time that device was
added, VendorID, ProductID, and more…
USBDeview also allows you to uninstall USB devices that you previously used,
disconnect USB devices that are currently connected to your computer, as well as to
disable and enable USB devices.
You can also use USBDeview on a remote computer, as long as you log in to that
computer with admin user.
Page | 21
EX.NO-06 To View Last Activities on Your PC
Aim: How to View Last Activity of Your PC
LastActivityView is a tool for Windows operating system that collects information
from various sources on a running system, and displays a log of actions made by the
user and events occurred on this computer.
Page | 22
EX.NO-07 To analyze network-related incident
Aim: How to make the forensic image of the hard drive using EnCase Forensics.
Introduction
In solving computer crime cases, computer forensics is used to gather evidence, which
will be analyzed and presented to a court of law to prove the illegal activity. It is
important that when doing computer forensics, no alteration, virus introduction,
damages or data corruption occurs. In order to do a good analysis, the first step is to
do a secure collection of computer evidence. Secure collection of evidence is
important to guarantee the evidential integrity and security of information. The best
approach for this matter is to use a disk imaging tool. Choosing and using the right
tool is very important in computer forensics investigation.
Disk imaging
Disk imaging as defined by Jim Bates, Technical Director of Computer Forensics Ltd,
refers to:
“An image of the whole disk was copied. This was regardless of any software on the
disk and the important point was that the complete content of the disk was copied
including the location of the data. Disk imaging takes sector-by-sector copy usually
for forensic purposes and as such it will contain some mechanism (internal
verification) to prove that the copy is exact and has not been altered. It does not
necessarily need the same geometry as the original as long as arrangements are made
to simulate the geometry if it becomes necessary to boot into the acquired image.”
Disk imaging is also one of the approaches for backup except that backup only copies
the active file. In backup, ambient data will not be copied. This is an area where the
most important source for the evidence could be found. Ambient data is a data stored
in Windows swap file, unallocated space and file slack.
Scenario: Mr. X is suspected to be involved in selling his company’s confidential data
to the competitors, but without any evidence, no action could be taken against him. To
Page | 23
get into reality and proof Mr. X guilty, the company has requested the forensic services
and have come to know all the relevant data is present inside the desktop provided to
him.
Since it is never advised to work with the original evidence because we may lose some
relevant data accidentally, so we will create an image of the original evidence and
work on it further. This way the original evidence is safe and the integrity and
authenticity of the evidence could be proved through hash values.
Page | 24
Step-01:
To image the computer hard drive, we will use Encase Imager. EnCase Imager is a
software which is bundled with numerous features which aid in all the four phases of
forensic investigation i.e. Collection, Preservation, Filtering and Report.
First, download the Encase Imager demo from here and install in your computer. Once
it is installed, Initialize the Software in Enterprise Mode.
Step 2: Click On New For Creating A New Case. Fill the labels.
Click On Finish.
Page | 25
Step 3: View the Case by Clicking On Case 1 <Case Name>
Step 4: Click on add local device for Adding Devices to Your Case. If there is any write blocker
attached with the machine and digital deice then tick to 1,2 and 5 option otherwise untick to all
and click on Next button.
Page | 26
Step 5: Tick in the box of name column which shows the connected device name or
label like (1,2,3 or any numeric number) and click on the finish button.
Step-06: Now to open evidence click on label number of the device which shows in
“name” column and again right-click on label number and choose acquire the option.
Page | 27
Step-07: Then a pop up will appear with three tabs. In the location tab, fills all the fields. In
format tab if you want to encrypt the evidence file then enable the Compression field otherwise
disable it. In Verification Hash field value should be chosen MD5 and SHA1 after it click on OK
button. File format selected here is E01 as this is supported by multiple tools and is suitable for
further analysis. If we want to password protect/encrypt our image we can do this at this stage.
Page | 28
Step-08: After it, image creation will be start and time taken to create
the image will be shown on the right side of the bottom. you can check
the status of image acquisition on the same window at the lower right
corner along with the time remaining (refer below image).
Step-09: Device will automatically disconnect after creating the image. The image will save in
the folder which we set the path earlier. Once the acquisition is complete the image will get
saved to the output folder (refer below image).
Page | 29
EX.NO-09 To Restore the Evidence Image to find criminal
activity
Aim: How to Restoring the Evidence Image using EnCase ImagerOpen Encase
Imager and add the evidence to Encase imager
Browse to the image (.E01) file and add it to the case. The evidence added will get
listed
Double click on the image, select he files to be restored and select the restore option
located under Device option.
Page | 30
Page | 31
When we click on restore, connect the drive where we want to restore the image and
click next. All the drives will be read. All the drives will be displayed, select the drive
where the image is to be restored. Use the blank drive for restoring the image as the
existing data will be wiped.
Type “Yes” in the text box and click on OK this will wipe the existing data on the
drive and start with the image restoration.
Page | 32
Image Restoration will start, we can check the progress on the lower right corner of
the window.
Once the restoration is complete, we can see the data in the drive we have selected.
To ensure the integrity of the data, we can see the report section on the bottom pane
and check the hash values. The hash values should be the same as of the image (we
can check the original hash value in the image report.)
If required we can copy and save the report in any text / word file for any future
reference.
forensic investigator.
Page | 33
EX.NO-10 To hide and extract any text file behind an image
file/ Audio file using Command Prompt.
Aim:
To study the steps for hiding and extract any text file behind an image file/ Audio file
using Command Prompt.
Any file like .rar .jpg .txt or any file can be merged inside another file. In a simple
way, we shall learn how to hide a text file inside an image file using the Command
Prompt.
How to Hide the FILE?
Suppose you have to hide a text file “A.txt” with the image file “B.jpg” and combine
them in a new file as “C.jpg”.Where “C.jpg” is our output file which contains the text
hidden in the image file.
Page | 34
4. in cmd first type the code as follows:
>cd desktop
NOTE: this code is for assigning the location on cmd to desktop
5. Now type the following code:
"C.jpg" is the output image inside this out image our file is hidden
Page | 35
How to retrieve the file?
1. locate C.jpg file from where you want to retrieve text data
2. Right-click and open with notepad
Done! Successfully opened! In the last of the notepad, you’ll find the content of the
text file.
Page | 36
echo "Your Message">>"image.jpg"
Now the message is successfully hidden in the image file.
To view the message: Open with Notepad, at last, you’ll find the Your Message
Another Method
1. Open Run command window by pressing win + r.
2. Open command prompt by typing cmd and press OK
Windows 7/10: Shift+right click in the folder containing the files will open the
command prompt in that directory Windows: Open command prompt (start->runcmd),
then use cd to get to the folder where the files are stored.
Linux: You know what to do, open terminal and move to the directory containing
files.
Page | 37
We now need to merge these files together, but we want to use a binary merge to
keep the two files intact. With Windows copy command this uses the /B switch.
(Binary Data)
Windows
Code:
copy /b secret.zip + sound.mp3 newfile.mp3
Linux
Code:
cat sound.mp3 secret.zip > newfile.mp3
Page | 38
You should now have gained a new file called newfile.mp3. This should look identical
to the sound you started with when opened with a media player, but with a secret
payload hidden within. Here is the example sound containing a ZIP:
The two simplest ways to get your data back out of these files is to either change the
extension from .mp3 to .zip or to open your chosen ZIP program and open
newfile.mp3 within that. You should now be presented with your original files.
Page | 39
EX.NO-11 To capture the physical memory of a computer
and analyze artifacts in memory
Page | 40
EX.NO-12 To Collect Email Evidence in Victim PC
Aim: How to Collect Email Evidence in Victim PC
To collect email evidence from Victim PC the first step is to capture the victim’s
RAM. This can be possible using dumpit tool.
This utility is used to generate a physical memory dump of Windows machines. It
works with both x86 (32-bits) and x64 (64-bits) machines. The raw memory dump is
generated in the current directory, only a confirmation question is prompted before
starting. Perfect to deploy the executable on USB keys, for quick incident responses
needs.
Run Dumpit.exe file the raw memory dump will be generated and save to the same
directory
Page | 41
Then Download bulk extractor viewer from GitHub and install it in your PC. Now open bulk
extractor viewer and click on to generate report.
Now select the dump it image file and select an output folder for the report and click on start
bulk extractor as seen below
Page | 42
Now in order to investigate the victim saved information of Email ID Click on email.txt as seen
below
Page | 43
References
1. https://www.noxcivis.com/forensics/
2. https://null-byte.wonderhowto.com/how-to/hack-like-pro-digital-forensics-
for-aspiring-hacker-part-3-recovering-deleted-files-0149868/
Page | 44