Skip to content

Hash cache bodies and File System backing files - #316

Merged
RyanDFIR merged 1 commit into
mainfrom
hash-cache-and-filesystem-bodies
Sep 5, 2026
Merged

Hash cache bodies and File System backing files#316
RyanDFIR merged 1 commit into
mainfrom
hash-cache-and-filesystem-bodies

Conversation

@RyanDFIR

@RyanDFIR RyanDFIR commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Records a SHA-256 for each cached response body and each File System API backing file, so an artifact recovered from a profile can be matched against a copy found anywhere else.

A cache body is only hashed when the bytes on disk are actually the resource. ccl returns the still-compressed bytes when it cannot decode a content-encoding, and hashing those gives the digest of a gzip stream, which matches nothing and looks identical in the output to a digest of the real thing. Empty files are skipped for the same reason: the digest of no bytes identifies nothing, and a constant repeated down a column reads as a finding.

Output gains Body SHA256 on the Timeline sheet, File SHA256 on the Storage sheet, and the matching sqlite columns. The Storage autofilter stopped a column short of File Type, so the last column could not be filtered on at all; it now covers every column.

Adds tests/test_hashing.py, covering that the digests land under the right headers, that the neighbouring columns did not shift, and that every column falls inside the autofilter. Full suite passes including the corpus parse tests.

Records a SHA-256 for each cached response body and each File System API
backing file, so an artifact recovered from a profile can be matched against a
copy found anywhere else.

A cache body is only hashed when the bytes on disk are the resource. ccl returns
the still-compressed bytes when it cannot decode a content-encoding, and hashing
those gives the digest of a gzip stream, which matches nothing and is
indistinguishable in the output from a digest of the resource. Empty files are
left unhashed for the same reason: the digest of no bytes identifies nothing,
and a constant repeated through the output reads as a finding.

Adds Body SHA256 to the Timeline sheet and File SHA256 to the Storage sheet,
with matching sqlite columns. The Storage autofilter stopped a column short of
File Type, so the last column could not be filtered on at all; it now covers
every column.
@RyanDFIR
RyanDFIR merged commit f1ef333 into main Sep 5, 2026
18 checks passed
@RyanDFIR
RyanDFIR deleted the hash-cache-and-filesystem-bodies branch September 5, 2026 23:56
@RyanDFIR
RyanDFIR restored the hash-cache-and-filesystem-bodies branch September 5, 2026 23:58
@RyanDFIR
RyanDFIR deleted the hash-cache-and-filesystem-bodies branch September 6, 2026 00:01
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