r/yubikey • • 20h ago

Help Why doesn't a backup code counteract the security a yubikey gives?

I recently tried setting up a yubikey for the first time and to test it out I tried my twitter account first. One thing that stood out to me was the backup code being both shorter and honestly simpler than most passwords I otherwise use. Doesn't this make the yubikey pointless for just about anything other than man in the middle attacks or phishing? In some ways id think it makes it even less secure purely do to the code being easier to guess than my password?

0 Upvotes

15 comments sorted by

4

u/djasonpenney 20h ago

> shorter and honestly simpler

One might conversely argue that the passwords you’re using are unnecessarily complex. That is a discussion for r/passwords.

> other than man in the middle attacks

For many sites such as Google or Dropbox, you must have a password AS WELL AS passing a 2FA check via the Yubikey. It’s not an either-or. And don’t dismiss the value of deflecting MITM threats.

> even less secure

You’re thinking in absolute terms. The point behind passwords or any other sort of authentication is to force an attacker to use some other means, such as a wrench attack instead.

1

u/Joedirty18 20h ago

"For many sites such as Google or Dropbox, you must have a password AS WELL AS passing a 2FA check via the Yubikey. It’s not an either-or. And don’t dismiss the value of deflecting MITM threats."

This is a lot more reassuring, I hadn't realized you still needed the password, I thought all you needed was the backup code.

1

u/My1xT 6h ago

Well whether you need the password depends on the way the yubikey is used. Classic second factor only methods like u2f or yubiotp only check that someone has the yubikey. With fido2 you get the additional pin check giving you still 2 factors in one go (knowledge and posession)

0

u/ucyd 19h ago

One might conversely argue that the passwords you’re using are unnecessarily complex.

That is only a concern for passwords that are typed in a keyboard.

If the password is properly handed through a password manager, it does not matter if it is a six digit numerical pin or a stringsoup with 128 bits of random entropy. The user action is the same. Authenticate locally via pin/biometrics/fido and autofill.


In practical terms, the user needs to remember ONE very strong passphrase of her password manager, used to set it up and enroll in trusted machines, and maybe 1-10 passwords that he needs to actually type, and, guess what, he needs to change those passwords once in a while because every time you type a password on an untrusted device it is compromised.

All the 400 other passwords the user has go to their password manager stringsoup. Maybe more than one password manager.

1

u/IntelligentMarch6827 19h ago

The password manager is like a MFA proxy. It changes the “what you know” to a “what you have”.

It mitigates some attack scenarios, and creates others. Most notably the stupidity of putting TOTP tokens in password managers.

1

u/ucyd 14h ago

Why is putting a totp token in a password manager a bad idea?

1

u/IntelligentMarch6827 14h ago

You’re consolidating the trust boundary / fault domain.

Instead of having another factor, it’s really like a second password. Because there’s a time element, you’re protected from things like credential stuffing and password compromise. But you’re very exposed to vault theft, password manager software compromise, computer compromise, and authenticator secret extraction.

TOTP on a hardware token addresses a lot of risk, but is still phishing vulnerable.

Yubikey or similar technology is the GOAT right now.

From an assurance standpoint, password + TOTP meet a NIST AAL-2. 

A Yubikey+PIN (or password or biometric) can meet the AAL-3 level. And it’s much cheaper and easier to implement the old standard (PIV)

1

u/ucyd 13h ago

I use fido + pin for the sites that matter.

Throwaway accounts are all in the password manager.

But i never use browser my password manager on untrusted browsers, or the cli password manager (passage) on untrusted machines.

If i ever use a throwaway account in someones else computer, i move that to a /toroll folder in my password manager and change the password, keys, everything later.

My main cons of totp is that it is inconvenient. Its also bad for habit building, you are training users to write stuff in sites and this will lead to phishing.

I would gladly trade it for a webauthn variation with an additional symmetric key handshake.

7

u/kevinds 20h ago

Because they are only used once and they are stored very safely.

2

u/TheDigitalPoint 20h ago

If backup codes are always stored very safely with the website/company, maybe companies should do the same thing with passwords they always lose? 🤷🏻‍♂️

5

u/kevinds 20h ago

No. Most account compromises are from the user.

If the attacker has control of the service, your Yubikey won't matter either.

1

u/ucyd 20h ago

Backup codes serve 2 reasons:

  • a way to log in if you lose your key
  • can only be used for that account, being immune to "password reuse" by the user.

They need to be used with the password too, they arent a single form of login.

I would prefer all backup codes to be a list of 10 eff words achieving 128 bits of entropy, but thats the site concern.


A strong password manager solves pretty much all of the concerns that a yubikey gives you.

A yubikey gives you two things that a password manager does not:

  • You can use it on a potentially compromised computer without it being compromised.
  • It can also be used before the machine is on (luks enroll)

1

u/Joedirty18 20h ago

I hadn't realized they needed both the password and the backup code. I was assuming they worked like Proton's seed phrases which can be used like a password replacement if you get locked out.

1

u/MegamanEXE2013 20h ago

Nope, because the code is only for you, not for everyone, and is a one time use code, so if you use it, that same number won’t work for anyone else

It works like that as to avoid account lockout, and give thanks it does work like that

0

u/Anxious-Sea-1746 20h ago

phishing and domain spoofing are in fairness the 2 biggest security issues for yubikeys to fix

and yeah, no point strong front door if you have crap backdoor (backup code) can you not remove/delete them?