Skip to content

Walk an acquisition's filesystems, and carve only what a walk cannot reach - #47

Merged
abrignoni merged 4 commits into
mainfrom
feat/walk-image-filesystems
Sep 10, 2026
Merged

abrignoni merged 4 commits into
mainfrom
feat/walk-image-filesystems

Conversation

@abrignoni

@abrignoni abrignoni commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

An E01 of a computer holds filesystems, so its files have names, paths and dates of their own. GLEAPP carved it instead, which threw all of that away and returned offsets.

Measured on a 238.5 GiB Windows acquisition:

walk carve, whole disk carve, free space only
found 44,884 media files with paths and dates 384,386 hits with neither 7,233
took 11 seconds ~40 minutes 8.3 minutes
scanned 238.5 GiB 149.0 GiB

Splitting the whole-disk carve against every allocated extent: 7.7% sat inside a media file the walk already had, 90.2% inside another live file (icons in DLLs, browser caches), 2.1% in space no file claimed. So walking is how an image is read, and carving is for the part a walk cannot reach.

Three ways to ask:

  • walk, the default
  • "carve": true at ingest, or gleapp source carve <name> afterwards on a source already ingested, so the choice can be made once the case is open
  • --unallocated-only to read only the space a volume reports free

Safety choices worth naming:

  • A volume that cannot report its free space drops the scope for the whole image rather than being skipped. Reading part of a disk while reporting the carve finished is worse than reading all of it, and only NTFS can answer so far. When the scope is used, the case meta records the runs and bytes scanned.
  • A walked row records the volume and the walker's node, not a byte offset: a walked file can be fragmented, can be compressed, and on NTFS can be resident with its bytes inside its own MFT record and no extent at all. The node is JSON because it is not always a number, a FAT directory entry being (cluster, size, is_dir).
  • origin says whether a row was walked or carved.
  • Nothing false is recorded for a filesystem whose dates are not read. FAT keeps a local time with no zone; reading one as UTC would place every file wrong by the offset, so the column is empty rather than 1970.

Validated on real acquisitions: 46,386 rows in 27 s from the Windows image, 14,108 from a Big Sur image including its sealed system volume, 0 from an ADS test image holding 26 files and no media. 40 files read back through the case were byte-identical to an independent read.

Tests build a FAT32 volume and wrap it in an E01. Controls: removing the walk turns 7 of 8 red; making a quiet volume skip instead of dropping the scope turns the two-volume test red. That last fixture needs two volumes, because with one the two behaviours produce the same empty answer and the control passed against a build I had deliberately broken.

Needs qnxprobe #27 re-vendored for --unallocated-only to do anything; until then it falls back to the whole image, which the tests cover.

🤖 Generated with Claude Code

abrignoni and others added 2 commits September 9, 2026 19:02
An E01 of a computer holds filesystems, so its files have names, paths and
dates of their own. GLEAPP carved it instead, which threw all of that away
and returned offsets.

Measured on a 238.5 GiB Windows acquisition, walking found 44,884 media
files with paths and timestamps in 11 seconds. Carving the same image took
about 40 minutes to return 384,386 hits with no names, and splitting those
against every allocated extent on the volume: 7.7% sat inside a media file
the walk already had, 90.2% inside another live file (icons in DLLs,
browser caches), and 2.1% in space no file claimed. That last 2.1% is what
carving is uniquely for, so carving stays, as a pass that is asked for
rather than the way an image is read.

qnxprobe 1.18 is vendored beside ewfprobe and mediacarve for the reading.
Volumes are found through its GPT and MBR parsers and its identify_fs, and
each is walked with its media registered under <volume>/<path>. A volume
the reader cannot open is recorded in the case meta and the others still
register.

A walked row records the volume and the walker's node, not a byte offset,
because a walked file can be fragmented across extents, can be compressed,
and on NTFS can be resident with its bytes inside its own MFT record and
no extent at all. The node is stored as JSON because it is not always a
number: an MFT record and an APFS object id are, and a FAT directory entry
is (cluster, size, is_dir). An origin column says whether a row was walked
or carved, so a report can state it rather than infer it from a name.

Nothing false is recorded for a filesystem whose dates this reader does
not read. FAT keeps a local time with no zone, and reading one as though
it were UTC would place every file wrong by the offset, so the column is
left empty rather than filled with 1970.

Validated against real acquisitions: 46,386 rows in 27 seconds from the
Windows image, 14,108 from a Big Sur image including its sealed system
volume, and 0 from an ADS test image that holds 26 files and no media. 40
files pulled back through the case were byte-identical to an independent
read of the same image.

Co-Authored-By: Claude Opus 5 <[email protected]>
Walking an acquisition reports the files its filesystems still list.
Carving reads the disk itself, so it also reaches what was deleted, and
that is the reason to run it. Which of those an examiner wants is their
call, and it can be made after the fact rather than only at ingest.

`gleapp source carve <name>` scans an image source that has already been
ingested and adds what it finds, marked as carved. The pipeline runs over
just the new rows, because process() already takes a where clause.

Two limits are stated rather than implied, because the counts are large
enough to matter. It scans the whole disk, not only the space no file
claims, so on a used drive most of what it returns is resources embedded
inside live files: 384,386 hits on a 238.5 GiB acquisition, of which 8,154
lay in unclaimed space. Scoping that needs a volume's free space, which the
reader cannot report yet. And a hit is skipped only when the same source
was already carved at that offset, so re-running adds nothing; a hit whose
bytes are also a walked file is still added, because a walked row records a
node and not an offset and the two cannot be compared directly. Those pairs
share a sha256, so the case grades them as the exact duplicates they are.

Co-Authored-By: Claude Opus 5 <[email protected]>
@abrignoni abrignoni changed the title Walk the filesystems in an acquisition instead of carving it Walk the filesystems in an acquisition, and carve it only when asked Sep 9, 2026
A signature found inside an allocated run belongs to a file the directory
tree already names. Only the space a volume reports free can hold something
a walk cannot reach, so `source carve --unallocated-only` reads that and
nothing else.

Measured on a 238.5 GiB Windows acquisition: 149.0 GiB scanned instead of
238.5, 8.3 minutes instead of about 40, and 7,233 hits instead of 384,386.
What it drops is the 90.2% that were resources embedded inside live files.

A volume that cannot report its free space drops the scope for the whole
image rather than being skipped. Reading part of a disk while reporting the
carve as finished is worse than reading all of it, and only NTFS can answer
so far, so the fallback is the common case rather than a corner. When the
scope is used, the case meta records how many runs and how many bytes were
scanned, so a report can say what was covered.

The test for that fallback needs TWO volumes, one that answers and one that
does not: with a single volume, skipping the quiet one and dropping the
scope produce the same empty answer, so the control passed against a
deliberately broken build until the fixture grew a second volume.

Co-Authored-By: Claude Opus 5 <[email protected]>
@abrignoni abrignoni changed the title Walk the filesystems in an acquisition, and carve it only when asked Walk an acquisition's filesystems, and carve only what a walk cannot reach Sep 9, 2026
The rules described walking an acquisition but stopped at "scoping a carve
to unallocated space needs free-space reporting the reader does not have",
which is no longer where this stands.

Records what `source carve` and `--unallocated-only` do and what they cost,
that a volume unable to report its free space drops the scope for the whole
image rather than being skipped, and that the copy vendored here cannot
report it yet, so the fallback is what happens today rather than a corner
case. Also records why the test for that needs two volumes.

Co-Authored-By: Claude Opus 5 <[email protected]>
@abrignoni
abrignoni merged commit 85d89c3 into main Sep 10, 2026
8 checks passed
@abrignoni
abrignoni deleted the feat/walk-image-filesystems branch September 10, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant