Forensics
Foremost is a forensic data recovery program that recovers files based on their headers, footers, and internal data structures.
sudo apt install foremost
foremost -i <input> -o <output>
Foremost is a forensic file carving tool originally developed by the United States Air Force Office of Special Investigations. It recovers files from disk images by scanning for known file headers, footers, and internal data structures.
Foremost works by reading through a raw disk image or partition dump and identifying file boundaries based on signature matching. Once a file header is found, Foremost carves the data until the corresponding footer is reached or a maximum file size limit is hit.
While Foremost is fast and lightweight, it is limited to recovering contiguous file data and cannot handle fragmented files. For more comprehensive recovery, tools like PhotoRec or Scalpel may be more appropriate.
| Command | Purpose |
|---|---|
foremost -i <image> -o <new-output-directory> | Carve default file types from an image. |
foremost -t jpg,pdf -i <image> -o <new-output-directory> | Restrict carving to selected types. |
foremost -w -i <image> -o <new-output-directory> | Create only the audit report. |
foremost -q -i <image> -o <new-output-directory> | Use quick sector-start searching. |
foremost image.ddCarve files from an image using the default config, writing to ./outputforemost -i image.dd -o outputExplicitly set the input file and output directoryforemost -t jpg -i image.ddRecover only JPEG files from the imageforemost -t jpg,pdf,doc -i image.dd -o recoveredCarve a comma-separated list of file types into a custom directoryforemost -t all -i image.dd -o outputAttempt to recover every file type known to foremostforemost -i /dev/sdb -o carvedCarve directly from a raw block deviceforemost -v -t png -i image.ddVerbose mode: log all messages to the screen while carving PNGsforemost -T -t jpg -i image.ddAppend a timestamp to the output directory so it is not overwrittenforemost -c /etc/foremost.conf -i image.ddUse a specific configuration file defining headers/footersforemost -w -i image.dd -o audit_onlyOnly write the audit.txt file; do not extract files to diskforemost -a -t jpg -i image.ddWrite all headers and perform no error detection (recover corrupted files)foremost -q -i image.ddQuick mode: search only on 512-byte boundaries for speedforemost -Q -i image.dd -o outputQuiet mode: suppress on-screen output messagesforemost -d -i image.ddTurn on indirect block detection (for UNIX file systems)foremost -b 1024 -i image.ddSet the block size used during the search (default 512)foremost -s 1024 -i image.ddSkip the first N bytes of the input before beginning the searchforemost -t pdf -o pdfs -i disk.imgExtract all PDF documents from a disk imageforemost -t exe,zip,rar -i memory.ddCarve executables and archives from a memory dumpforemost -t jpg,gif,png,bmp -i image.dd -o imagesRecover common image formats into an images directoryforemost -t ole -i image.ddRecover OLE/legacy Microsoft Office documents (doc/xls/ppt)foremost -v -T -t all -i /dev/sda1 -o /path/to/outputVerbose, timestamped, full carve of a partition to a set output pathsudo foremost -i /dev/sdb -o /mnt/recoveryRun with elevated privileges to read a raw devicecat output/audit.txtReview the audit log summarizing every file foremost carvedforemost -hPrint usage and the full list of optionsforemost -VDisplay copyright/version information and exitRecover files that have been deleted from storage media by carving them based on file signatures.
Extract files from forensic disk images created with dd or other imaging tools.
Salvage files from damaged or corrupted storage media for forensic investigation.
Recover accidentally lost files from formatted or corrupted partitions.
Forensics
Learn how to use Autopsy, the free digital forensics software, in a hands-on practice case. Start with a verified disk image, run ingest modules, look for deleted files, and use keyword hits and timeline entries to build a report.
Forensics
ExifTool is a platform-independent tool for reading, writing, and editing metadata in a wide variety of files including images, audio, and video.
Forensics
Learn how to use Binwalk to scan a firmware image, read the signature table, extract embedded filesystems, and spot encrypted regions — a beginner tutorial for Kali Linux.
Forensics
Steghide is a steganography tool designed to hide confidential data inside various types of image and audio files without altering their outward appearance.
Forensics
Volatility is an advanced open-source memory forensics framework used for incident response and malware analysis, allowing extraction of digital artifacts from volatile memory (RAM) samples.
Reverse Engineering
ADB, or Android Debug Bridge, is a versatile command-line tool that acts as a client-server program, facilitating communication between your development machine (the client) and an Android device (running the adbd daemon) via a server process binding TCP port 5037. It ships as part of the Android SDK Platform Tools, and on Kali Linux, it's available as the `android-tools-adb` package. ADB is the standard device bridge for Android mobile pentesting and forensics, enabling actions like deploying Frida servers, pulling APKs, and capturing detailed logcat output for analysis.
Learn digital forensics fundamentals including evidence collection, forensic imaging, memory analysis, timeline analysis, and proper chain of custody procedures for investigations.
Security Operations · AdvancedLearn detection engineering principles including rule development, Sigma rules, testing methodologies, false positive management, and building a detection program for security operations.
Security Operations · AdvancedLearn the incident response lifecycle including preparation, detection, containment, eradication, recovery, and lessons learned with practical frameworks and real-world scenarios.
Security · IntermediateLearn about credential stuffing attacks that use leaked credentials from data breaches to automate account takeover across different services.
Generates a folder structure containing the salvaged files, automatically sorted into subdirectories based on their file extensions.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.