Foremost एक fast file carving tool है जो disk image या raw data से deleted files recover कर सकता है। यह file signatures के based पर files को ढूंढता है, चाहे file system corrupt हो या delete हुआ हो।
👉 Data recovery, digital forensics, और incident response में यह simple और effective tool है।
🎯 Foremost क्या-क्या कर सकता है
Image Recovery
JPG, PNG, GIF, BMP images
Video Recovery
AVI, MPG, MOV videos
Archive Recovery
ZIP, RAR, GZ archives
Document Recovery
PDF, DOC, DOCX files
Audio Recovery
WAV, MP3, OGG audio
Raw Data Scan
Disk image full scan
⚙️ Installation (Kali Linux / Termux)
System Update
apt updateInstall Foremost
apt install foremostVerify Installation
foremost -V💻 Basic Commands (Use)
👉 Disk image या raw file पर file carving करो:
Basic File Recovery (All Types)
foremost -i image.dd -o output/Recover Specific File Type (JPG only)
foremost -t jpg -i image.dd -o output/Recover Multiple Types (JPG, PDF, ZIP)
foremost -t jpg,pdf,zip -i image.dd -o output/Verbose Mode (Detailed Output)
foremost -v -i image.dd -o output/Quick Scan (Without De-duplication)
foremost -Q -i image.dd -o output/🌐 Real Example (Practical समझ)
👉 Scenario: Camera की SD card से accidentally सभी photos delete हो गई हैं। Recover करनी हैं।
Create Disk Image (First Step)
dd if=/dev/sdb of=sdcard.img bs=4kSD card की raw image बनाओ (sdb से sdcard.img में)
Run Foremost on Image
foremost -i sdcard.img -o recovered_photos/Image पर file carving चलाओ
Check Recovered Files
ls -lh recovered_photos/jpg/Recover किए गए photos check करो
Foremost output में दिखेगा:
🧠 इसका मतलब:
JPG Signature Found
0xFFD8FF = JPG file signature detected
File Location in Disk
Offset tells where file starts in raw data
15 Files Extracted
Successfully carved 15 deleted files
👉 Output directory structure:
🔥 Advanced Example (Specific File Types)
Recover Only Specific Formats (PDF + DOCX + ZIP)
foremost -t pdf,doc,zip -i disk_image.dd -o documents/👉 Supported file types:
👉 Custom configuration:
/etc/foremost.confFile recovery में proper approach बहुत ज़रूरी है
⚠️ याद रखो:
- • पहले disk image बनाओ, directly scan मत करो
- • Recovery पर write-protected mode use करो
- • Recover करने के बाद files verify करो
- • Authorized devices पर ही test करो
👉 Practice के लिए: Virtual machine में test files delete करो और recover करने की कोशिश करो
🧩 Related Tools
Autopsy
Digital forensics platform
Volatility
Memory forensics framework
Sleuth Kit
File system forensics
Scalpel
File carving alternative
Foremost = "Deleted Files ka Dukandaar"
जैसे dustbin से deleted items निकालते हैं, वैसे ही Foremost disk के raw data से deleted photos, videos, documents सब बाहर निकाल देता है। बस file का signature चाहिए!