← Back to Help
WarpedWing Labs

Firefox JSONLZ4 Salvage Parser

This module salvages Firefox JSONLZ4 (mozLz4) compressed JSON files, extracting sessions, bookmarks, and telemetry data from both intact and carved/truncated files.

Disclaimer

This report is for informational and investigative purposes only. The data presented should be independently verified before being relied upon for any legal, regulatory, or evidentiary purpose.

Limitations

What Are JSONLZ4 Files?

Firefox uses a custom LZ4-based compression format called "mozLz4" for storing JSON data. These files have a mozLz40\0 magic header followed by LZ4-compressed JSON content.

Common JSONLZ4 files include:

Salvage Capabilities

This module is specifically designed for forensic recovery from:

Recovery Techniques

  1. Segment detection: Scans files for mozLz40\0 magic bytes to find embedded JSONLZ4 segments
  2. Progressive tail trimming: Attempts decompression with progressively shorter input until success
  3. Partial decompression: Uses liblz4 C library for partial decompression when available
  4. JSON repair: Multi-stage repair process:
  5. Control character removal
  6. Backslash escape fixing
  7. Brace/bracket balancing
  8. Truncation to last valid JSON boundary

Parsed Data

Sessions

Extracted from session restore files:

Bookmarks

Extracted from bookmark backup files:

Telemetry Events

Extracted from telemetry event files:

Telemetry Metrics

Extracted from telemetry main ping files:

Data Sources

Artifact Path Pattern Purpose
Session store sessionstore.jsonlz4 Current session state
Session backup sessionstore-backups/*.jsonlz4 Session recovery files
Bookmarks bookmarkbackups/*.jsonlz4 Bookmark snapshots
Telemetry datareporting/archived/**/*.jsonlz4 Browser telemetry
Carved files **/*.jsonlz4, **/*.mozlz4 Recovered segments

Not Currently Parsed

Output Files

Four CSV files are generated:

File Classification

When --classify is specified, source files are organized into categories:

Firefox/
  Sessions/      - Session restore files
  Bookmarks/     - Bookmark backup files
  Telemetry/     - Telemetry data files
  Other/         - Valid mozLz4 JSON (unclassified type)
Unknown/         - JSON parsed but not Firefox format
Corrupt/         - No salvageable mozLz4 segments found

Command-Line Options

Option Description
--glob File pattern to match (default: **/*.*lz4)
--append Append to existing CSV files instead of overwriting
--classify Organize files: move, copy, link, or none
--preserve-tree Maintain source directory structure in classification
--dry-run Show what would be done without making changes
--delete-source Delete source files after successful processing

Dependencies

Scan Type

Exemplar AND Candidate - This module runs during both live system scans and carved file processing, making it particularly useful for forensic recovery scenarios.