Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sqlite db security

Im building an app which uses Sqlite DB. Users can enter their information into the db and retrieve them. However, I want them to be able to backup the sqlite db. What I did was putting the sqlite db in the documents folder, so they could retrieve it out using iTunes. For example if the ipad is faulty, i want them to be able to transfer the sqlite db to another ipad.

The problem now is, I dont want them to know the information inside the db, should say the db structure. So how can I build a db that is able to read by my application only? and when they use sqlite browser to open, they wont be able to see anything. I'm looking for something simple. Possible to have the db to prompt a password before opening it?

like image 722
user774150 Avatar asked Jun 15 '12 03:06

user774150


People also ask

Is SQLite db secure?

SQLite engine do not have built-in security to protect databases, rather, it relies on its environment such as the operating system to provide security for database content. While Android provides security mechanisms for SQLite databases, it has been shown to be inadequate.

How do I protect SQLite database?

You can password protect a SQLite3 DB. Before doing any operations, set the password as follows. conn = new SQLiteConnection("Data Source=MyDatabase. sqlite;Version=3;Password=password;"); conn.

Can SQLite be hacked?

Most CVEs written about SQLite assume that the attacker is able to run arbitrary SQL scripts in SQLite. In most applications, this means that there must first be an SQL Injection vulnerability that allows the attacker to inject the malicious SQL.

What are the pros and cons of SQLite?

One of the pros in our SQLite pros and cons list is that it's serverless, boosting speed and lowering complexity. However, it also means that the database is confined to the machine it's stored on only. It doesn't allow for remote work on another PC, for instance.


1 Answers

Here is the link to your answer, SQLCipher is the best thing, which will encrypt the whole database and if any one get the database from the iOS device, any how , still it will prompt for a password otherwise is will not allow user to see the same. even with Command prompt the user will not be able to see the database.

Hope this will be usefull....

like image 113
V.V Avatar answered Oct 02 '22 18:10

V.V