Forensicsdata carvingjpeg recoverymov recoveryforensicsfile recovery

recoverjpeg

recoverjpeg recovers JFIF (JPEG) pictures and MOV movies from peripherals or filesystem images. It acts as a data carving tool useful in forensics investigations for recovering overwritten or corrupted media files.

Description

recoverjpeg is designed to recover JFIF (JPEG) pictures and MOV movies from devices like digital camera memory cards or filesystem images, especially when partitions are mistakenly overwritten or devices are corrupted. The package includes executables: recoverjpeg for JPEG recovery, recovermov for MOV movies, remove-duplicates to eliminate duplicate files, and sort-pictures to organize pictures by EXIF date.

This tool is particularly valuable in forensics investigations as a carver, extracting media files from raw data without relying on filesystem structures. Users can restore files to a specified directory, manage file naming, and post-process recoveries to remove duplicates and sort by metadata.

Additional utilities like remove-duplicates help clean up results by identifying and optionally deleting duplicate files in the current directory. sort-pictures organizes recovered JPEGs into directories based on EXIF dates, sizes, or validity, creating hard links for efficient management.

How It Works

recoverjpeg performs data carving by scanning input files or devices in blocks (default 512 bytes) to identify and extract JPEG (JFIF) headers and footers, reconstructing files up to a maximum size (default 6MB). recovermov applies similar carving techniques for MOV movie files. Post-processing tools like remove-duplicates compare file contents to identify exact matches bidirectionally unless -f is used for one-way removal. sort-pictures parses EXIF tags in JPEGs matching the image?????*.jpg pattern, categorizing into directories like invalid, small (<100KB), undated, or YYYY-MM-DD based on extraction date.

Installation

bash
sudo apt install recoverjpeg

Flags

-b blocksizeBlock size in bytes (default: 512)
-d formatDirectory format string in printf syntax
-f formatFile format string in printf syntax
-hThis help message
-i indexInitial picture index
-m maxsizeMax jpeg file size in bytes (default: 6m)
-o directoryRestore jpeg files into this directory
-qBe quiet
-n base_nameBasename of the mov files to create (default: "video_")
-fForce removal of duplicates (one-way) for remove-duplicates

Examples

Display help message and usage for recoverjpeg
recoverjpeg -h
Display help message and usage for recovermov
recovermov -h
Recover JPEG pictures from a filesystem image or device using defaults
recoverjpeg [file|device]
Recover MOV movies from a filesystem image or device
recovermov [file|device]
Recover JPEGs from image.img and save to specified output directory
recoverjpeg -o /path/to/output image.img
Recover MOVs from device with custom basename and output directory
recovermov -o /path/to/output -n movie_ device
Remove duplicates of recovered files in current directory (force mode)
remove-duplicates -f
Sort recovered JPEG pictures in current directory by EXIF date into categorized subdirectories
sort-pictures
Updated 2026-04-16kali.org ↗