---
{
  "title": "File carving",
  "summary": "Reconstruct content using file structure when filesystem records are missing.",
  "topic": "forensics",
  "level": "Intermediate",
  "updated": "2026-10-12",
  "units": [
    2
  ],
  "aliases": [],
  "sources": [
    {
      "title": "NIST: Integrating Forensic Techniques into Incident Response",
      "url": "https://csrc.nist.gov/pubs/sp/800/86/final"
    }
  ],
  "published": "2026-10-02",
  "editorialVersion": 2
}
---

## The idea

File carving searches for recognizable structures in raw data and attempts to reconstruct files without relying on intact filesystem metadata. Signatures and format rules can help identify content, but fragmentation, compression, and false matches complicate recovery. Carved data may not retain its original filename, path, owner, or timestamps. Validate the recovered structure and explain the limits of the method before attributing it to an activity.

## In practice

A tool locates a recognizable image header in an acquired storage image and attempts to recover a viewable file, while the investigator checks completeness.

## A common misunderstanding

A carved file is not proof of its original location or how it arrived on the device.

## Check your understanding

What extra evidence would help establish provenance?

**Think it through:** Filesystem records, application history, related logs, or other corroborating artifacts.


## Reconstruct content without normal directory references

File carving searches for recognizable structures in raw data when normal filesystem references are unavailable or incomplete. It may use headers, footers, internal lengths, or format rules. The result can be useful, but it may lack the original filename, path, timestamps, or complete content. Keep those missing attributes separate from what the recovered bytes actually show.

Fragmentation complicates recovery because a file's pieces may not be stored contiguously. Compression, encryption, overwriting, and partial acquisition also affect results. A tool can produce a file that opens yet remains incomplete or incorrectly assembled. Validate the recovered structure and content with suitable independent checks where practical.

## A fictional image recovery

An academy analyzes a permitted training disk image with damaged directory records. A carving tool recovers several image-like files. The examiner checks their format, dimensions, and visible completeness, then records the offsets and method used. A recovered image's content does not automatically establish its original owner or when it was viewed.

Work from a preserved image rather than writing recovered files onto the source medium. New writes can overwrite material that might otherwise be recoverable. Keep the original acquisition and the derived outputs distinguishable so another analyst can reproduce the carving operation and evaluate its limitations.

## Evaluate a recovered object

Use a public training image designed for recovery exercises. Select one carved file and record its apparent format, source offset if available, tool version, and validation result. List the contextual information that carving did not recover. Avoid inventing an original filename or timestamp to make the report look complete. The absence of that context is part of the finding.

## Keep exploring

- [[file-recovery]]
- [[hex-analysis]]
- [[file-metadata]]
