ExifTool Cheat Sheet
Read and write metadata in images, documents, and media — GPS, camera info, author fields, and hidden tags.
Overview
ExifTool extracts and edits EXIF, IPTC, XMP, and other metadata. Essential in OSINT, CTF stego challenges, and verifying document provenance during investigations.
Authorized testing only. Use only on systems, networks, and accounts you own or have explicit written permission to test. Unauthorized access is illegal.
Install
sudo apt install -y libimage-exiftool-perlexiftool -verEssential commands
All metadata
exiftool photo.jpgCommon tags only
exiftool -common photo.jpgJSON output
exiftool -j photo.jpgRecursive directory
exiftool -r ./evidence/Common workflows
GPS and device info —
exiftool -gps:all -G photo.jpgexiftool -Make -Model -DateTimeOriginal -G1 *.jpgStrip metadata (privacy / redaction) —
exiftool -all= photo.jpgCreates photo.jpg_original backup by default
exiftool -all= -overwrite_original photo.jpgCompare / diff metadata —
exiftool -a -u -g1 file1.docx file2.docxCTF / stego hints —
exiftool -b -Comment image.pngexiftool -b -ThumbnailImage doc.pdf > thumb.jpgstrings image.pngBatch rename by date —
exiftool '-Filename<DateTimeOriginal' -d %Y%m%d_%H%M%S.%%e%%f dir/Write tag (document handling) —
exiftool -Author="Analyst" -Title="Evidence Item 42" report.pdfFlags reference
-G | Print group name |
|---|---|
-a | Duplicate tags |
-u | Unknown tags |
-b | Binary output (embedded thumbnails) |
-all= | Remove all metadata |
-overwrite_original | No backup file |
-r | Recursive |
-ext JPG | Filter extensions |
-if CONDITION | Conditional processing |
Tips
- Always preserve original evidence; work on copies unless court-approved redaction.
- PDFs may contain hidden JavaScript — metadata is only one layer; also check pdf-parser.
- -fast skips slow formats when scanning huge trees.
- Combine GPS with Google Maps only in authorized investigations.