I implemented login credential extraction for both Chrom* and FF-based browsers in the somewhat shambolic but generally-useful `browser_cookie3` Python module last year:
https://github.com/borisbabic/browser_cookie3/compare/master...
and Google and quora are in cahoots, right?
If you glance at the code there's a single "key encryption key" in the whole SQLITE file (in the 'metadata' table). That key is decrypted using AES with the PBKDF2 derived secret.
Then each password is in turn encrypted using TripleDES. The "data encryption key" for each these records is in turn encrypted using the aforementioned "key encryption key".
My suspicion is that the TripleDES format must be really old, and when they migrated the crypto layer to use AES they just re-encrypted the top layer (the "key encryption key" later) to use AES. It's much faster (and safer) to just re-encrypt all the TripleDES keys with the new AES than go and mess with "all" the records in the database. It's inelegant and lazy but you effectively get "AES level" of security without having to do all the work, so to speak…
https://github.com/Sohimaster/Firefox-Passwords-Decryptor/bl...
If you have passwords that are used outside the browser, putting them into the browsers password manager, getting them out feels a little cumbersome.
Related to the tool: Why not just click the export button in Firefox?
Please delete this project and your comment.
If you want to be helpful, write native code that user can read, compile, and install, and persistently use without risk of backdoor-out-of-the blue.
In this case, the only thing encrypted with TripleDES is the password itself, so the practicality of a crib or other known plaintext attacks is debatable in my opinion.
If you use the same (or similar) password everywhere, then you have bigger worries than Firefox use of TripleDES. Password stuffing based with leaks from poorly hashed password DB (cough facebook cough) is likely the most practical attack vector in this case.
If all your passwords are like q@qrG#Z4ARYm^qjeTEMN2Kh45v^p7L# then crib like attacks are impractical.
There are other weird/debatable choices in the Firefox encryption layer:
- Why bother with CBC? Things like AES-GCM or other authenticated* encryption mode would be nicer. Not sure it's a flaw here (google the cryptographic doom principle of Moxie Marlinspike)
- Why not wrap the encryption keys with some kind of "key wrap" mode instead. There are such things as AES-KV for instance.
- Why do the weird PBDKF2 derivation here? It's not based on a password the player enters, so there's nothing to "strengthen"? Seems oddly unnecessary (or I don't understand and there's a password somewhere).
- If there's a password then PBKDF2 is really really shit compared to scrypt or even better one the variant of argon OWASP said you should use.
Hah. Don't bother us with your mumbo-jumbo, we're doing computer security here.
Choose a password manager which you like. I like having a paper book with a dumb-ass encryption scheme, because my threat model is that I am not going to worry about physical attacks, and servers will detect attempts to brute-force the dumb-ass scheme by adding delays after the first few failures.
I use Firefox's manager for my Mastodon accounts, because no one cares for my 10 followers, and the instance manager can resolve things if needed.
I wouldn't trust this page with my passwords either, but not because of the reasons that you mention. I haven't checked, but maybe it is simple enough to read the code in its entirety and then self-host? If so, nothing wrong with that.
You created something cool and it pays tribute to a loved one.
Awesome.
You're posture is assuming that if it doesn't matter to you, then it doesn't matter at all, and that simply is not true.
I'd love to see someone "hack" his book, it would be quite the impressive hack.
I actually read up on it quite a bit afterwards.
Feels very unwarranted to just assume laziness into a simple thank you for information spreading.
And of course, the external tool can have plenty of exploitable leaks unrelated to whether or not it’s integrated to some browser.
If the goal is to have better security, no method of using password alone will bring significant improvement to an authentication system, no matter how great the password manager it’s used with.
You can set a "primary password" for firefox's password manager, meaning that you first have to enter a password before you can access the stored passwords. That should provide equivalent security to using KeepassXC.
I have five passwords in my Firefox manager. (More if I include the ones which are no longer valid, like a few ftp passwords, and passwords to routers I no longer use.)
I think I'm safe.
I avoid online services which require identity as much as I can, because yes, any data builds up. Which means, yes, I buy things in stores, not online, I use cash, not credit/debit/e-cash, and I don't use apps.
If you do use online services, apps, etc., then it sure feels like you are assuming that information leak doesn't matter to you, so it doesn't matter at all.
Do 1password/lastpass extensions not include remote code/resources? Of course they do.
I've been experimenting with Kagi for those reasons (amongst others) and finding it works well. Far from ideal for all as it isn't free after 100 queries, but it seems to be a workable solution to the problem for me for now.
Which is why my password manager has zero integration directly with the browser, or anything else for that matter. There is a tiny little bit of extra legwork caused by this⁰, but IMO it is a good compromise between convenience and easily available attack surface.
----
[0] and it might be susceptible to attacks that manage to listen to the OS message queue & clipboard where a browser integrated method would not be, but once something is that far into your system there isn't much that is going to help you except maybe an orbital nuke.
Say you're building a feature for a password manager to import passwords from firefox. You'd want the the firefox decryption functions to be available as library.
Or say you're building a tool to extract data from broken hard drives, partially recovered filesystems, etc. Again, you'd want to have this available as a library so you can import the functions you need and use them in your own tooling.
Normally you'd expect this package to primarily export a lib with a "cli" subfolder that provides a sample CLI tool that imports the lib.
The fact that this tool requires libusb which is solely needed for the useless list usb devices functionality is extremely sketchy. It makes using this tool legitimately harder and only helps attackers.
If you set a master password, firefox uses that master password instead as input to PBKDF2.