8 ms·
Firefox Master Password System Has Been Poorly Secured for the Past 9 Years
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- lucb1e 9y agoThis sounded like clickbait when reading the first bit (SHA1+iterations isn't that bad, as the SHA1 vuln doesn't affect password hashing), but it turns out the number of iterations is 1. That's not SHA1 "with a low iteration count", that's just plain SHA1. And no salt it seems. 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.
- dzek69 9y ago> The one password to rule them all ought to be pretty strong anyway. 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? ;)
- victor_vhv 9y agoYou can always use XKCD's password methodology ;) https://xkcd.com/936/ https://xkcd.com/936/
- daurnimator 9y agoNot really.... https://boingboing.net/2014/02/25/choosing-a-secure-password.html https://boingboing.net/2014/02/25/choosing-a-secure-password...
- dijit 9y agoI really, strongly, disagree with the core argument of this post. His "solution" is to use shorter passwords. The XKCD method is good if you add separators, padding, etc; as expressed featured on xkpasswd.net I highly recommend generating a password and then adding something unique to it. For instance, a password I might generate would be: $66=mine=BODY=spot=STOP=23$-d1j1t It's memorable enough, and I highly doubt it's easily crackable. Certainly no less than 'tlpw2m'.
- KozmoNau7 9y agoEven just //44$random$WORDS$11// is effectively just as safe, in the real world. Especially if you use gibberish words that aren't in any commonly used dictionary.
- whyever 9y agoThat blog post does not give any convincing argument against XKCD-style passwords. It seems to incorrectly assume they are "security by obscurity".
- danielbarla 9y agoHonestly, I had a good laugh until I saw who wrote that. To be fair, I think Bruce is saying that most people will fail to pick truly random words, which is fair. However, as you point out, it provides no argument against passphrases, aside from referring to them as a "trick". I still don't know how people look at the XKCD explanation (where Randall Munroe actually does a pretty good job of correctly and succinctly detailing the strength of the two password styles [1]), and call it a trick. The only trick is that your mind has an easier time remembering passphrases than it does remembering a similar strength random string. [1] Specifically, Randall already assumes that the cracker knows that the password is a passphrase, and has the 1000-word list it was picked from.
- s_gourichon 9y agoThose pushed into FUD against XKCD password scheme can simply add more words. All arguments in https://www.explainxkcd.com/wiki/index.php/936:_Password_Strength https://www.explainxkcd.com/wiki/index.php/936:_Password_Str... remain, including the ease of remembering. 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.
- josefresco 9y agoSee also: zxcvbn https://lowe.github.io/tryzxcvbn/ https://lowe.github.io/tryzxcvbn/
- mikegerwitz 9y agoYou need to do it properly; the comic is misleading on its own. https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases https://www.eff.org/deeplinks/2016/07/new-wordlists-random-p...
- adrianN 9y agoI don't think the definition of "strong password" has changed much in the last ten years. The hashing schemes for storing passwords have changed, sure, but I think having sixteen or more characters with numbers, capital letters and symbols has been recommended for years now.
- lucb1e 9y agoI have not heard anyone argue for requiring >=10 characters (9 is the highest requirement I've ever seen). 12+ I've heard being said as "if you really want to do it properly" in security reports for clients, but we know that'll hardly ever be followed for anything other than high-security places like sysadmins at a bank. I've never heard anyone say 16+, let alone it being the standard recommendation for years. Most (all?) places that discover that 9+ is not good enough for the most valuable credentials, move to 2FA instead.
- Perseids 9y agoPasswords with 128bit of entropy have always been and will for the foreseeable future be secure with any password hashing algorithm that is not completely broken (i.e. uses a cryptographic hash function and a seed). 28 random alphanumeric characters fulfill the requirement and are reasonably fast to type, e.g. m7wdgdorhvi3jerzyztc2u642at
- lucb1e 9y ago> The problem is that each year definition of "strong password" changes 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.
- pafje 9y agoFrom the article, the password is salted at least: "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."
- dzek69 9y agoThat's nothing new. At least Thunderbird is full of annoying even 10 years old bugs. Some important, some just annoying. I bet there's many more hidden because of security.
- blattimwind 9y agoThis code is actually part of NSS, I wonder whether this affects other applications using the soft token db in a similar capacity. https://dxr.mozilla.org/mozilla-central/source/security/nss/lib/softoken/sftkpwd.c#49 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.
- tatersolid 9y agoIf there are only two fields, and the length of one is fixed (the salt) then the encoding is unique. 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.
- Yoric 9y agoNot sure, but I seem to remember that NSS is also used by Chrome.
- robin_reala 9y agoNot any more: they went to their own fork of OpenSSL called BoringSSL.
- zaarn 9y agoWhile I would generally agree that the master password in Firefox is rather... non-ideal, to use a friendly term, I think the article is blowing it a bit. 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)
- mcintyre1994 9y agoDon't most users just stick with the default though? The shipped password manager going from one with a master password to one without would just mean most users have less security.
- zaarn 9y agoMost users don't use the master password at all so most users will have the same security. Users with master password will have to be informed they need to find a new solution.
- baby 9y agoI'm not sure I see the point here, what is the threat model? I guess it does not include laptop protected by full disk encryption?
- zaarn 9y agoThe threatmodel of the masterpassword is usually a variation of "attacker on your local system".
- yjftsjthsd-h 9y ago...who can keylog your master password? It still makes the attack harder, I grant, but not that much harder.
- raverbashing 9y agoFunny how the solution is always "a new system that's coming very soon" Instead, they could just have added a for loop
- Antwan 9y agoDixit the biggest blackmailer of the Internet (cf acceptable ads).
- epanchin 9y agoI don’t think it’s an unreasonable guess than most people who use a master password in Firefox do so to prevent family/friends sharing their PC from easily discovering their passwords. I can’t imagine them being too concerned with brute force attacks.
- mattcoles 9y agoSince Firefox is open source, instead of just waiting for Mozilla engineers to get around to it, couldn't someone just open a pull request?
- s_gourichon 9y agoSure. Could you just write a patch implementing the solution? I'll then open a pull request submitting your patch, to save you some work. ;-) 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.
- mattcoles 9y agoHaha, it was just the attitude I'm seeing suggests that we're somehow at the behest of Mozilla engineers and we just have to wait, but that's one of the great benefits of open source, we really aren't. 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.
- jcranmer 9y agoMaster passwords have a very narrow threat model that they are actually protecting against: it's protecting against people who have access to the password database (i.e., filesystem access) but not people who have access to ptrace-privileges (i.e., the ability to read the password directly out of process memory). Which pretty much means the only realistic use case is someone stole your laptop, but full-disk encryption is a much more relevant solution. 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.
- QasimK 9y agoCan I clarify the distinction between the two capabilities? Are you saying that if I download and execute e.g. “fake-meme-creator” which turns out to be malware for whatever reason, then it can read the filesystem as any normal process can, but it cannot access ptrace? If this is the case, I’d consider it to be useful because in general I don’t trust apps as a rule.
- jcranmer 9y agoThe way most systems are configured, your fake-meme-creator could access ptrace and the filesystem.
- s_gourichon 9y agoWhat is "most systems"? A few years ago this was true. 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/a2e5790d841658485d642196dbb0927303d6c22f/security/yama/yama_lsm.c https://github.com/torvalds/linux/commits/a2e5790d841658485d... For more information: https://www.kernel.org/doc/Documentation/security/Yama.txt https://www.kernel.org/doc/Documentation/security/Yama.txt https://en.wikipedia.org/wiki/Ptrace https://en.wikipedia.org/wiki/Ptrace https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d514487faf188938a4ee4fb3464eeecfbdcf8eb https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin... (via https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace_Protection https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening... )
- josefresco 9y agoWell to be fair, no other major browser even has a master password feature. I think the master password is good to stop "causal" hacking - by friends, family and/or un-tech savvy thieves.
- ocdtrekkie 9y agoOnly the world's most popular browser also has it. https://www.ghacks.net/2013/12/04/google-chrome-gets-master-password-protection/ https://www.ghacks.net/2013/12/04/google-chrome-gets-master-...
- josefresco 9y agoSort of... 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.
- mikeash 9y agoSafari does, by way of the OS Keychain.
- josefresco 9y agoMust be a feature of MacOS - I don't see it within Safari for Win
- kup0 9y agoIt's interesting how little attention this issue received throughout nine years of time, especially when you see a 5-year gap between updates/comments on the bug thread.
- chengiz 9y agoWell if you dont use a master password, the passwords are available with the Show passwords button. Firefox's saved passwords feature is not meant to protect against theft etc. (This is actually annoying to me, but I cant really flaw the model; people want what they want and the browser needs to provide it).
- Finnucane 9y agoI just _assumed_ that passwords stored in the browser would be vulnerable if someone got physical access to your computer. So never used that feature.
- unhammer 9y agoHuh, first time I've heard of Mozilla Lockbox ( https://www.bleepingcomputer.com/news/software/firefox-to-get-a-better-password-manager/ https://www.bleepingcomputer.com/news/software/firefox-to-ge... / https://mozilla-lockbox.github.io/lockbox-extension/ https://mozilla-lockbox.github.io/lockbox-extension/ ). That's great that they're working on a better alternative to the master password thing; the UI also needed some work (that annoying modal blocking the browser on every restart).
- interfixus 9y agoThank heaven these days we have the KeePassXC browser plugin, finally obviating even the temptation to rely on flimsy internal browser storage. 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.
- sneak 9y agoThe same was true for GnuPG the last time I looked.