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
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.
- cybersecurity Repository topic
- security Repository topic
- bug-bounty Repository topic
- automation Repository topic
- autonomous-pentesting Repository topic
- ai-agent Repository topic
- ai-security Repository topic
- ethical-hacking Repository topic
- golang Repository topic
- penetration-testing Repository topic
- forensics Declared skill tag
- file-carving Declared skill tag
- foremost Declared skill tag
- data-recovery Declared skill tag
- evidence-recovery Declared skill tag
- unallocated-space Declared skill tag
- data Derived category
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.