foremost -hDisplays the help screen with a summary of available command line options
Recovers files from disk images and raw data by carving their headers and footers, even without a file system.
sudo apt install foremostforemost -hDisplays the help screen with a summary of available command line options
foremost -VDisplays the current version information and copyright details of the tool
foremost [image_file]Carves recoverable files from a disk image using default settings and signatures
Example
foremost image.ddforemost -i [input_file]Explicitly specifies the input file or image to be processed for file carving
Example
foremost -i memory_dump.memforemost -o [output_dir] -i [image_file]Specifies a custom output directory to store the recovered files and report
Example
foremost -o recovered_data -i drive.imgforemost -T -i [image_file]Appends a timestamp to the output directory name to prevent overwriting previous results
Example
foremost -T -i suspect_disk.ddforemost -v -i [image_file]Enables verbose mode to display detailed processing information to the screen
Example
foremost -v -i evidence.imgforemost -Q -i [image_file]Enables quiet mode to suppress output messages and protect privacy during processing
Example
foremost -Q -i sensitive.ddforemost -o /tmp/recovery -i [image_file]Directs output to a temporary filesystem to avoid writing to evidence handling drives
Example
foremost -o /tmp/recovery -i usb.imgforemost -t all -i [image_file]Attempts to carve all supported file types defined in the configuration
Example
foremost -t all -i usb_dump.imgforemost -t jpg -i [image_file]Restricts file carving specifically to JPEG image files
Example
foremost -t jpg -i camera_card.ddforemost -t png -i [image_file]Restricts file carving specifically to PNG image files
Example
foremost -t png -i screenshot_dump.rawforemost -t gif -i [image_file]Restricts file carving specifically to GIF image files
Example
foremost -t gif -i web_cache.ddforemost -t pdf -i [image_file]Restricts file carving specifically to PDF documents
Example
foremost -t pdf -i documents.imgforemost -t doc -i [image_file]Restricts file carving specifically to legacy Microsoft Word documents
Example
foremost -t doc -i legacy_files.ddforemost -t ole -i [image_file]Carves OLE compound files like PowerPoint, Word, Excel, and MSI installers
Example
foremost -t ole -i corporate_disk.imgforemost -t zip -i [image_file]Carves ZIP archives and formats based on ZIP containers like Jar and Office XML
Example
foremost -t zip -i backup.ddforemost -t html -i [image_file]Carves HTML files which is useful for reconstructing web browsing history
Example
foremost -t html -i browser_cache.imgforemost -t exe -i [image_file]Carves Windows PE executables which is critical for malware analysis
Example
foremost -t exe -i malware_sample.memforemost -t jpg,pdf -i [image_file]Carves only JPEG images and PDF documents simultaneously
Example
foremost -t jpg,pdf -i mixed_evidence.ddforemost -t wav,rif -i [image_file]Targets audio files specifically for voice recorder forensics
Example
foremost -t wav,rif -i audio_recorder.imgforemost -t bmp -i [image_file]Recovers uncompressed bitmap images often found in older systems or steganography
Example
foremost -t bmp -i old_windows.imgforemost -t htm -i [image_file]Separately targets HTM extensions if distinguished from HTML in config
Example
foremost -t htm -i web_server_logs.imgforemost -t cpp,c,h -i [image_file]Attempts to recover C/C++ source code files based on headers if configured
Example
foremost -t cpp,c,h -i developer_disk.ddforemost -t gz,tgz -i [image_file]Recovers GZIP compressed files common in Unix/Linux environments
Example
foremost -t gz,tgz -i linux_backup.ddforemost -t ppt,xls,doc -i [image_file]Specifically targets pre-2007 Microsoft Office binary formats
Example
foremost -t ppt,xls,doc -i office_2003.ddforemost -t pptx,xlsx,docx -i [image_file]Specifically targets modern XML-based Microsoft Office formats (requires config)
Example
foremost -t pptx,xlsx,docx -i office_2019.ddforemost -c [config_file] -i [image_file]Uses a specific configuration file with custom headers and footers
Example
foremost -c custom.conf -i device.imgforemost -b [size] -i [image_file]Sets the block size used for reading the input file to optimize performance
Example
foremost -b 1024 -i data.imgforemost -k [size] -i [image_file]Sets the chunk size for checking headers which helps with alignment
Example
foremost -k 512 -i memory.dumpforemost -s [sectors] -i [image_file]Skips the specified number of blocks before starting the extraction process
Example
foremost -s 2048 -i partition.imgforemost -d -i [image_file]Enables indirect block detection for Unix file systems to handle fragmentation
Example
foremost -d -i unix_disk.ddforemost -a -i [image_file]Writes all headers found even if no footer is detected which allows partial recovery
Example
foremost -a -i corrupted.imgforemost -T -v -q -i [image_file]Combines timestamp, verbose, and quick mode for rapid on-site triage
Example
foremost -T -v -q -i triage_image.ddforemost -d -T -i [image_file]Uses indirect block detection with timestamped output for Linux partitions
Example
foremost -d -T -i ext4_partition.ddforemost -v -T -t all -i [image_file]Carves all files with verbose logging and timestamped output for case management
Example
foremost -v -T -t all -i investigation.ddforemost -Q -o [dir] -t jpg,png -i [image_file]Quietly extracts only common image formats to a specific directory
Example
foremost -Q -o images_only -t jpg,png -i server.imgforemost -t exe,elf -o [dir] -i [image_file]Targets executable binaries for Windows and Linux to isolate potential malware
Example
foremost -t exe,elf -o binaries -i infected_host.imgforemost -t rar,zip,7z -i [image_file]Focuses on archive formats often used by attackers for data exfiltration
Example
foremost -t rar,zip,7z -i exfil_data.ddforemost -t sxw,sxc,sxi -i [image_file]Targets OpenOffice documents useful for Linux desktop investigations
Example
foremost -t sxw,sxc,sxi -i linux_desktop.ddforemost -t wmv,wma -i [image_file]Recovers Windows Media formats to identify unauthorized media usage
Example
foremost -t wmv,wma -i media_server.ddforemost -s 63 -t all -i [image_file]Skips the standard track 0 area to start carving at the first partition start
Example
foremost -s 63 -t all -i full_disk.imgforemost -c foremost.conf -v -w -i [image_file]Validates a custom config file against an image with verbose audit logging
Example
foremost -c cases/case1.conf -v -w -i drive.ddforemost -s 100 -b 512 -i [image_file]Skips the first 100 blocks on a legacy media with small block size
Example
foremost -s 100 -b 512 -i floppy.imgforemost -t log -i [image_file]Attempts to recover deleted log files to reconstruct event timelines
Example
foremost -t log -i var_log.imgforemost -v -i [image_file] > carving.log 2>&1Redirects verbose output to a log file for post-incident documentation
Example
foremost -v -i server.dd > carving.log 2>&1foremost -a -t mpg,avi,mov -i [image_file]Forcefully recovers video fragments without footers from DVR systems
Example
foremost -a -t mpg,avi,mov -i dvr_disk.ddforemost -b 4096 -t all -i [image_file]Adjusts block size to 4096 bytes for modern advanced format drives
Example
foremost -b 4096 -t all -i 4k_sector_disk.ddforemost -k 1024 -q -i [image_file]Uses a larger chunk size with quick mode for rapid memory artifact assessment
Example
foremost -k 1024 -q -i ram_dump.memforemost -c /etc/foremost.conf -t all -i [image_file]Explicitly calls the system-wide configuration file for standard processing
Example
foremost -c /etc/foremost.conf -t all -i evidence.ddforemost -c local.conf -o specialized -i [image_file]Uses a local config for proprietary file headers outputting to a named folder
Example
foremost -c local.conf -o specialized -i proprietary.ddforemost -o ./audit_run -w -t all -i [image_file]Performs a dry run to estimate recoverable data types without writing files
Example
foremost -o ./audit_run -w -t all -i unknown_fs.ddforemost -t all -i - < [image_file]Accepts input from stdin allowing for piping from other tools like netcat or dd
Example
cat image.dd | foremost -t all -i -foremost -o raw_carve -i [image_file] && zip -r case.zip raw_carveChains foremost execution with zip to immediately archive the recovered evidence
Example
foremost -o raw_carve -i disk.img && zip -r case.zip raw_carveforemost -q -t jpg -T -i [image_file]Runs a quick mode scan for JPEGs with timestamping for rapid media triage
Example
foremost -q -t jpg -T -i user_folder.ddforemost -w -c custom_headers.conf -i [image_file]Audits a disk image against custom headers to verify signature effectiveness
Example
foremost -w -c custom_headers.conf -i test_set.ddforemost -o evidence/ -v -d -i [image_file]Combines indirect block detection and verbose mode into a dedicated evidence folder
Example
foremost -o evidence/ -v -d -i fragmented.ddforemost -t all -a -v -T -i [image_file]Runs the most aggressive recovery mode with all types, header-only writing, and logs
Example
foremost -t all -a -v -T -i final_attempt.ddScans disk images and files for email addresses, URLs, credit-card numbers and other features without parsing the file system.
Analyses and extracts firmware images: finds embedded file systems, compressed data and executable code by signature and entropy.
Command-line tools for analysing disk images and file systems: list files, recover deleted ones and build timelines.
A graphical digital-forensics platform built on The Sleuth Kit for disk image analysis, timelines, keyword search and file recovery.