CSDF Mini Project Final Rohan
CSDF Mini Project Final Rohan
SUBMITTED BY
Guided By
(Prof. Veena Bhende)
1
CERTIFICATE
This is to certify that the project report
is a bonafide students at this institute and the work has been carried out by
them under the supervision of Prof. Veena Bhende and it is approved for
the partial fulfilment of the Department of Computer Engineering AISSMS
IOIT.
2
Abstract
Digital forensics plays a crucial role in uncovering evidence and preserving the integrity of digital
information. As images continue to be a primary source of multimedia content, there is a growing
need for efficient and user-friendly tools to analyse and investigate image data. This abstract
introduces a novel Python-based digital forensics tool, developed using the Tkinter library, which
offers a comprehensive solution for the forensic analysis of images.
The proposed tool leverages the power of Python, a widely adopted programming language in the
digital forensics’ community, to provide investigators with a versatile and extensible platform for
image analysis. Tkinter, a popular GUI library for Python, enables a user-friendly interface for
accessing the tool's functionality.
The tool is designed with a user-friendly graphical interface to accommodate both novice and
experienced users. Its seamless integration with the Tkinter library ensures that investigators can
navigate the application effortlessly and perform detailed image analysis tasks with ease.
In conclusion, the Python-based digital forensics tool presented in this abstract, built using the
Tkinter library, offers a powerful, user-friendly, and extensible solution for the analysis of digital
images. Its wide range of features, coupled with its intuitive interface, empowers forensic experts
to efficiently examine image data, aiding in the discovery and preservation of crucial evidence in
digital investigations.
3
1. Introduction
The field of digital forensics has witnessed a remarkable evolution as the digital landscape
continues to expand at an unprecedented rate. Within this context, images represent a significant
source of multimedia data, bearing immense potential for uncovering evidence and critical
insights. The analysis of digital images demands robust and versatile tools capable of extracting,
examining, and scrutinizing a myriad of image attributes and content. To address this pressing
need, we introduce a novel Python-based digital forensics tool developed using the Tkinter library,
designed to offer a comprehensive and technically advanced solution for the in-depth analysis of
digital images. Digital forensics, as an interdisciplinary field encompassing computer science, law
enforcement, and legal proceedings, hinges on the ability to uncover and preserve digital
information in a manner that is admissible in a court of law. Images, often captured and shared
across various digital platforms, have become integral components of modern investigations,
necessitating tools that can navigate the intricate web of image metadata, hidden information, and
integrity verification. This tool, by harnessing the strengths of Python and Tkinter, not only
facilitates an efficient investigation process but also ensures that the integrity of digital evidence
is upheld, aligning with the rigorous standards expected in legal proceedings and digital forensics
practices
2. Problem Statement
• Our digital forensics tool will primarily centre around the examination of image metadata.
This involves the extraction and analysis of crucial information embedded within image
files, such as EXIF data. This metadata analysis will provide valuable insights into the
image's origin, including timestamps, camera specifications, and geolocation data.
• Employing Python and the Tkinter library, to create an intuitive interface for users to
extract and examine this metadata efficiently.
4
3. Software and Hardware Requirement Specification
Software Used:
Hardware Used:
RAM 2 GB
5
Theory
Digital Image Forensics
Digital image forensics is a multidisciplinary field that focuses on the identification, analysis, and
interpretation of digital images to uncover valuable information, verify authenticity, detect
manipulation, and preserve the integrity of visual data. This theory provides an overview of the
fundamental concepts and principles that underpin digital image forensics.
6
Pros
• Heaps of granular data. The more data available to law enforcement, the greater
chance it has of digitally identifying a suspect’s criminal activity.
• Flexible use cases. Digital image forensics techniques can be used in open and closed
source investigations.
• Validated approaches and algorithms. Scientific underpinnings of discipline mean that
it’s highly accurate and reliable.
Cons
• Time and labour intensive. Open-source digital image forensics investigations can be built
from a single and often minute clue. Painting a complete picture of a case can take many
months.
7
4. Code
Code: main.py
import tkinter as tk from tkinter import filedialog
from PIL import Image from asgn_8 import
manipulator, exif_extractor def
add_overlay_clicked():
if selected_image_path:
manipulator.manipulate(selected_image_path[0])
render_image("manipulated_image.png")
else:
show_popup("Please select an image first!")
def exif_extract_clicked():
if selected_image_path:
show_popup("Action successful! exif_extract was clicked with image: " +
str(selected_image_path))
exif_extractor.extract_exif_data(selected_image_path[0])
else:
show_popup("Please select an image first!")
def browse_image():
global selected_image_path
selected_image_path = filedialog.askopenfilenames(filetypes=[('Images', '*.jpg *.jpeg *.png')])
8
def show_popup(message, duration=2000):
popup = tk.Toplevel(root)
popup.title("Popup")
popup.geometry("250x100")
center_window(popup, 250, 100)
popup_label = tk.Label(popup, text=message)
popup_label.pack(pady=20)
root.after(duration, popup.destroy)
def render_image(image_path):
img = Image.open(image_path)
img.show() root = tk.Tk()
root.title("Button App")
9
selected_image_path = None root.mainloop()
Code: manipulator.py
def manipulate(input_path):
input_image_path = input_path output_image_path =
"manipulated_image.png"
manipulate_image(input_image_path, output_image_path)
Code: exif_extractor.py
10
if exif_data is not None:
print("EXIF Data:")
for tag_id, value in exif_data.items():
print(f"Tag ID: {tag_id}, Value: {value}")
else:
print("No EXIF data found.")
5. Output
11
Output: After adding red overlay to selected image (manipulated image)
12
Tag ID: 306, Value: 2003:12:14 12:01:44
Tag ID: 531, Value: 1
Tag ID: 282, Value: 180.0
Tag ID: 283, Value: 180.0
Tag ID: 36864, Value: b'0220'
Tag ID: 37121, Value: b'\x01\x02\x03\x00'
Tag ID: 37122, Value: 5.0
Tag ID: 36867, Value: 2003:12:14 12:01:44
Tag ID: 36868, Value: 2003:12:14 12:01:44
Tag ID: 37377, Value: 8.96875
Tag ID: 37378, Value: 4.65625
Tag ID: 37380, Value: 0.0
Tag ID: 37381, Value: 2.970855712890625
Tag ID: 37383, Value: 2
Tag ID: 37385, Value: 24
Tag ID: 37386, Value: 21.3125
13
6. Conclusion
In conclusion, these digital forensics project has successfully delivered a technically sound and
focused solution aimed at the analysis of digital images, specifically centring on the extraction of
EXIF (Exchangeable Image File Format) data and the addition of a red overlay as a visual
indication. The project has excelled in the examination of EXIF data, employing Python to
meticulously parse image metadata. This feature has proven invaluable for investigators, allowing
them to retrieve essential information concerning an image's origin, such as timestamps, camera
specifications, and geolocation data. The extraction of EXIF data serves as a fundamental step in
verifying the authenticity of digital images and attributing them to specific sources. Moreover, the
incorporation of a red overlay feature, although a relatively simple addition, holds significance in
certain investigative scenarios. It serves as a visual marker to denote alterations or the presence
of specific characteristics within an image. This could be especially useful when highlighting areas
of interest or potential concerns during a forensic examination.
7. References
1. https://www.interpol.int/en/How-we-work/Innovation/Digital-forensics
2. https://www.eccouncil.org/cybersecurity/what-is-digital-forensics/
3. https://www.techtarget.com/whatis/definition/forensic-image
4. https://www.tutorialspoint.com/python_forensics/forensics_python_imaging_library.htm
5. https://ceur-ws.org/Vol-3142/PAPER_03.pdf
6. https://www.sciencedirect.com/science/article/abs/pii/S0045790620305401
7. https://www.researchgate.net/publication/299367087_Digital_Image_Forensics_Progress_a
nd_Challenges
8. https://farid.berkeley.edu/downloads/tutorials/digitalimageforensics.pdf
14