Firefox-Passwords-Decryptor: Extracts and decrypts passwords saved in Firefox
62 points
4 hours ago
| 5 comments
| github.com
| HN
freitzzz
32 minutes ago
[-]
The additional features this tool brings (port enumeration, list usb devices, system info), makes me thing the tool was not designed for good/ethical reasons, but to ease the life of infostealers that are usually distributed via Discord.
reply
reddalo
1 hour ago
[-]
Is it even safe to use browser-integrated password managers? I think they're so much easier to use than external solutions such as KeepassXC, but if it's so easy to decrypt their databases...
reply
sureIy
19 minutes ago
[-]
Safari's absolutely. It uses a OS-wide keychain secured via hardware.
reply
mrweasel
57 minutes ago
[-]
I never found a way to lock the password manager in Firefox with its own password. They probably aren't bad, but they are also way behind on features and general usability, as compared to standalone password managers.

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?

reply
chungy
32 minutes ago
[-]
Check "Use a Primary Password" in preferences.
reply
eesmith
57 minutes ago
[-]
What is your risk model? An attacker who can install cameras in your house to see your PIN/password? An attacker with a blunt object and the clear intent to harm you if you don't unlock your phone? Your spouse who you trust enough to loan your device to look at a cat pic?
reply
reddalo
53 minutes ago
[-]
My threat model is accidentally installing malware that reads the database of my passwords. I trust my KeepassXC database because I use a strong and long password, so even if malware can read my KeepassXC file, it won't be able to extract the passwords. I feel like Firefox is not as safe.
reply
eesmith
41 minutes ago
[-]
So malware which installs a key scanner to read everything you enter is outside of your threat model, as is external surveillance to record what you type.

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.

reply
xvector
51 minutes ago
[-]
Your malware would still need the password for the PBKDF step to decrypt the Firefox database
reply
otabdeveloper4
41 minutes ago
[-]
> risk model

Hah. Don't bother us with your mumbo-jumbo, we're doing computer security here.

reply
eesmith
30 minutes ago
[-]
I will take Kamchatka from Alaska, using my model cannon, my model horsemen and my three model soldiers.
reply
dlenski
2 hours ago
[-]
There are a large number of similar projects out there.

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...

reply
java-man
3 hours ago
[-]
Firefox is using TripleDES??
reply
jackjeff
1 hour ago
[-]
It uses both AES and TripleDES

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...

reply
alexey-salmin
1 hour ago
[-]
I don't know about the particular case of TripleDES+AES but I think in a general case you can't claim that A+B encryption is always at least as strong as B alone. The A part can result in e.g. first bytes of input being the same enabling a crib-type attack.
reply
jackjeff
44 minutes ago
[-]
I'm not defending this choice, and I think you're right in general.

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.

reply
captn3m0
2 hours ago
[-]
The README is surely LLM slop.
reply
dlenski
2 hours ago
[-]
What…?
reply
TheChaplain
1 hour ago
[-]
reply
hulitu
2 hours ago
[-]
> Firefox is using TripleDES??

What's wrong with it ? /s

reply
penguin359
2 hours ago
[-]
I would mostly say that it's just slow and AES is a much more modern and faster (partly due to hardware acceleration built into modern chips) that is already built info Firefox to support TLS anyways. There are some known attacks against 3DES now, but nothing that completely breaks it yet. And, since this is just for local storage, primarily, it shouldn't be as vulnerable as using 3DES for TLS channel encryption.
reply
wtallis
51 minutes ago
[-]
For a password manager, whether a cipher is fast or slow could mean something entirely different than for something that has to encrypt and decrypt large amounts of data. Cycles per byte is probably completely irrelevant here and I'd expect performance to basically be a function of how many cache misses (both data and code) are incurred to decrypt a single password.
reply
N-Krause
2 hours ago
[-]
Thanks, even tho the comment above signaled sarcasm, the explanation was helpful for me, as I really had no idea what 3DES means and why it could be problematic.
reply
Dalewyn
2 hours ago
[-]
I shudder to think that even a simple Google query leading to a Wikipedia article was too much effort here...

https://en.wikipedia.org/wiki/Triple_DES

reply
bbarnett
2 hours ago
[-]
Any "simple" Google query now means pages of nonsense answers, promoted sites, AI "help", before you even get to a cogent result.

Much better to just talk to others than use Google.

reply
echoangle
1 hour ago
[-]
When I google „TripleDES“, the first result is a box showing the Wikipedia article on Triple DES. Click on that and you’re done.
reply
andrepd
1 hour ago
[-]
Agree with the sentiment, but that's a Wikipedia link. Wikipedia is (as of yet) immune to LLM slop
reply
Scoundreller
1 hour ago
[-]
Reddit, got it.

and Google and quora are in cahoots, right?

reply
MaxGripe
53 minutes ago
[-]
At work, we use 1Password, but for personal use, I recommend 0Password https://0password.github.io/ which I made myself :)
reply
maqp
48 minutes ago
[-]
NO ONE should trust a website delivering JS that could do who-knows what the next time they skip reading the code. Like, send the inputs to a third party.

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.

reply
Matumio
29 minutes ago
[-]
Do you read your password manager's code every time it updates? Probably not, because you trust the author's reputation.

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.

reply
DatenF
17 minutes ago
[-]
It's hosted on GitHub Pages so you don't need to check if the code has changed. Just look for any commits. From what I can see, the last one was three months ago
reply
INTPenis
43 minutes ago
[-]
It's a cool idea, all you need to remember is the service and the master password.

But you need to make it easy to run on a local computer to convince the die hards. ;)

reply
bubblesnort
13 minutes ago
[-]
idk why this got downvoted.

You created something cool and it pays tribute to a loved one.

Awesome.

reply