ExifTool tutorial: guide to forensic analysis of photo and file metadata

2022-07-15

If they have come to this page, it's because they have been listening to or knowing the tools of exiftool, but if they haven't, let's give a small sum of this wonderful tool.

What's exiftool?

To be brief, exiftool is a command line tool that allows us to analyze metadata from different file formats, the most common are photographs and videos as you can get GPS coordinates, date of capture, brand and model of the camera, among other information, but compatibility with file types is very great.

How do I install Exiftool?

There is both a version for Windows and Linux, so use is very simple.

In the case of Linux (Debian or based) it is already in the official repositories so with a:

sudo apt install exiftool

If it isn't a Debian system, we can clone it from Github.

git clone https://github.com/exiftool/exiftool.git cd exiftool ./exiftool <Ruta del Archivo a analizar>

For Windows systems we can download the executable https://exiftool.org/index.html

To run it, simply decompress and call with syntax:

exiftool.exe <Ruta del Archivo a analizar>

Examples of commands with exiftool

  1. To read all the metadata of a file the basic syntax is:

Exiftool < File path > <

Terminal with metadata from a photo shown using ExifTool, as a support for ExifTool command examples, in "ExifTool tutorial: guide for forensic analysis of photo and file metadata"

If the image has GPS data, these will be shown almost at the end.

Terminal with GPS fields and technical metadata of a photo, as support for Exiftool command examples, in "ExifTool tutorial: guide for forensic analysis of photo and file metadata"

2. With exiftool we can extract the image prior to editing, to do this we extract the thumbnail image

First of all, we must verify that the image has a thumbnail image embedded, this is verified by running exiftool on the image, the result must include the report of a ThmbnailImage with the breakdown of the size of the detected file. In the following image we can see that the thumbnail is 6375 bytes.

Terminal with GPS fields and technical metadata of a photo, as support for Exiftool command examples, in "ExifTool tutorial: guide for forensic analysis of photo and file metadata" - figure 2

In that case, we can now execute the command to extract the image:

exiftool -b -ThumbnailImage [foto.jpg] > [miniatura.jpg] ExifTool command terminal to remove a miniature image as support for ExifTool command examples at "ExifTool tutorial: guide for forensic analysis of photo and file metadata"

Graphically we would see it like this:

Image Visor with the result of viewing metadata using ExifTool as a support for ExifTool command examples at "ExifTool tutorial: guide for forensic analysis of photo and file metadata"

That would be an original image and the other the miniature, the important point is that the miniature image usually remains from creation, that means that if it was published, we would be looking at the miniature as originally was.

3. Remove metadata

In circumstances we might want to share an image without any metadata that identifies us, the process is very simple:

Exiftool -all = < File path > <

Terminal with ExifTool output to remove metadata from an image, as support for ExifTool command examples, in "ExifTool tutorial: guide for forensic analysis of photo and file metadata"

As you can see, the tool in its simplicity has its potential, we can analyze a large number of files to obtain the exact metadata or even delete them.

Contact
Let's talk about your case
Open contact form