Skip to content

Image forensic python script that uses Exiv2 to get Exif Data

License

Notifications You must be signed in to change notification settings

merlin-ke/imagic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

imagic - Image Magic

A python script to help with image forensics. The script auto downloads images, gets EXIF Data and creates a report.

Background and Motivation

This project builds on the contributions of @abhigoya, @ruhelaa48 on GeeksforGeeks, which served as the starting point. Exvi2, a C++ library and a command line utility to manage image metadata. It provides fast and easy read and write access to the EXIF, IPTC and XMP metadata of images in various formats. Special acknowledgement to @Ray M for answering my problem broadcast and working on a solution.

I was working on a case where a someone had leaked some images online. My objective was to whether the images had any EXIF Data that could help me identify person who posted. Downloading the images manually and running EXIF wasn't feasible. I needed a tool that if given the link to the images, it could download all the images, get EXIF Data, calculate forensic hashes and then create a report. Main consumer of the report was a law and legal entity

Another usercase was to help with Opsec. The script can help you check if your images have been stripped of Exif.

I couldn't find any similar project or tools and decided to work on a similar tool since the required individual tools were available. My focus was to automate the process by utilizing existing tools. @Ray M reached out, and I shared part of my research with him which enabled him to create DownloadedImagesExifReader and based on some of his work, I was able to add more improvement to my script.

Requirements

  1. Python v3.7.x and newer. Download here.
  2. Exvi2. Kali comes with Exvi2 preinstalled, which worked for me.

Example

imagic.py 
Enter URL:- https://<someurl>
Attempting to download and save 48 image(s) to 'someurl_20220503_024658'
1 of 48 image(s) downloaded
2 of 48 image(s) downloaded
3 of 48 image(s) downloaded
4 of 48 image(s) downloaded
.
.
.
All images downloaded!
Total Files scanned are 48, Files with ExifData are 0, Files without ExifData are 48,Files whose Exif Data Scan failed are 0

Result

imagic  2022-05-03 122537

About

Image forensic python script that uses Exiv2 to get Exif Data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages