All Projects → mbrown1413 → SqliteFind

mbrown1413 / SqliteFind

Licence: GPL-3.0 License
A Volatility plugin for finding sqlite database rows

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to SqliteFind

JJMumbleBot
A plugin-based All-In-One mumble bot solution in python 3.7+ with extensive features and support for custom plugins.
Stars: ✭ 40 (+90.48%)
Mutual labels:  sqlite3
selekt
A Kotlin and Android wrapper over SQLCipher, providing 256-bit AES encryption of database files.
Stars: ✭ 26 (+23.81%)
Mutual labels:  sqlite3
sic
link aggregator community organised by tags (with no javascript)
Stars: ✭ 82 (+290.48%)
Mutual labels:  sqlite3
flaskbooks
A very light social network & RESTful API for sharing books using flask!
Stars: ✭ 19 (-9.52%)
Mutual labels:  sqlite3
RepostCheckerBot
Bot for checking reposts on reddit
Stars: ✭ 36 (+71.43%)
Mutual labels:  sqlite3
factual-rules-generator
Factual-rules-generator is an open source project which aims to generate YARA rules about installed software from a machine.
Stars: ✭ 62 (+195.24%)
Mutual labels:  computer-forensics
grafana-sqlite-datasource
Grafana Plugin to enable SQLite as a Datasource
Stars: ✭ 57 (+171.43%)
Mutual labels:  sqlite3
PyQt4 locadora
PyQt4 - Locadora de Veículos
Stars: ✭ 24 (+14.29%)
Mutual labels:  sqlite3
python-sqlite3-backup
Sqlite3 online API CPython implementation module
Stars: ✭ 44 (+109.52%)
Mutual labels:  sqlite3
cmu15-445
💾 CMU 15-445/645: Intro to Database Systems (Fall 2017). A course on the design and implementation of database management systems.
Stars: ✭ 115 (+447.62%)
Mutual labels:  sqlite3
subtitles-view
基于javaFX的简单字幕处理桌面程序,集成在线翻译及语音转换
Stars: ✭ 368 (+1652.38%)
Mutual labels:  sqlite3
litelib
A cool little wrapper in Entity Framework style for SQLite based on Dapper
Stars: ✭ 63 (+200%)
Mutual labels:  sqlite3
sqlite
Golang library to build sqlite extensions
Stars: ✭ 36 (+71.43%)
Mutual labels:  sqlite3
react-native-quick-sqlite
Fast SQLite for react-native.
Stars: ✭ 239 (+1038.1%)
Mutual labels:  sqlite3
lighthouse
Easy clojure relational database queries, migrations and connection pooling
Stars: ✭ 19 (-9.52%)
Mutual labels:  sqlite3
HashExploit
HashExpoit is Great Tool For Cracking Hash
Stars: ✭ 17 (-19.05%)
Mutual labels:  sqlite3
PokeChat
UNIX compatible, Discord and Telegram inspired, Pokémon-themed instant messaging service.
Stars: ✭ 11 (-47.62%)
Mutual labels:  sqlite3
mksqlite
A MATLAB Mex-DLL to access SQLite databases
Stars: ✭ 25 (+19.05%)
Mutual labels:  sqlite3
ahobsu-node-backend
🌈 MOTI ! Make Own True Identity ⭐️ 유니큐와 유초코파이 노드로 탈주하다😎
Stars: ✭ 16 (-23.81%)
Mutual labels:  sqlite3
sqlite zstd vfs
SQLite3 extension for read/write storage compression with Zstandard
Stars: ✭ 42 (+100%)
Mutual labels:  sqlite3

SqliteFind is a Volatility plugin for finding sqlite database rows. It can automatically find database schemas in sqlite_master tables, and recover database rows from memory.

Installing

"sqlitefind.py" must be in the plugin path and "sqlitetools.py" must be importable. You should either add this directory to your volatility plugin path, or add a link to these files inside the volatility plugin folder.

Requires the YARA Python API. Try installing the pip package "yara-python". Running "import yara" should work in the Python shell.

Basic Usage

Find tables:

$ volatility -f <memory file> sqlitefindtables

Recover table rows:

$ volatility -f <memory file> sqlitefind -t <table name>

For a guided tour, see the Tutorial.

See below for the common options, or use --help for a complete list of options.

sqlitefindtables Command

Searches for an sqlite_master table and shows the schemas found in them.

$ volatility -f <memory file> sqlitefindtables

Use -R/--raw-sql to output the schema in raw SQL.

sqlitefind Command

Searches for database rows in memory, given the table schema. There are a few ways to specify the schema. You can specify the table name, in which case the schema matching the table name will be searched for in an sqlite_master table:

$ volatility -f <memory file> sqlitefind -t <table name>

Alternatively, you can specify the table schema manually:

$ volatility -f <memory file> sqlitefind 
             -c "id:int,null; place_name:string; visited:bool"

Schema strings are output from sqlitefindtables, so you can just copy from there and modify if needed. Each column, separated by a semicolon, is a comma separated list of types. If a column starts with name:, then name is used as the column name. You can use the following types:

  • ? - Specifies unknown, could be any type.
  • bool - Assumes schema format 4 or higher is used. If older schema, use "int8".
  • null - Fields cannot be NULL by default, don't forget to add this if needed.
  • notnull - Negates a previous "null".
  • int
  • int<n bits> - <n bits> must be one of 8, 16, 24, 32, 48, 64
  • float
  • string / blob
  • timestamp - Same as int64.
  • <serial type> - A serial type number as defined by the Sqlite file format.

One thing to notice is that NULL is not allowed by default. Make sure to add null to your type list if it is a possible value.

Output Format

You can include different values in the output using the "-O" option, which is a comma separated list of:

  • values - A field for each sqlite column.
  • all_values - One field that is a list of every sqlite column.
  • address - Address the sqlite row was found in memory.
  • all_types - A list of types for each column in this row. Each type will be an integer serial type.

For example, to show the memory address of the row followed by the values:

$ volatility -f <memory file> sqlitefind \
             -c "int,null; string; bool" \
             -O "address,all_values"

CSV output is also supported, using "--output=csv":

$ volatility -f <memory file> sqlitefind \
             -c "id:int,null; field1:string; field2:bool" \
             -O "address,values" \
             --output=csv --output-file=data.csv

Limitations

Needle Size - Based on the table schema, we may not be able to find a suitable sequence of bytes to search for. The smaller the needle size, the slower the search will take.

Large Records - If a record does not fit in one B-Tree cell, it will be either missed or corrupted. This is because the rows are searched without using any database header information. If a row is large enough to be split between multiple pages, we can only find the data from the first page. After that, we will either read garbage data, or encounter an error and assume that it's not a real row.

False positives - There are a lot of checks to make the data parsed is actually a row, but especially when there are not many columns, false positives can be found. Usually false positives are easy to recognize by hand. They typically contain many NULL values (None) and strings will contain nonsensical data.

About

Written by Michael Brown as a project for the Computer Forensics class taught by Fabian Monrose at the University of North Carolina Chapel Hill. Feel free to contact me at [email protected], or start an issue on GitHub.

The idea of searching for sqlite database rows in memory is based on Dave Lassalle's (@superponible) firefox volatility plugins, which can find firefox and chromium data in memory. I wanted to generalize the idea so no code would need to be updated when a schema changes, and any sqlite database could be recovered.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].