ExifTool

Lit, écrit et modifie les métadonnées (EXIF, IPTC, XMP, GPS) dans les images, PDF et de nombreux autres types de fichiers : un incontournable pour l'extraction de métadonnées en OSINT. Reads, writes, and edits metadata (EXIF, IPTC, XMP, GPS) in images, PDFs, and many other file types — a staple for OSINT metadata extraction.

↗ https://exiftool.org

Overview

ExifTool is the definitive command-line tool for reading and writing metadata across an enormous range of file formats — JPEG/PNG/TIFF EXIF, PDF document properties, Office file author fields, GPS coordinates embedded in photos, camera/device fingerprints, and more. For OSINT and recon it’s routinely used to pull GPS location, device/software fingerprints, usernames, and internal file paths out of documents and images a target has published — information often left behind unintentionally.

Common Usage

Dump all metadata from a file

exiftool photo.jpg

Extract GPS coordinates specifically

exiftool -gps:all -c "%.6f" photo.jpg

Recursively process a directory

exiftool -r ./downloaded-files/

Extract metadata from all PDFs, output as CSV

exiftool -csv -ext pdf ./docs/ > metadata.csv

Strip all metadata (before you publish/share something yourself)

exiftool -all= photo.jpg

Extract just the Author/Creator/Software fields (common leak in docs)

exiftool -Author -Creator -Software -Producer ./docs/*.pdf

OSINT Workflow

  1. Grab publicly posted documents/images from a target org
httrack https://target.com -O ./target-site "+*.pdf" "+*.jpg"
  1. Pull metadata in bulk, looking for usernames, internal paths, software versions
exiftool -r -csv ./target-site > metadata.csv
  1. Grep for interesting fields
grep -i "author\|creator\|producer\|host computer" metadata.csv

Notes

  • Internal document authors (Author, Creator fields) often reveal AD usernames or naming conventions useful for password spraying/phishing.
  • Scanned/printed documents frequently leak the internal printer/scanner hostname or IP in metadata.
  • Always strip metadata (-all=) from anything you produce during an engagement before sharing screenshots or PoC files with a client.
Help / Man page
exiftool [OPTIONS] FILE...

  -TAG                  Extract specific tag (repeatable)
  -TAG=VALUE            Write a tag value
  -all=                 Remove all metadata
  -r                    Recurse into subdirectories
  -ext EXT              Process only files with given extension
  -csv                  Output as CSV
  -json                 Output as JSON
  -gps:all              Extract all GPS-related tags
  -c FMT                GPS coordinate print format
  -g                    Group output by tag category
  -a                    Allow duplicate tags
  -m                    Ignore minor errors/warnings
  -overwrite_original   Don't keep a backup (_original) file when writing

Vue d’ensemble

ExifTool est l’outil en ligne de commande de référence pour lire et écrire des métadonnées dans une énorme variété de formats de fichiers : EXIF JPEG/PNG/TIFF, propriétés de documents PDF, champs d’auteur des fichiers Office, coordonnées GPS intégrées dans les photos, empreintes d’appareil/logiciel, et bien plus. En OSINT et en recon, il est couramment utilisé pour extraire la position GPS, les empreintes d’appareil/logiciel, les noms d’utilisateur et les chemins de fichiers internes de documents et d’images publiés par une cible, des informations souvent laissées par inadvertance.

Utilisation courante

# Extraire toutes les métadonnées d'un fichier
exiftool photo.jpg

# Extraire spécifiquement les coordonnées GPS
exiftool -gps:all -c "%.6f" photo.jpg

# Traiter récursivement un dossier
exiftool -r ./downloaded-files/

# Extraire les métadonnées de tous les PDF, sortie en CSV
exiftool -csv -ext pdf ./docs/ > metadata.csv

# Supprimer toutes les métadonnées (avant de publier/partager quelque chose vous-même)
exiftool -all= photo.jpg

# Extraire uniquement les champs Author/Creator/Software (fuite courante dans les documents)
exiftool -Author -Creator -Software -Producer ./docs/*.pdf

Workflow OSINT

# 1. Récupérer les documents/images publiés par l'organisation cible
httrack https://target.com -O ./target-site "+*.pdf" "+*.jpg"

# 2. Extraire les métadonnées en masse, à la recherche de noms d'utilisateur, chemins internes, versions logicielles
exiftool -r -csv ./target-site > metadata.csv

# 3. Grep sur les champs intéressants
grep -i "author\|creator\|producer\|host computer" metadata.csv

Notes

  • Les auteurs internes de documents (champs Author, Creator) révèlent souvent des noms d’utilisateur AD ou des conventions de nommage utiles pour le password spraying/phishing.
  • Les documents scannés/imprimés laissent fréquemment fuiter le nom d’hôte ou l’IP interne de l’imprimante/scanner dans les métadonnées.
  • Toujours supprimer les métadonnées (-all=) de tout ce que vous produisez pendant un audit avant de partager des captures d’écran ou des fichiers PoC avec un client.
Aide / Page de manuel
exiftool [OPTIONS] FILE...

  -TAG                  Extract specific tag (repeatable)
  -TAG=VALUE            Write a tag value
  -all=                 Remove all metadata
  -r                    Recurse into subdirectories
  -ext EXT              Process only files with given extension
  -csv                  Output as CSV
  -json                 Output as JSON
  -gps:all              Extract all GPS-related tags
  -c FMT                GPS coordinate print format
  -g                    Group output by tag category
  -a                    Allow duplicate tags
  -m                    Ignore minor errors/warnings
  -overwrite_original   Don't keep a backup (_original) file when writing