Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

A PRELIMINARY REPORT ON

Cyber Security and Data Forensic Mini Project

SUBMITTED TO THE SAVITRIBAI PHULE PUNE UNIVERSITY, PUNE IN


THE PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE
ACADEMIC OF

FOURTH YEAR OF COMPUTER ENGINEERING

SUBMITTED BY

Pranav Sonar BBCO20106

DEPARTMENT OF COMPUTER ENGINEERING


DR. D.Y. PATIL INSTITUTE OF ENGINEERING, MANAGEMENT &
RESEARCH

AKURDI, PUNE 411044

SAVITRIBAI PHULE PUNE UNIVERSITY


AY 2023 -2024
CERTIFICATE

This is to certify that the Mini Project report of

Cyber Security and Digital Forensic

Submitted by

Pranav Sonar BBCO20106

is a bonafied student of this institute and the work has been carried out by them under the
supervision of M/r. Amol Dhakne and it is approved for the partial fulfillment of the
requirement of Savitribai Phule Pune University, for the award of the Fourth-year degree of
Computer Engineering.

M/s. P. P. Shevatekar M/s. P. P. Shevatekar

Guide Head
Department of Computer Engineering Department of Computer Engineering

Place: Pune

Date:
ABSTRACT

In today's digital age, the proliferation of digital images has transformed the way we
communicate, document events, and interact online. However, this accessibility to image creation
and manipulation has brought about challenges in verifying the authenticity and integrity of these
images. To address this critical issue, we are embarking on the design and development of a
comprehensive Digital Image Forensic Tool (DIFT). This tool will be a valuable asset for forensic
experts, law enforcement agencies, and digital investigators, enabling them to conduct in-depth
examinations and ascertain the credibility of digital images.

The DIFT will encompass a multifaceted approach to image forensics. It will feature
advanced functionalities including image authentication, metadata analysis, steganography
detection, image forgery detection, and camera source identification. These features will
collectively empower investigators to determine the genuineness of digital images and identify
any signs of tampering or manipulation.

Furthermore, the DIFT will provide a user-friendly interface, ensuring that it can be
effectively utilized by a broad spectrum of users, ranging from seasoned forensic experts to those
with limited technical expertise. This tool will be a cornerstone in the realm of digital forensics,
aiding in criminal investigations, legal proceedings, and bolstering trust in the age of deepfakes
and widespread image manipulation. By ensuring the integrity of digital images, this project aims
to contribute significantly to the reliability and authenticity of media content, which plays a pivotal
role in shaping our understanding of events and information in today's interconnected world.

Keyword: Cyber Security, Image Processing


ACKNOWLEDGEMENT

First and foremost, I would like to thank my guide for this Mini Project, M/r. Amol Dhakne
for the valuable guidance and advice. She inspired us greatly to work in this Mini Project. Her
willingness to motivate us contributed tremendously to our seminar work. I also would like to
thank her for showing me some examples that related to the topic of my Mini Project.

Apart from our efforts, the success of any seminar depends largely on the encouragement and
guidelines of many others. So, we take this opportunity to express my gratitude to M/s. P. P.
Shevatekar, Head of the Department of Computer Engineering, Dr. D Y Patil Institute of
Engineering, Management and Research, Akurdi has been instrumental in the successful
completion of this seminar work.

The guidance and support received from all the members who contributed and who are
contributing to this seminar work were vital for the success of the seminar. I am grateful for their
constant support and help.

Pranav Sonar

Student Name
(B.E. COMPUTER ENGG.)
TABLE OF CONTENT

Sr No. Content Page No.

1 Introduction 6–8

1.1. Introduction 6

1.2. Problem Statement 7

1.3. Objectives 8

2 Methodology 9 – 11

3 Implementation 12 – 15

4 Conclusion 16
CHAPTER 1: INTRODUCTION

1.1.INTRODUCTION
The Digital Forensic Tool for Images is a Python-based application designed for basic digital
forensics analysis of image files. This tool provides functionalities such as MD5 hashing,
EXIF data extraction, steganography detection, and perceptual hashing. It is intended for use
in scenarios where preliminary image forensics are required, including identifying hidden
data, verifying image integrity, and extracting metadata.

Theory
1. MD5 Hashing
The MD5 algorithm generates a fixed-size (128-bit) hash value from the input data. In this
tool, it is used to create a unique identifier (hash) for each image based on its content. This
hash can be used to verify the integrity of the image and detect any alterations or tampering.
2. EXIF Data Extraction
EXIF (Exchangeable Image File Format) data is metadata embedded within image files. It
contains information about the camera settings, date and time of capture, GPS coordinates,
and more. This tool extracts and displays EXIF data, providing insights into the origin and
properties of the image.
3. Steganography Detection
Steganography involves concealing information within an image. The tool uses LSB (Least
Significant Bit) analysis to identify potential hidden data. It analyzes the least significant
bits of pixel values to detect alterations that may indicate the presence of concealed
information.
4. Perceptual Hashing
Perceptual hashing is a technique that generates a hash value based on the visual content
of an image. This hash can be used to identify similar images by comparing their hash
values. It is particularly useful for detecting duplicate or visually similar images.

Project Flow:
The Digital Forensic Tool for Images follows a structured workflow to perform various forensic
analyses on image files. Here's the step-by-step flow of the tool:
User Input:
The user provides the path to the target image file.
MD5 Hashing:
 The tool computes the MD5 hash of the image file.
 The MD5 hash serves as a unique identifier for the image.
EXIF Data Extraction:
 The tool extracts EXIF data from the image.
 This data includes information about camera settings, date and time of capture, and more.
Steganography Detection:
 The tool performs LSB analysis on the image to detect potential hidden data.
 LSB analysis focuses on the least significant bits of pixel values.
Display Results:
The tool displays the MD5 hash and extracted EXIF data to the user.
Steganography Detection Output:
 If steganography is detected, the tool presents a portion of the extracted bits to the user.
 These bits may represent hidden information.
Perceptual Hashing:
 The tool generates a perceptual hash of the image.
 This hash is used to identify similar images based on visual content.
Display Perceptual Hash:
The generated perceptual hash is displayed to the user.
1.2. PROBLEM STATEMENT

Design and develop a tool for digital forensic of images

In the realm of digital image forensics, the creation of a Digital Image Forensic Tool
(DIFT) is underway, with the primary goal of empowering forensic experts, law enforcement
agencies, and digital investigators. DIFT will encompass a range of critical functionalities,
including image authentication, metadata analysis, steganography detection, image forgery
identification, and camera source recognition.

This multifaceted tool will not only assist in verifying image authenticity but also support
criminal investigations and legal proceedings. Its user-friendly interface will make it accessible to
a broad user base, and it will serve as a crucial asset in addressing the challenges posed by image
manipulation in the digital age."

1.3. OBJECTIVE

1. Extract and analyze metadata for image source and editing history.
2. Detect and report any instances of image manipulation or tampering.
3. Identify and flag hidden information within images (e.g., steganography).
4. Perform reverse image searches to find similar or duplicate images online.
5. Provide geolocation data if available within the image.
6. Cross-reference image data with databases of known illicit or illegal content.
7. Generate detailed image integrity reports for use in legal investigations.
8. Offer a user-friendly interface for law enforcement and forensic experts.
9. Continuously update the tool to keep pace with emerging image manipulation techniques.
10. Ensure the tool complies with legal and ethical standards for digital evidence handling.
CHAPTER 2: METHODOLOGY

The methodology for designing and developing a digital forensic tool for images involves several
key steps. First, the tool should begin with the extraction and analysis of metadata from the image
files, which includes details about the image source, camera information, and any editing history.
This metadata can provide valuable context for forensic investigations. Next, the tool should
employ advanced algorithms to detect any signs of image manipulation or tampering. This
involves comparing the image's visual content with expected patterns and identifying anomalies
or artifacts that may indicate alterations.

In addition to traditional metadata and visual analysis, the tool should be equipped to uncover
hidden information within images, such as steganographic data. This requires the use of specialized
steganalysis techniques to detect concealed content.

To enhance investigative capabilities, the tool should integrate reverse image search functionality,
allowing users to find similar or duplicate images online. This can be a valuable resource in
identifying the source or context of an image.

Furthermore, the tool should access geolocation data if available within the image, which can be
crucial in criminal investigations. Cross-referencing image data with databases of known illicit or
illegal content should be part of the tool's functionality.

The tool should generate detailed image integrity reports that can be used as evidence in legal
proceedings, ensuring transparency and credibility. It should also provide a user-friendly interface
to accommodate both law enforcement professionals and forensic experts

Continuous development and updates are essential to keep the tool current with emerging image
manipulation techniques and technologies. Lastly, compliance with legal and ethical standards for
digital evidence handling should be a fundamental consideration throughout the tool's design and
development process.
CHAPTER 3: IMPLEMENTATION

3.1. Code:

import hashlib
from PIL import Image
from imagehash import dhash
def compute_hash(filepath):
"""Compute MD5 hash of an image file."""
with open(filepath, 'rb') as f:
return hashlib.md5(f.read()).hexdigest()
def extract_exif(filepath):
"""Extract EXIF data from an image file."""
with Image.open(filepath) as img:
return img._getexif()
def detect_steganography(filepath):
"""Detect steganography using LSB analysis."""
with Image.open(filepath) as img:
width, height = img.size
pixel_data = list(img.getdata())
hidden_data = ''
for pixel in pixel_data:
for color_channel in pixel:
hidden_data += str(color_channel & 1)
return hidden_data
def perceptual_hash(filepath):
"""Generate perceptual hash of an image."""
with Image.open(filepath) as img:
hash_value = dhash(img)
return str(hash_value)
def main():
filepath = '3051.jpg';
md5_hash = compute_hash(filepath)
print(f'MD5 Hash: {md5_hash}')
exif_data = extract_exif(filepath)
if exif_data is not None:
print('\nEXIF Data:')
for tag, value in exif_data.items():
print(f'Tag: {tag}, Value: {value}')
else:
print('No EXIF data found.')
hidden_data = detect_steganography(filepath)
if hidden_data:
print(f'\nSteganography Detected: {hidden_data[:100]}...')
else:
print('No steganography detected.')
phash = perceptual_hash(filepath)
print(f'\nPerceptual Hash: {phash}')
if __name__ == '__main__':
main()
CHAPTER 4: CONCLUSION

In conclusion, our study delved into the performance of two sorting algorithms, Merge
Sort, and Multithreaded Merge Sort, under various scenarios. Merge Sort, a well-established
sorting algorithm, consistently demonstrated reliable performance, adhering to its expected time
complexity of O (n log n) across different datasets. It remains a robust choice for sorting large
datasets.

On the other hand, Multithreaded Merge Sort, which harnesses the power of parallelization,
exhibited noteworthy advantages in the best-case scenario. When provided with already sorted
data, it completed the sorting process more rapidly by efficiently utilizing multiple processor cores.
However, in the worst-case scenario where input data was sorted in reverse order, Multithreaded
Merge Sort faced challenges due to thread synchronization overhead, leading to a decrease in
performance.

Our research highlights practical insights into sorting algorithms' performance in real-
world contexts, emphasizing the significance of considering the data's nature and the hardware
environment when selecting an algorithm. The impact of multithreading on sorting efficiency was
also evident, showcasing its potential benefits under ideal conditions while cautioning about its
potential drawbacks in less orderly or smaller datasets.

In the end, the choice between Merge Sort and Multithreaded Merge Sort hinges on the
specific requirements and constraints of the sorting task. Merge Sort is a dependable, consistently
performing option, while Multithreaded Merge Sort shines when parallelization can be efficiently
employed. Careful consideration of the sorting task's characteristics is crucial for making well-
informed decisions about the choice and implementation of sorting algorithms.

You might also like