Braiam said that Firefox stores the password data for login websites in ~/.mozilla/firefox/key3.db
and ~/.mozilla/firefox/signons.sqlite
files. These files can be read with some sqlite editor.
I try to query for my username and password of a website (e.g. https://sourceforge.net/account/login.php) from the Firefox's database. I can't do it through Firefox, because my Firefox GUI is not working, and I am fairly new to and also interested in learning using databases to do the job.
- what are the different roles of
key3.db
andsignons.sqlite
? -
I searched on the internet, and is it correct that I should use
sqlite3
to open a database?$ sqlite3 key3.db SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .tables Error: file is encrypted or is not a database
I guess the reason of failure is that, in Firefox, I set up a master
keyword to access the passwords it stores. How should I proceed to query the password of a given website?My OS is Ubuntu, here is the
file type ofkey3.db
:$ file key3.db key3.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)
-
What shall I read and learn in order to query the password from a given
website name?Will reading http://www.sqlite.org/cli.html help?
To garethTheRed:
I tried your command. Not return anything however. The output is abysmal:
$ sqlite3 signons.sqlite
SQLite version 3.7.9 2011-11-01 00:52:41
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
moz_deleted_logins moz_disabledHosts moz_logins
sqlite> select * from moz_logins;
...
55|https://sourceforge.net||https://sourceforge.net|form_loginname|form_pw|MDIEEPgAAAAAAAAAAAAAAAAAAAEwF\AYIKoZIhvcNAwcECCPrVdOzWamBBAjPs0DI8FrUnQ==|MDoEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECCnZved1LRQMBBBV\DtXpOvAp0TQHibFeX3NL|{16e782de-4c65-426f-81dc-ee0361816262}|1|1327675445094|1403706275829|1327675445094|\4
...
Does Firefox encrypt passwords regardless of if there is a master key? If yes, can we decrypte them in command line (my firefox CLI may still work)?
Alternatively, is it possible that Chrome browser can read and import the passwords stored by Firefox?
Best Answer
Some guy seem to have glued all the necessary code together here:
See the related discussion in the mozilla fora.