Decrypting Help

initroot

Senior Member
Joined
Jul 30, 2011
Messages
898
Reaction score
45
Location
Cape Town
I would like to look into if it's possible to decrypt a game's database so that I can create an editor for it.

Only thing I know is that it's in SQLite. Anyone whom I can PM that have some knowledge on this that might be able to help me.
Any links I can use to learn more about detecting the type of decryption?
I have googled but only came up with some standard stuff, am I wasting my time?
 
I would like to look into if it's possible to decrypt a game's database so that I can create an editor for it.

Only thing I know is that it's in SQLite. Anyone whom I can PM that have some knowledge on this that might be able to help me.
Any links I can use to learn more about detecting the type of decryption?
I have googled but only came up with some standard stuff, am I wasting my time?

You first need to find out what encryption method was used and then more than likely get the key to decrypt it.... Not an easy task, but not impossible :D
 
It's quite likely that you would have to do a brute force attack for the key and that can take a very long time.

Even at 10.51 x 10[SUP]12[/SUP] guesses a second 128 bit AES will take 1.02 x 10[SUP]18[/SUP] years to crack.
 
Last edited:
if you can find the file, you can query it with using an addon in firefox.

https://addons.mozilla.org/en-us/firefox/addon/sqlite-manager/


Then you can see the tables etc using


http://www.sqlite.org/faq.html#q7

7) How do I list all tables/indices contained in an SQLite database


If you are running the sqlite3 command-line access program you can type ".tables" to get a list of all tables. Or you can type ".schema" to see the complete database schema including all tables and indices. Either of these commands can be followed by a LIKE pattern that will restrict the tables that are displayed.

From within a C/C++ program (or a script using Tcl/Ruby/Perl/Python bindings) you can get access to table and index names by doing a SELECT on a special table named "SQLITE_MASTER". Every SQLite database has an SQLITE_MASTER table that defines the schema for the database. The SQLITE_MASTER table looks like this:

CREATE TABLE sqlite_master (
type TEXT,
name TEXT,
tbl_name TEXT,
rootpage INTEGER,
sql TEXT
);

For tables, the type field will always be 'table' and the name field will be the name of the table. So to get a list of all tables in the database, use the following SELECT command:

SELECT name FROM sqlite_master
WHERE type='table'
ORDER BY name;

For indices, type is equal to 'index', name is the name of the index and tbl_name is the name of the table to which the index belongs. For both tables and indices, the sql field is the text of the original CREATE TABLE or CREATE INDEX statement that created the table or index. For automatically created indices (used to implement the PRIMARY KEY or UNIQUE constraints) the sql field is NULL.

The SQLITE_MASTER table is read-only. You cannot change this table using UPDATE, INSERT, or DELETE. The table is automatically updated by CREATE TABLE, CREATE INDEX, DROP TABLE, and DROP INDEX commands.

Temporary tables do not appear in the SQLITE_MASTER table. Temporary tables and their indices and triggers occur in another special table named SQLITE_TEMP_MASTER. SQLITE_TEMP_MASTER works just like SQLITE_MASTER except that it is only visible to the application that created the temporary tables. To get a list of all tables, both permanent and temporary, one can use a command similar to the following:

SELECT name FROM
(SELECT * FROM sqlite_master UNION ALL
SELECT * FROM sqlite_temp_master)
WHERE type='table'
ORDER BY name
 
How certain are you that is encrypted ? It may just be a binary file that needs the right reader ?

+1

I think the database won't be encrypted, because that would mean the game needs to decrypt it and keep it in memory each time just to use it, and when it closes, needs to re-encrypt it again.

There's many Sqlite viewers out there. Now, if the game's DATA is encrypted, that's a different kettle of fish
 
+1

I think the database won't be encrypted, because that would mean the game needs to decrypt it and keep it in memory each time just to use it, and when it closes, needs to re-encrypt it again.

There's many Sqlite viewers out there. Now, if the game's DATA is encrypted, that's a different kettle of fish

Not sure about Sqlite, but SQLCE is easy to keep encrypted, you just pass in the key with the connection string, and the engine does it for you. If Sqlite does the same, then the game doesn't need to worry about any of the encryption.
 
Rugby Challenge 2 :P
I have started working on editor that draws it in hex etc.
Would have been nicer if I could just use the sqlite as a database like in version 1.
 
Top
Sign up to the MyBroadband newsletter
X