Live data from Hacker News

Bitwarden PINs can be brute-forced

ambiso.github.io

251–260 of 284 posts

Re: Bitwarden PINs can be brute-forced

#251
post #105

Of course the PIN can be brute forced. It feels like reporting "I can walk over the lawn fence". That PIN is probably here to prevent your kids from messing with your vault when you grab your coffee with your computer unlocked. Protecting from an attacker with your laptop locked should be done at the OS level with FDE and secure boot. Protecting from a real attacker with access to your unlocked computer is a bit hope…

> Of course the PIN can be brute forced. It feels like reporting "I can walk over the lawn fence".

This is entirely non-obvious: there's several ways to implement a PIN unlock in a secure way (see e.g. what you mentioned about Signal and other comments about e.g. Windows Hello). Bitwarden chose an insecure one and to not warn about its risk in the clients (unlike some other features, where you get a big modal warning when enabling them; see the end of this comment).

> Protecting from a real attacker with access to your unlocked computer is a bit hopeless (as someone mentioned, they probably can install some key logger and steal the master password and everything else later).

This is a different attack scenario. If I throw away my computer, or you steal it in its powered off state, a keylogger won't help you since I won't be entering my password again.

> Protecting from an attacker with your laptop locked should be done at the OS level with FDE and secure boot.

Definitely, FDE and secure boot would mitigate the attack (if your computer is off). However it's still not enabled by default on most systems and Bitwarden recognizes that since they give you a big modal warning that your encryption key will be stored in plain, if you set the lock option to "Never": https://imgur.com/a/jj9FveF

Re: Bitwarden PINs can be brute-forced

#252

Earlier quoted context omitted.

> Is it safe to rely on a 4 digit PIN? Obviously not, when there are only 10000 possible combinations. You shouldn't need Bitwarden to tell you that though. Most people really don’t know that. It is not obvious to a normal user.

I realize math education in the US sucks but are really suggesting most people can’t figure out that 0 to 9999 is all the possibilities you get from 4 digits?

Well, a person once asked me why they need to use a bank card in the ATM, when it already asks for the PIN.

Re: Bitwarden PINs can be brute-forced

#253
post #89

"Let's now assume that the user enables the PIN unlock and configures Bitwarden so that it doesn't require the master password on restart." If the user has setup Bitwarden so the master password is not required, then the user gets what they asked for, namely a password database secured by a 4 digit PIN. Not clear to me why this is a problem Bitwarden needs to fix.

> the user gets what they asked for, namely a password database secured by a 4 digit PIN.

A 4 digit PIN would be safe if Bitwarden securely enforced an attempt limit on the PIN. There's several options to implement this securely (see e.g. other comments about Windows Hello or use of a TPM).

Re: Bitwarden PINs can be brute-forced

#254
post #105

Of course the PIN can be brute forced. It feels like reporting "I can walk over the lawn fence". That PIN is probably here to prevent your kids from messing with your vault when you grab your coffee with your computer unlocked. Protecting from an attacker with your laptop locked should be done at the OS level with FDE and secure boot. Protecting from a real attacker with access to your unlocked computer is a bit hope…

Any code can be brute forced if you have a century to spare and enough computing to throw at it.

Which is why my bank card is blocked after three failed attempts.

Re: Bitwarden PINs can be brute-forced

#256
post #193

The article and comments don’t really answer the most important question here: Most modern hardware supports access to secure key storage via biometrics or pins that lock after a few attempts. Is the issue that bitwarden fails to use these properly (e.g., by storing a short pin in the touch id enclave), or that the person reporting the bug is using a machine without such an enclave, and enabled pins anyway?

> Is the issue that bitwarden fails to use these properly It's not so easy. Bitwarden runs in a browser on PC's. As far as I know, browsers don't provide a javascript API to the TPM. They probably supply a javascript API to their password store which may even be backed by a TPM (Firefox on Windows is I think), but they also allow you to browse their passwords while the browser is running so I wouldn't be keen on that…

Bitwarden has now a native app on PC. I still use the browser extension but I might switch to the native app, as I reckon from other comments they do support OS security APIs

Re: Bitwarden PINs can be brute-forced

#258
post #249

Earlier quoted context omitted.

Yes, with a keylogger watching you you’re typically pretty f-ed. Though that’s also one of the reasons using a physical FIDO token as a second factor is a good idea, since the keylogger isn’t going to be able to steal your private key off the hardware token, unlike for TOTP. Though that also begs the question, if I can get a keylogger onto your device, why wouldn’t I try to implant something slightly more capable?

> since the keylogger isn’t going to be able to steal your private key off the hardware token, unlike for TOTP How? I mean how can keylogger get the secret from which TOTPs are being generated? And why wouldn't some other malware won't be able to read whatever data hardware token inputs? I'm myself yubikey user and would like to know in what ways it is more secure than TOTP, even in the scenario when my workstation g…

Assuming that they're the standard SHA-1/30sec TOTP and the keylogger is smart enough to store it, at least two 6-digit codes and their approximate time (https://www.unix-ninja.com/p/attacking_google_authenticator).

Re: Bitwarden PINs can be brute-forced

#259

Earlier quoted context omitted.

> Of course the PIN can be brute forced. This is obvious to those that know anything about security, but it is not obvious to the average user. It is Bitwarden's job to keep the user safe within their platform and if they provide a pin option, the average user knows no better than to use it. If Bitwarden does not explain how insecure pins are, then the fault 100% lies with them. Blaming the user is rarely ever an eff…

The user does not need to be aware of the threat model. OPs point was the pin isn’t protecting much at all because it doesn’t really need to. The user isn’t making a risky decision, because if the attacker gets as far as _being able to put the pin in_, the whole thing is toast regardless of guessing the pin or not

Not really: Consider e.g. a stolen laptop (without full-disk encryption or a screen lock).

If Bitwarden could somehow implement the PIN attempt counter in secure hardware or on their server, they could achieve something more resistant against local offline brute force attacks.

A Yubikey could do the trick, theoretically (but unfortunately the FIDO API does not really lend itself to encryption, as it was designed only for authentication).

Re: Bitwarden PINs can be brute-forced

#260

Earlier quoted context omitted.

> Of course the PIN can be brute forced. This is obvious to those that know anything about security, but it is not obvious to the average user. It is Bitwarden's job to keep the user safe within their platform and if they provide a pin option, the average user knows no better than to use it. If Bitwarden does not explain how insecure pins are, then the fault 100% lies with them. Blaming the user is rarely ever an eff…

The remediation is human and pw/pin policy: make sure users pick a good pin and that they're not using it anywhere else.

A PIN is almost by definition a low-entropy secret and is only secure together with some rate-limiting mechanism.

Never (only) encrypt things with a PIN.

Post reply on HN