Digital Forensics

mat2

mat2 — Metadata Anonymisation Toolkit — is the other side of the metadata coin. Where exiftool is about finding the hidden data, mat2 is about removing it cleanly before you hand a file to someone. It understands the metadata structures of many formats — images, PDFs, office documents, audio — and produces a cleaned copy stripped of the authorship, timestamps, GPS, device identifiers, and revision history that would otherwise leak information about you or your source. It’s an operational-security tool: run it on anything you publish.

Official-repo package; Security → Digital Forensics → mat2.

The help it prints

usage: mat2 [-h] [-V] [--unknown-members policy] [--inplace] [--no-sandbox]
            [-L | -s]
            [-v | -l | --check-dependencies | files ...]

Metadata anonymisation toolkit 2

positional arguments:
  files                 the files to process

options:
  -h, --help            show this help message and exit
  -V, --verbose         show more verbose status information
  --unknown-members policy
                        how to handle unknown members of archive-style files
                        (policy should be one of: abort, omit, keep) [Default:
                        abort]
  --inplace             clean in place, without backup
  --no-sandbox          Disable bubblewrap's sandboxing
  -v, --version         show program's version number and exit
  -l, --list            list all supported fileformats
  --check-dependencies  check if mat2 has all the dependencies it needs
  -L, --lightweight     remove SOME metadata
  -s, --show            list harmful metadata detectable by mat2 without
                        removing them

Examples

# Show what metadata a file contains (without cleaning)
mat2 --show document.pdf

# Clean a file — writes document.cleaned.pdf, leaves the original
mat2 document.pdf

# Clean several files at once
mat2 *.jpg

# Check whether a format is fully supported
mat2 --list

mat2 deliberately writes a new .cleaned file rather than editing in place, so you never lose the original by accident. Reach for it before sharing screenshots, documents, or images gathered or produced during an engagement.