sqlite-records
Parses a SQLite database file and retrieves records from the specified table. Use this command during forensic analysis to directly query data from SQLite-based artifacts such as Chrome browser history or Firefox databases.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | None |
| License usage | Counted |
| Parallel execution | Not supported |
| Distributed execution | Runs on Data Node (mapper) |
Syntax
Options
table=STR- Name of the table to retrieve
Target
FILE_PATH- Path to the SQLite database file to query
Output fields
Output fields are determined dynamically based on the schema of the specified table. Each column defined in the table is assigned as an output field. The id column is placed first, followed by the remaining columns in schema definition order.
Column values are converted based on SQLite serial types as follows:
| SQLite serial type | Converted type |
|---|---|
| NULL (0) | null |
| Integer (1–6, 8, 9) | long |
| BLOB (even >= 12) | binary |
| TEXT (odd >= 13) | string |
Error codes
Parse errors
N/A
Runtime errors
| Error code | Message | Description | Post-processing |
|---|---|---|---|
| - | IOException | The SQLite database file cannot be read. | Aborts query execution. |
Description
The sqlite-records command directly parses the specified SQLite database file at the binary level to retrieve table records. Because it does not rely on the SQLite library, it can query locked database files as well.
Specify the table name using the table option. To check the column names and types of a table in advance, use the sqlite-tables command.
Examples
-
Retrieve table records from a SQLite database
sqlite-records table=urls /opt/logpresso/evidence/HistoryRetrieves all records from the
urlstable in Chrome'sHistoryfile. -
Filter records by a specific condition
sqlite-records table=visits /opt/logpresso/evidence/History | search visit_duration > 0Filters records from the
visitstable wherevisit_durationis greater than 0. -
Limit the number of records
sqlite-records table=moz_places /opt/logpresso/evidence/places.sqlite | limit 100Retrieves up to 100 records from the
moz_placestable in Firefox'splaces.sqlitefile.