dfindexeddb is an experimental Python tool for performing digital forensic analysis of IndexedDB and leveldb files.
Project description
dfIndexeddb
dfindexeddb is an experimental Python tool for performing digital forensic analysis of IndexedDB and LevelDB files.
It parses LevelDB, IndexedDB and JavaScript structures from these files without requiring native libraries. (Note: only a subset of IndexedDB key types and JavaScript types for Safari and Chromium-based browsers are currently supported. Firefox is under development).
The content of IndexedDB files is dependent on what a web application stores locally/offline using the web browser's IndexedDB API. Examples of content might include:
- text from a text/source-code editor application,
- emails and contact information from an e-mail application,
- images and metadata from a photo gallery application
Installation
- [Linux] Install the snappy compression development package
$ sudo apt install libsnappy-dev
- Create a virtual environment and install the package
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install dfindexeddb
Installation from source
- [Linux] Install the snappy compression development package
$ sudo apt install libsnappy-dev
-
Clone or download/unzip the repository to your local machine.
-
Create a virtual environment and install the package
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install .
Usage
Two CLI tools for parsing IndexedDB/LevelDB files are available after installation:
IndexedDB
$ dfindexeddb -h
usage: dfindexeddb [-h] {db,ldb,log} ...
A cli tool for parsing indexeddb files
positional arguments:
{db,ldb,log}
db Parse a directory as indexeddb.
ldb Parse a ldb file as indexeddb.
log Parse a log file as indexeddb.
options:
-h, --help show this help message and exit
Examples:
To parse IndexedDB records from an sqlite file for Safari and output the results as JSON-L, use the following command:
dfindexeddb db -s SOURCE --format safari -o jsonl
To parse IndexedDB records from a LevelDB folder for Chrome/Chromium, using the manifest file to determine recovered records and output as JSON, use the following command:
dfindexeddb db -s SOURCE --format chrome --use_manifest
To parse IndexedDB records from a LevelDB ldb (.ldb) file and output the results as JSON-L, use the following command:
dfindexeddb ldb -s SOURCE -o jsonl
To parse IndexedDB records from a LevelDB log (.log) file and output the results as the Python printable representation, use the following command:
dfindexeddb log -s SOURCE -o repr
To parse a file as a Chrome/Chromium IndexedDB blink value and output the results as JSON:
dfindexeddb blink -s SOURCE
LevelDB
$ dfleveldb -h
usage: dfleveldb [-h] {db,log,ldb,descriptor} ...
A cli tool for parsing leveldb files
positional arguments:
{db,log,ldb,descriptor}
db Parse a directory as leveldb.
log Parse a leveldb log file.
ldb Parse a leveldb table (.ldb) file.
descriptor Parse a leveldb descriptor (MANIFEST) file.
options:
-h, --help show this help message and exit
Examples
To parse records from a LevelDB folder, use the following command:
dfindexeddb db -s SOURCE
To parse blocks / physical records/ write batches / internal key records from a
LevelDB log (.log) file, use the following command, specifying the type (block,
physical_records, etc) via the -t
option. By default, internal key records are parsed:
$ dfleveldb log -s SOURCE [-t {blocks,physical_records,write_batches,parsed_internal_key}]
To parse blocks / records from a LevelDB table (.ldb) file, use the following
command, specifying the type (blocks, records) via the -t
option. By
default, records are parsed:
$ dfleveldb ldb -s SOURCE [-t {blocks,records}]
To parse version edit records from a Descriptor (MANIFEST) file, use the following command:
$ dfleveldb descriptor -s SOURCE [-o {json,jsonl,repr}] [-t {blocks,physical_records,versionedit} | -v]
options:
-h, --help show this help message and exit
-s SOURCE, --source SOURCE
The source leveldb file
-o {json,jsonl,repr}, --output {json,jsonl,repr}
Output format. Default is json
-t {blocks,physical_records,versionedit}, --structure_type {blocks,physical_records,versionedit}
Parses the specified structure. Default is versionedit.
-v, --version_history
Parses the leveldb version history.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dfindexeddb-20240501.tar.gz
.
File metadata
- Download URL: dfindexeddb-20240501.tar.gz
- Upload date:
- Size: 53.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e257d1b2850b5e0689b7041a264e5791bc6ebce2cd2ecb342f14f1241812e33d |
|
MD5 | 566b7cdaa9d5f2124f95a8771dec7ee8 |
|
BLAKE2b-256 | 709ea6d9c64560aa5e946f1a5c44177b28c6e18fbd7aa134ab55bd14668c1aa1 |
File details
Details for the file dfindexeddb-20240501-py3-none-any.whl
.
File metadata
- Download URL: dfindexeddb-20240501-py3-none-any.whl
- Upload date:
- Size: 67.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4278c925084ea2e35c7eac8fea7dad9322be27240e995ef6cca024fb50788c6b |
|
MD5 | 70cb7a352deb4045fffdd2687627d5a8 |
|
BLAKE2b-256 | 51bec801e1d01324c4743f7d8ca0c79b757161cc3324c858a615c8480515720f |