Live data from Hacker News

Pressing YubiKeys

bert.org

181–190 of 241 posts

Re: Pressing YubiKeys

#181
post #12

This is some cowboy engineering and i love it. totally shooting from the hip, but still finishing up with a nice long-form post. like other comments mentioned this is super impractical but that's not the point. building a robot finger to push a button at the push of a button is a hilarious saturday afternoon project good job bert!

It's one of those projects that lets you flex your problem solving muscles in a low stakes environment. Taking "I wonder if i could..." and running with it

Re: Pressing YubiKeys

#182
post #25

A little off topic: Does anyone know of a way to get the results of a yubikey press into a remote desktop session? I frequently remote desktop into laptops that are in arms reach. If I need to use the yubikey, I have to remove it and plug it into my desktop and press it, since it acts as a local keyboard.

Wouldn't a local keyboard type into a remote desktop session? If a local keyboard can't type into a remote desktop session, the remote desktop session sounds mostly useless.

Re: Pressing YubiKeys

#183

It seems like you don't understand the main advantage of these types of security tokens. Rogue trigger of a security token isn't really an issue when using the recommended U2F standard. U2F uses the domain as part of the challenge-response in U2F so that phishing\spoofing attacks can be defeated.

Yubikeys can perform many functions; the one in the article is an OTP which can be accidentally pasted into Slack.

Yes. But the main insecurity isn't accidental pastes, it's being phished. The company the author of this article works for needs to switch to U2F.

Re: Pressing YubiKeys

#184

Earlier quoted context omitted.

If you've got adversaries doing a sun swapping attack you are in a Rick and Morty episode not the real world. I can't swear Google has never known one my phone numbers in the many, many years I've had an account, though they don't have one recorded now. However I can tell you with certainty I have three WebAuthn authenticators, and no SMS-style 2FA authorised on my Google account now.

Try with a new account. Authenticator app option is not there until you add number. Prompt never succeeds until you add number.

Add a burner phone number, enable OTP, remove phone number. Worked for both Google & Amazon.

Recently was not able to remove phone number anymore from Amazon, effectively forcing to lower security on new accounts.

Re: Pressing YubiKeys

#185
> iTerm2 has a feature called Triggers, which can execute actions based on text matching a regex in your terminal. So we could write a regex to listen for “Yubikey for” and have it run the same script, eliminating the need to press buttons altogether.

Don't do this.

Actually seriously, don't do most of this.

The fact that your computer cannot induce the yubikey to provide its key material (or evidence of the key material) is where it gets "security" from in the first place. As soon as someone can convince your computer to do something there's an increased chance they can get it to do something else.

Some suggestions:

- Wire the F14 key up separately to "the finger" (and not to wifi)

- Use a yubikey simulator[1]. If your sysadmin won't trust you with the key material inside the yubikey so you can use a simulator, they definitely won't trust yourself to emulate the simulator with the finger either.

[1]: https://github.com/sstelfox/yubikey-simulator

Re: Pressing YubiKeys

#186
post #164
post #107

Ways they could solve their problem without significantly compromising security: 1. Plug the yubikey into the monitor 2. Use an extension cord (as they did) 3. Switch back to an otp app (eg Google authenticator or Duo) 4. Credit to conk [1] or agl [2]: extend the conductivity via conductive foil or other material, connect to ground to simulate touch Ways you can improve convenience while reducing security: 1. This! 2…

Security isn’t binary. This mechanism is more secure than no 2FA, because off the shelf malware isn’t gonna prod around your local network and look for a self built finger contraption. Furthermore, if someone does trigger it, the thing will move and you’ll hopefully realise you’re haxx’d.

> Security isn’t binary.

I hate that people say that.

By adding some security (protecting against some threat) to another security (protecting against same threat) you gain no security, after all: 1+1=1 in binary, so security is binary in this way as well.

By protecting the same thing with two different security mechanisms, you have multiplication, and in binary 1×0=0 so security is binary in this way.

And so on.

Security is about identifying threat-actors and devising cost-based challenges that exceed the value to others of compromise. In that way, it is absolutely a binary thing -- you are either secure from those specific threat-actors or you are not.

It's a real problem that without perfect knowledge, you don't actually know if you are secure from those threat-actors: Someone can discover a cool factorisation trick, or your computer might make weird noises when multiplying certain numbers, or it might allow authenticated users faster responses than unauthenticated ones. Threat-modelling in the face of those kinds of thing is nearly impossible, but even against basic stuff (the stuff we already know) it can be really hard. For these reasons and more, weakening some security in what you may perceive as a small way can actually be absolutely catastrophic to the security against the intended threat-model. So don't do that: Start from the other side, decide what you're trying to protect and from whom, and convince yourself that they really can't gain anything with what they've got.

Script kiddies using a ten year old version of metasploit? The finger is probably safe for all the reasons you're thinking, but if they find a way in, someone else is going to strace/gdb/dtruss all the things and find you've got a lot of secrets in RAM - if any of those belong to an even higher-value target, you can bet that is automatically harvested, collected, and shipped back to "home base" for use.

> This mechanism is more secure than no 2FA,

You can't meaningfully say more or less secure without saying who the threat-model is.

For threats I worry about, this is much less secure. I also believe that's true for most yubikey users, including the ones with the technical ability to do something like this.

> the thing will move and you’ll hopefully realise you’re haxx’d.

If the yubikey cannot be triggered by my PC because there isn't a wire connecting the two together, then there is zero risk from a remote attacker who does have access to my PC -- unless you believe the airgap grants you nothing in the first place.

I mean, I hope the airgap means something, but I don't hope that I will always be awake and in front of the finger paying attention to its gyrations and undulations.

Re: Pressing YubiKeys

#187

The one thing I don't understand with Yubikeys: doesn't leaving them plugged in at all times in your computer (which the form factor highly encourages you to do) completely defeat the purpose?

Security keys protect against phishing, in addition to account takeover.

Say you click on a link that looks like Google but it's not. You enter your credentials -> these are now in possession of the attacker. If you have 2FA enabled AND you use a security key, the key digitally signs the hostname of the site you're browsing. This second factor won't be valid on the real google.com site because it was created on the phishing site.

Phishing protection is a core feature unique to security keys, and it's completely independent whether you keep the key in your laptop or you bring it with you.

Re: Pressing YubiKeys

#188
post #177

The one thing I don't understand with Yubikeys: doesn't leaving them plugged in at all times in your computer (which the form factor highly encourages you to do) completely defeat the purpose?

No, you need to press the button. In situations where laptop is not under your control, you can remove it.

[deleted]

Re: Pressing YubiKeys

#189

The one thing I don't understand with Yubikeys: doesn't leaving them plugged in at all times in your computer (which the form factor highly encourages you to do) completely defeat the purpose?

Security keys protect against phishing, in addition to account takeover. Say you click on a link that looks like Google but it's not. You enter your credentials -> these are now in possession of the attacker. If you have 2FA enabled AND you use a security key, the key digitally signs the hostname of the site you're browsing. This second factor won't be valid on the real google.com site because it was created on the p…

I did not know that "detail"; it totally makes sense though, thanks!

Re: Pressing YubiKeys

#190

The one thing I don't understand with Yubikeys: doesn't leaving them plugged in at all times in your computer (which the form factor highly encourages you to do) completely defeat the purpose?

Security keys protect against phishing, in addition to account takeover. Say you click on a link that looks like Google but it's not. You enter your credentials -> these are now in possession of the attacker. If you have 2FA enabled AND you use a security key, the key digitally signs the hostname of the site you're browsing. This second factor won't be valid on the real google.com site because it was created on the p…

> If you have 2FA enabled AND you use a security key, the key digitally signs the hostname of the site you're browsing.

How does this work? Does the browser talk with the key? I thought the key is primarily an input device.

Post reply on HN