Individual skill

performing-file-carving-with-foremost

Recover files from disk images and unallocated space using Foremost's header-footer signature carving to extract evidence regardless of file system state.

internal/tools/skills/data/digital-forensics/performing-file-carving-with-foremost/SKILL.md

Read pinned source

Source commit d42f381ad34843e71a42658e5c57290c713e85af

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Network or broad shell
Last checked
Nov 7, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
1,309
Repository last updated
Nov 7, 2026
License
Apache-2.0

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Performing File Carving with Foremost

## When to Use
- When recovering files from unallocated disk space or corrupted file systems
- For extracting evidence from formatted or wiped storage media
- When file system metadata is unavailable but raw data sectors contain evidence
- During investigations requiring recovery of specific file types from raw images
- As a complement to file system-based recovery for maximum evidence extraction

## Detection Gaps & Validation
- **Fragmentation is the #1 carving failure.** Header-footer carving assumes contiguous data; a file split across non-adjacent clusters is recovered truncated or stitched with unrelated sectors. Foremost/Scalpel do **not** reassemble fragments — corrupt output here is expected, not a tool error. Cross-check size/validity before trusting a carve.
- **No footer = guesswork.** Types without a reliable footer (and `max_size` caps in `foremost.conf`/`scalpel.conf`) cause truncation or runaway over-reads. Tune `max_size` per type and verify the tail of large carves.
- **Signature-only blind spots:** encrypted or compressed payloads have no plaintext magic bytes and will not carve; embedded files (e.g., a ZIP inside a `docx`, both `\x50\x4b\x03\x04`) get double-counted, inflating hit counts.
- **False positives:** random data matching `\xff\xd8\xff`/`%PDF` produces files that pass the signature but fail to open. Validate with `file`, then actually parse/open (pdftotext, image render, `sqlite3 .schema`) before cataloging as evidence.