Der Yubikey im Praxiseinsatz (2024)

Seit ein paar Jahren besitze ich einen Yubikey Neo - einen USB- und NFC-kompatiblen Hardware Security Token, den ich in Kombination mit regulären Passwörtern zum Schutz von Zugangsdaten und Account einsetze. In einem früheren Beitrag habe ich bereits die verschiedenen Betriebsmodi des Yubikeys beschrieben. In diesem Beitrag will ich einen kleinen Einblick geben, wie ich mit dem Yubikey arbeite und wofür ich ihn einsetze.

Einsatzzwecke

In der letzten Jahren haben sich die Einsatzmöglichkeiten für Yubikeys im speziellen und Hardwaretokens im allgemeinen etwas verbessert. Während Zwei-Faktor-Authentifizierung vor allem im Consumer-Bereich so gut wie gar nicht zu finden war, kann man sich bei größeren Softwarekonzernen und einigen Security-Tools mittlerweile sicher anmelden.

Absicherung Logins

Mit U2F

U2F ist vor allem für das Web entwickelt. Die Verbreitung lässt zwar immer noch zu Wünschen übrig (man sagt, die Implementierung sei wohl recht komplex), aber ein paar der von mir genutzten Services unterstützen das moderne, einfach zu nutzende Verfahren bereits. Dazu gehört neben GitHub und Google auch die frei verfügbare Git-Hostingsoftware “Gitea”.

Mit TOTP

Der von mir am meisten eingesetzte Mechanismus ist TOTP: Einfach deshalb, weil er von viel mehr Diensten unterstützt wird, als das neuere U2F. Zu den von mir genutzten Anbietern gehören core-networks.de, Hetzner Online, bitcoin.de, servercow.de und Mastodon. Auch Google und GitHub habe ich zusätzlich über TOTP abgesichert - wer weiß schon, wann ich das nächste mal vor einem Rechner sitze, der kein U2F versteht … ;-)

Absicherung Passwortdatenbank

Die Absicherung meines Passwortsafes geschieht über den Challenge-Response-Mechanismus des Yubikeys. Über USB oder NFC wird eine sog. “Challenge” an den Key übertragen. Der Key trägt ein Secret in sich, und ist damit in der Lage, die Challenge zu beantworten und das korrekte Ergebnis zurückzusenden.

Unter Linux nutze ich den Yubikey-kompatiblen Passwortmanager KeePassXC. Er ist eine Neuimplementierung von KeePass und verfügt im Vergleich zu seinem Vorgänger über einige erweiterte Funktionen. Meine vorherige KeePassX-Datenbank konnte ich in KeePassXC öffnen und einen neuen Masterschlüssel festlegen: Eine Kombination aus Passwort und Challenge-Reponse-Verfahren mit dem Yubikey. Die Einrichtung ist selberklärend.

Damit ich auch unterwegs Zugriff auf wichtige Zugangsdaten habe, nutze ich auf meinem Android-Smartphone die App “Keepass2Android. Sie unterstützt ebenfalls das Challenge-Reponse-Verfahren. In der neuesten Beta-Version (Stand Juli 2018) auch über NFC mit dem Yubikey. Erwähnenswert bzgl. der Einrichtung ist, dass die Schlüsselableitung mittels Argon2-Verfahren durchgeführt werden muss. Die Einstellung kann in der KeePassXC-Anwendung in den Verschlüsselungseinstellungen der Datenbank festgelegt werden. Wird ein anderer Algorithmus genutzt, ist KeePass2Android nicht in der Lage, mittels Yubikey/NFC zu entschlüsseln.

Der Yubikey im Praxiseinsatz (1)

Ein Backup des Yubikeys erstellen

Da eine der wichtigsten Eingenschaften eines Hardware Security Tokens ist, nicht kopierbar zu sein, muss man ein paar Umwege gehen, wenn man bei Verlust ein weiteres Exemplar in der Hinterhand haben will.

Bei U2F und TOTP gilt: Man registriert sich einfach mit beiden Keys. Bei U2f ist das einfacher, weil man beim Anbieter einfach einen weiteren Key hinterlegt. Bei TOTP meistens etwas aufwändiger, denn normalerweise wird hier nur ein Secret einmalig herausgegeben und die Einrichtung eines weiteren Geräts wird nicht unterstützt. Das bedeutet, man muss wie folgt vorgehen:

  1. Bei dem betreffenden Service einloggen.
  2. Evtl. vorhandene 2-Faktor-Authentifizierung deaktivieren
  3. 2FA neu einrichten: Secret als Zeichenkette oder QR-Code auf beiden Keys simultan einrichten

Was die Challenge-Response-Funktion angeht, ist der Prozess je nach aktueller Nutzung mehr oder weniger aufwendig. Die schlechte Nachricht vorweg: Wer bereits einen Yubikey mit Challenge Response im Einsatz hat, muss den Mechanismus zuvor überall deaktivieren - zumindest gilt das für die meisten Anwendungen, da sie nur einen Key unterstützen.

Damit man beide Keys nutzen kann, muss das interne Secret bei beiden Keys nämlich dasselbe sein. Nun hat man natürlich nicht die Möglichkeit, einfach zu kopieren - das heißt: Wir müssen ein neues Secret für beide Schlüssel setzen. (Und deshalb kann man sich mit einem evtl. vorher genutzten Key nicht mehr einloggen!)

Das Yubikey Personalization Tool unterstützt die Einrichtung ein und desselben Secrets auf mehreren Schlüsseln. Eine Anleitung gibt es hier: https://www.yubico.com/wp-content/uploads/2016/06/YubiKey_Identical_Credentials_ConfigGuide_en.pdf

Sobald auf beiden Keys dasselbe Secret vorhanden ist, kann einer der Keys wieder mit allen Anwendungen verknüpft werden, die mit dem Challenge-Response-Verfahren arbeiten. Der zweite Key wird danach ebenso funktionieren.

Fazit

Mit meinem Yubikey kann ich mittlerweile meine wichtigsten Zugänge absichern. Vor allem die Kombination von KeePassXC und dem Yubikey im Challenge-Response-Modus gefällt mir gut. Ich würde mir jedoch noch mehr Support für die U2F-Anmeldung im Web wünschen. Alle modernen Browser sind bereits kompatibel - jetzt liegt es nur noch an den Web Services, U2F in ihren Loginsystem zu verankern.

Der Yubikey im Praxiseinsatz (2024)

FAQs

Does YubiKey really work? ›

Proven security at scale

YubiKeys are trusted by the world's largest companies and users have experienced 0 account takeovers.

What is the default passphrase for YubiKey? ›

The default PIN code is 123456. The default PUK code is 12345678. The default management key (9B) on YubiKeys with firmware up to version 5.7 is a 3DES key with value 010203040506070801020304050607080102030405060708.

How do I get my YubiKey secret key? ›

Sign in to your account and find the two-factor (or two-step) authentication settings in the security settings. Select the option to use an authenticator program or Google authenticator and the server will generate a secret key and a QR code.

Is one YubiKey enough? ›

If you choose to stay with one YubiKey, that's fine, but be careful not to lose or misplace it. If you do, you may be without access to your accounts for a while.

How long will a YubiKey last? ›

A Yubikey will essentially last forever, and if you stay clear of the insanity that is Passkeys its Webauthn element can support an infinite number of websites.

Is YubiKey worth it in 2024? ›

Best Overall Security Key

The Yubikey Security Key C NFC is our top pick for most people. It features excellent build quality, and its USB-C connector means it works on just about every new device. It also has NFC support, which lets it authenticate on mobile devices that lack a USB port.

How many passkeys can a YubiKey hold? ›

The YubiKey works as a passkey generator that can create both the public and private keys necessary to begin passkey login with accounts, apps, services and vendors that enable it – a YubiKey serves as a repository for up to 100 unique passkeys.

Can I use YubiKey for all my passwords? ›

The YubiKey works with Password Safe to protect your passwords using two-factor authentication (2FA). Both a master password and a YubiKey are needed to enable access to your Password Safe file, which contains the usernames, websites, passwords and other information for all of your online accounts.

Should I set a PIN on my YubiKey? ›

It is recommended that you set up a PIN before you add services to your YubiKey. The best way to do this is to use YubiKey Manager.

What happens if someone steals your YubiKey? ›

So, what happens if you lose your YubiKey? In that case, you can still use your Authenticator app (phew!). While you can't create a backup YubiKey, you can always contact Yubico to get a replacement key.

Can YubiKeys be cloned? ›

Hackers can clone YubiKeys by exploiting side channel that leaks their private key.

Can you use YubiKey on a phone? ›

However, as the YubiKey does need to be plugged into a mobile device to function, it adds more friction to the user flow - but this can be a positive when using a feature which requires a longer session, such as a PIV smart card. Pros: Supported on all mobile platforms. Ideal for longer authentication sessions.

Can I share a YubiKey with my wife? ›

If you want to use your YubiKey with multiple accounts, you'll need to add each account to the key. To do this, you can use the Yubico Authenticator app. The app allows you to add and remove accounts from your YubiKey, and it also lets you manage your TOTP codes.

Is it safe to keep YubiKey plugged in? ›

Security Hints

If you trust your environment (like at home) you can keep the YubiKey near or even plugged into your computer. In low trust environments (coffee shops, hotel rooms, etc.) keep your YubiKey with you at all times (in a pocket or purse), especially if step away from your computer, even briefly.

Should you carry your YubiKey with you? ›

Ideally, you want to keep your key somewhere out of sight and on your person, where it will be secure. You shouldn't need to worry about x-rays or security checks for your YubiKey either, and there is no concern about getting them wet (as YubiKeys are not powered).

What happens if someone steals my YubiKey? ›

So, what happens if you lose your YubiKey? In that case, you can still use your Authenticator app (phew!). While you can't create a backup YubiKey, you can always contact Yubico to get a replacement key.

What are the risks of YubiKey? ›

The theft scenario is indeed disturbing because if the thief learns your PIN and then steals the Yubikey, you're facing severe problems: the thief can easily check all your passkeys, get access to your accounts, remove all the passkeys and register only the stolen Yubikey, change the password, remove any other 2FA ...

How many passwords can a YubiKey hold? ›

OATH-TOTP - the YubiKey 5's OATH application can hold up to 32 OATH-TOTP credentials (AKA authenticator codes). OTP - this application can hold two credentials, can be registered with an unlimited number of services. The OTP application comes with: Yubico OTP.

Is YubiKey more secure than password? ›

Passwordless authentication: A YubiKey allows users to securely log in to their online accounts without the need for a password, relying solely on the physical YubiKey. This not only simplifies the login process but also significantly reduces the risk of password-related breaches.

References

Top Articles
Latest Posts
Article information

Author: Carlyn Walter

Last Updated:

Views: 6270

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Carlyn Walter

Birthday: 1996-01-03

Address: Suite 452 40815 Denyse Extensions, Sengermouth, OR 42374

Phone: +8501809515404

Job: Manufacturing Technician

Hobby: Table tennis, Archery, Vacation, Metal detecting, Yo-yoing, Crocheting, Creative writing

Introduction: My name is Carlyn Walter, I am a lively, glamorous, healthy, clean, powerful, calm, combative person who loves writing and wants to share my knowledge and understanding with you.