Skip to content

Add LevelDB, IndexedDB, LocalStorage and SessionStorage#5

Open
JSCU-CNI wants to merge 18 commits into
fox-it:mainfrom
JSCU-CNI:leveldb
Open

Add LevelDB, IndexedDB, LocalStorage and SessionStorage#5
JSCU-CNI wants to merge 18 commits into
fox-it:mainfrom
JSCU-CNI:leveldb

Conversation

@JSCU-CNI
Copy link
Copy Markdown
Contributor

@JSCU-CNI JSCU-CNI commented Sep 29, 2025

This PR adds a LevelDB storage implementation to dissect.database.

Also adds support for serialization formats building on top of LevelDB: IndexedDB, and Chromium's LocalStorage and SessionStorage. Please let us know if these formats should be structured differently in this project.

Makes use of two (pure Python and/or Rust) dependencies: cramjam (for LevelDB Snappy decompression) and v8serialize (for IndexedDB v8 javascript object deserialization). We do not have the time or resources to port these dependencies to dissect.util or dissect.* - hopefully these dependencies can be accepted.

Comment thread dissect/database/util/blink.py Outdated
@JSCU-CNI
Copy link
Copy Markdown
Contributor Author

JSCU-CNI commented Nov 5, 2025

Please let us know if there is anything we can do to move this PR forward or to ease the review process.

@Schamper
Copy link
Copy Markdown
Member

Schamper commented Nov 5, 2025

Please let us know if there is anything we can do to move this PR forward or to ease the review process.

If you could clone me, that'd be great.

Unfortunately this is a huge PR and I simply have not gotten around to looking at it yet. Between reviewing all other PRs and working on large PRs myself, too, I'm simply stretched thin.
What could help is if you could provide me with a prioritization of PRs from your side, so I can look at them in that order.

Copy link
Copy Markdown
Member

@Schamper Schamper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How you doin'? There's a lot of unnecessary patterns in here (class level type hints for no apparent reason, methods that could easily be inlined or more easily replaced by inheritance, you can take my comments on that in the earlier files as generic comments over the rest as well (it's very slow to review a large PR on GitHub).

Comment thread dissect/database/chromium/localstorage/localstorage.py Outdated
Comment thread dissect/database/chromium/localstorage/localstorage.py Outdated
Comment thread dissect/database/chromium/localstorage/localstorage.py Outdated
Comment thread dissect/database/chromium/localstorage/localstorage.py Outdated
Comment thread dissect/database/chromium/localstorage/localstorage.py Outdated
Comment thread dissect/database/indexeddb/blink.py Outdated
Comment thread dissect/database/indexeddb/blink.py
Comment thread dissect/database/util/protobuf.py Outdated
Comment thread pyproject.toml Outdated
JSCU-CNI and others added 6 commits January 27, 2026 16:32
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
@JSCU-CNI JSCU-CNI requested a review from Schamper January 27, 2026 17:39
@JSCU-CNI JSCU-CNI changed the title Add LevelDB Add LevelDB, IndexedDB, LocalStorage and SessionStorage May 13, 2026
@Schamper
Copy link
Copy Markdown
Member

Schamper commented May 19, 2026

I think ideally we maybe have our own version of the v8 deserialization. Since we mostly care about deserializing and not so much roundtripping, I think we could make a much more simplified version that just maps to native Python types (a little bit similar to how we deserialize NSKeyedArchiver plists).

Since we don't have a dissect.serialize or similar just yet (I don't want to create one before the monorepo), perhaps it could just live in dissect.util.

I probably am drastically oversimplifying this, so maybe you could give me a reality check. v8serialize is at least pure Python, so I'm also fine with just keeping the dependency on it for now, with having our own being a longer term goal.

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.

3 participants