101 points · by ekianjo · 8y ago · 71 comments
Mozilla has known for a very long time that the master password system isn't very effective. Even a decade ago, I remember them recommending not using it.
Even in work contexts, “hey can I use your computer to print something? Mine is frozen” is very common.
There was a similar discussion on the chromium tracker when they started storing passwords. I believe Chrome now use OS services (DPAPI on Windows and Keychain on MacOS) to protect passwords.
at that point they can install a rootkit and bypass all your fancy DPAPI/keychain protections.
[1] before you say "but I got password on my sudo!", there's nothing preventing someone from aliasing sudo to
sudo bash -c "/tmp/evil.sh; $*"I agree a text file is 'secure' enough for you but a lot of password systems also hide the password in the UI which is a pro inho (I use KeePass).
A file in a place not immediately obvious to a casual browser without obvious references to what it is seems broadly fine to me. (I don't bother, Instead just re-use passwords because I'm a horrible person)
If this is the case, I’d consider it to be useful because in general I don’t trust apps as a rule.
A decent distribution nowadays sets /proc/sys/kernel/yama/ptrace_scope to disallow any process to spy on other processes.
ptrace_scope was apparently introduced in 2011-2012, see https://github.com/torvalds/linux/commits/a2e5790d841658485d...
For more information:
https://www.kernel.org/doc/Documentation/security/Yama.txt
https://en.wikipedia.org/wiki/Ptrace
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... (via https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening... )
A feature that users would be better off not using is a feature that should be removed, IMHO.
There is also case of "someone stole your backup", which is also quote realistic, especially when using third-party storage services.
Most users that I know use the master password system in combination with a very long master password. That should protect against some brute-forcing but everyone should at best not use the master password at all.
I think Mozilla might be better off by removing the internal password manager entirely and instead providing an interface for password managers (and ship a simple one with firefox that doesn't have a password protection, users can then pick a proper password manager on their own)
Users with master password will have to be informed they need to find a new solution.
The difference being that I can still "use" the passwords without this prompt (FF does not allow this) and I'm still able to view the entire PW database, which will show me usernames (but not passwords).
So, in fairness, Chrome has "sort of" implemented this feature (albeit in a laughable insecure way) and quite obviously have left it to rot (2013?!) on the digital vine.
https://dxr.mozilla.org/mozilla-central/source/security/nss/...
It also processes salt||pw; while that's not a problem per se for password hashing, I generally prefer unique encodings when hashing multiple fields, such as len(salt)||salt||len(pw)||pw.
SHA1 (and other cryptographic hash functions) generally already include the length as something that is part of the hash itself, so your “length encoding” is completely redundant in the case of hashing salt|password.
Instead, they could just have added a for loop
Pretty bad indeed, but then again: this is a master password you're setting. The one password to rule them all ought to be strong anyway. If you do that, it's perfectly safe.
"I eventually found the sftkdb_passwordToKey() function that converts a [website] password into an encryption key by means of applying SHA-1 hashing to a string consisting of a random salt and your actual master password."
The problem is that each year definition of "strong password" changes, because of growing performance of CPUs and GPUs.
"Use a password manager" is always a good solution, I know. But well, who will remember the super lengthy password for the password manager? ;)
Luckily, you can change your password.
Also, you could say the same thing for the hashing algorithm. Every year you'd want to up your iteration count or even upgrade algos (e.g. use memory-hardness when scrypt was released).
It works both ways, but overestimating is never a bad idea: if someone hacks you now and cracks it in five years, some passwords may still be in use.
Most (all?) places that discover that 9+ is not good enough for the most valuable credentials, move to 2FA instead.
https://www.eff.org/deeplinks/2016/07/new-wordlists-random-p...
You still definitely have to accept at least four words actually randomly generated (this is important, else the scheme falls apart horribly). Accepting 6 random words is pretty secure IMHO.
UI- and convenience-wise, this is as good as LastPass used to be - and perhaps still is; I dropped them the day they were sold to some nefarious LockMeIn-entity.
I can’t imagine them being too concerned with brute force attacks.
In practice, this only works if you provide the password manager that will be chosen once and for all.
zaarn's suggestion "providing an interface for password managers" is an interesting alternative.
And I haven't looked but I imagine changing the encryption algo isn't a huge task, I wasn't suggesting that a non-Mozilla worker implement something huge like zaarn's suggestion, which fwiw I think is awesome as I don't use FF built-in password manager and find it just gets in the way.