29 ms·
The main problem I have with TOTP (What you're using when you use Google Authenticator) is that the migration path doesn't exist when you get a new phone. This
by Dayshine 7y ago
The main problem I have with TOTP (What you're using when you use Google Authenticator) is that the migration path doesn't exist when you get a new phone. This article complains that users are trying to mitigate this problem, but doesn't seem to give any solutions.
It's entirely plausible you might have 20 accounts set up using TOTP on your phone.
If you now buy a new phone (which users might be doing once every 18-24 months), you need to log into each account and generate a new TOTP key and void the old. That's a couple of hours work.
Now, what if you lose your phone?
You now have to recover 20 accounts, which will take several days, and it's very possible you won't be able to recover at least one.
The common response is "Oh, you should keep one-time keys somewhere". Right, 20 * 10 one-time keys in a single centralised location, and make sure to update them to keep them valid. I thought we were trying to stop people writing their passwords down and storing them next to their computer?
Edit: I'm not sure "treat your TOTP keys like passwords and store them" is setting a very good example. Why are we developing systems that use TOTP if we are encouraging users to treat them like passwords, undoing the vast majority of the security benefit?
- Operyl 7y agoThere are services, like Authy, that let you back them up encrypted. Whether that is appropriate, when considering the security ramifications, is up to you. I, in the past, have printed out the QR codes and put them in a safe as backups.
- danShumway 7y agoJust a heads up, but the last time I checked, Authy did not have secure defaults for 2FA. Authy supports two standards -- the Google Authenticator method, and their own internal standard. Any tokens that go through their internal standard can be recovered on a new phone using just SMS verification, which defeats the entire point. Your encryption password only applies to Google Authenticator tokens. https://twitter.com/DanielShumway/status/1092095395478556674 https://twitter.com/DanielShumway/status/1092095395478556674
- PuffinBlue 7y agoYou are correct. Calling them up one time the person on the phone seemed to be able to 'see' my Cloudflare TOTP code (back when cloudflare had beef with Google about their CEO account getting hacked) but wasn't able to 'see' what my manually added Google Authenticator codes were. So I'm not even sure if Authy's own stuff is secure at all, perhaps someone from there will jump in. But using the Google Authenticator way it's a decent option. Just be sure to treat your backup key as a critical component that needs to be stored securely.
- Operyl 7y agoYou’re correct. I was referring the the standard TOTP here and not their weird Authy variant
- latchkey 7y agoOnly if you setup SMS. Don't do that. Also, turn off the multi-device feature. 2017: https://authy.com/blog/understanding-2fa-the-authy-app-and-sms/ https://authy.com/blog/understanding-2fa-the-authy-app-and-s...
- otterley 7y ago1Password offers a very usable solution to this problem. It can store your TOTP secret alongside your passwords and generate the necessary codes. And the database is synchronized across devices. I imagine other password managers offer similar functionality as well.
- fabian2k 7y agoBut that also means that if your password manager is compromised, 2FA is broken as well. This is certainly more convenient, but also less secure.
- PuffinBlue 7y ago> But that also means that if your password manager is compromised, 2FA is broken as well. You either trust the implementation or you don't. If you think a breach of your password manager will result in the hackers ability to decrypt the vault them you need a new password manager. At some point you have to trust the encryption. Plus, if it's really on your mind you can store the keys in an offline vault with something like Keepass.
- Operyl 7y agoSo, by that definition, every password manager is broken. If your machine is compromised, it's kind of game over there.
- pilsetnieks 7y agoThe point is defense in depth. If you must rely on one app, no matter how secure, it does nothing for depth. The whole point of MFA is to have multiple unrelated authentication steps so that when (not if) one is compromised, you're still protected.
- shawnz 7y agoIt still does provide protection against the attack where someone looks over your shoulder while you type the password, since the TOTP is a rolling code
- Goronmon 7y agoI ran into that issue when my Nexus 5X died to the bootloop issue. It was enough of a pain that I just gave up and use Authy with the remote backup enabled. I've dealt with phones dying/being lost on three separate occasions and recovering the accounts, as you've said, is a huge hassle, and I always end up screwing up at least once resulting in dealing with a round of phone support calls to get access again.
- pvinis 7y agoI use 1password for TOTP too, and this detaches my device from it. Now if I lose my phone, I just need to be able to access the app on my next phone and I'm all set. I know that keeping the password and the TOTP at the same place is kinda not great, but I prefer this "risk" to the "hassle" you mentioned. I'm open to better solutions!
- spsoto 7y ago+1 to this! Moreover, if you are invested into the Apple ecosystem, seamlessly integrates with iOS and comes with a WatchOS app, so you can see your 2FAs in the Watch. A huge convenience when doing TOTP from the phone.
- giobox 7y agoWhile you can use the watch for this, it's kind of a waste of time with the latest version of 1Password. 1Password automatically copies the TOTP to the clipboard for 1 minute after entering a password so you can paste the TOTP in immediately after 1Password has autofilled the initial login screen. Works this way on Windows, iOS and macOS too. If you are using 1Password for TOTP this is synced anyway, making using the phone watch/app on a Mac or iPhone for the TOTP redundant. Just mash ctrl+v/cmd+v!
- tptacek 7y agoAt this point, what is TOTP actually doing for you? If you're using 1Password, it's already generating unguessable passwords for you. Your TOTP codes are literally just an extension of that password.
- dhuramas 7y agoSomething I do to mitigate this problem is take a screenshot of the barcode and store it in keepass - along with the password. So next time I change phones- I just scan the codes back and I am back on track with the TOTP. > I thought we were trying to stop people writing their passwords down and storing them next to their computer? Yes- but I guess it's okay to use password managers anyway. And they make it easy to store screenshots and stuff as attachments.
- PuffinBlue 7y ago> If you now buy a new phone (which users might be doing once every 18-24 months), you need to log into each account and generate a new TOTP key and void the old. That's a couple of hours work. No you don't. You can simply save the original key and enter it again 'manually'. I say 'manually' because it's really copy and paste, so it doesn't take very long to do at all. A few minutes at most. Every single time I've set up TOTP for any account I can simply select to enter the key manually into Authy or Google Authenticator etc rather than scan a QR code, so you always get access to the key. Just save it. You can be paranoid about this and store them in a separate password database if you like. Or you can store it alongside the passwords in a password manager. Then just secure your password manager with TOTP and all you have to 'recover' in a disaster recovery situation is the password manager password (should be memorised) and the TOTP key which you can store under physical offline security if you like.
- Dayshine 7y agoThat behaviour is literally what this article is discussing trying to stop: - Documentation: Warn users not to save their QR codes - Documentation: Tell users to only provision one device - Documentation: Suggest TOTP applications that don’t support unencrypted export Why are we telling people to use 2FA if we then immediately remove the security benefits by telling them to treat it like a password?
- PuffinBlue 7y agoNone of those points above address what I said, nor should they because TOTP should allow for disaster recovery. To allow for disaster recovery the keys used to generate they TOTP codes must be storable somewhere. The article is creating a strawman by suggesting to screenshot QR codes and leave them in the downloads folder. It's perfectly reasonable to save keys in a secure manner. It's also giving borderline bad advice of trying to engineer in an unrecoverable state should a single device fail. That's a poor suggestion to give under any circumstance. Saving TOTP keys into a separate dedicated encrypted vault under physical security is absolutely a valid method of allowing recovery from a device failure.
- slezyr 7y agoWhy use GAuth and not AndOTP and do backups to synced folder? https://play.google.com/store/apps/details?id=org.shadowice.flocke.andotp&hl=en https://play.google.com/store/apps/details?id=org.shadowice....
- matteopey 7y ago+1 on AndOTP. It's also available on f-droid [1] and of course open source [2]. [1]: https://f-droid.org/en/packages/org.shadowice.flocke.andotp/ https://f-droid.org/en/packages/org.shadowice.flocke.andotp/ [2]: https://github.com/andOTP/andOTP https://github.com/andOTP/andOTP
- jwgarber 7y agoI'd even recommend Aegis [1]. Also open source with encrypted backups, but has better crypto than andOTP (both devs talk a bit about it here [2]). Plus, it can do imports from other OTP apps for easy migration. [1] https://github.com/beemdevelopment/Aegis https://github.com/beemdevelopment/Aegis [2] https://old.reddit.com/r/androidapps/comments/b45zrj/dev_aegis_authenticator_secure_two_factor/ej4dfzw/ https://old.reddit.com/r/androidapps/comments/b45zrj/dev_aeg...
- gravitas 7y agoThanks for this, I really like the discourse between these two in the second link. The andOTP author is open about their crypto being sub-optimal and giving the Aegis dev a thumbs up, reason enough for me to give Aegis a shot to replace it. Perhaps they'll join forces going forward and we all win. :)
- acdha 7y agoWhere are you storing those backups? If it's the same place as the passwords, you're weakening the second-factor assumption.
- slezyr 7y agoIn same place as passwords, but with different password and both use different algo for encryption. Well, it's better that nothing.
- Alex3917 7y ago> Why are we developing systems that use TOTP if we are encouraging users to treat them like passwords, undoing the vast majority of the security benefit? Better advice would be "treat them like passwords, but keep them encrypted separately from your password manager." You shouldn't need to restore your TOTP secrets to your phone more than once every couple years, so there isn't any reason for you to have access to them 20 times a day.
- sbr464 7y agoDuo Security has a phone migration/transfer feature now. You need to enable it in your org settings and opt-in.
- swozey 7y agoI just can't believe Duo doesn't have a desktop app of some sort, even if super basic. We use this where I'm at and I have to grab my phone while sitting at my desk to 2fa into things so many times a day. I use Authy for a lot of other stuff and it has a little chrome webapp/extension that'll let me not constantly grab my phone.
- sbr464 7y agoRandom thought, they have apps that mirror your iPhone screen, typically for development or presentations. You potentially could use that as a workaround so your phone just needs to be connected or on the same network etc. See Reflector 3, works with Android/iOS.
- rcconf 7y agoExactly what happened to me. I accidentally left my phone in my pocket and did a load of laundry. My phone was destroyed and could not be recovered.I had iCloud backups, but that didn't do anything for Google authenticator. Now it's been a nightmare to recover my accounts.
- valtism 7y agoSame here. What shocked me was how willingly companies would provide secondary ways to access your account. I feel like if I was trying to gain access to an account I didn't own and was blocked by 2FA, I would just say that I had lost my phone.
- raverbashing 7y agoThis Also, "users will try to provision multiple devices with 2FA" well, you know, some services need a shared login. What then? (And no, in many cases you can't expect the user to use their personal login in some cases) Shared accounts are a thing, and if they need 2fa make it so. And yes, phones get robbed, lost, dropped into toilets, run over, their battery catches fire, they get irrecoverably damaged, a recovery scheme is needed for accounts.
- deleted 7y ago[deleted]
- GuB-42 7y agoSaving TOTP keys is not that bad. Even if they are on a piece of paper next to your computer, it is still good protection against keyloggers. If they are in a safe and that safe doesn't contain the corresponding passwords, that's probably the best you can get. Note that you can use two phones in case you want recovery.
- megaframe 7y agoI keep an old tablet at home with a second copy of all my rotating keys. I know all the sites say not to do this, but if I loose my phone or it breaks or while switching phones I have that tablet around. Not the ideal "cheap" solution, but I had it on hand already and if I hadn't I would have gotten something like a Yubi Key and use that as my second set of keys.
- ploxiln 7y agoDo a lot of places really say not to do this? I think it's fine, and way better than using SMS as your second factor ...
- dorfsmay 7y agoScreencaps of the QR Code inside a good password manager with a different password/key. Yes, the weakeast point is that password/password-manager now.
- munchbunny 7y agoSounds like the TOTP apps need an encrypted import/export capability, kind of like what HSM's have (including Yubikeys and TPM's.) You have one TOTP app generate a key pair, give you the public key, which the other TOTP app uses to generate an encrypted blob out of the stored codes, which only the target TOTP app can decrypt. Since modern phones are getting TPM's, it's even becoming possible to do this without any private keys being accessible to the apps.
- nybble41 7y agoHSMs generally support import, but not export. Keys generated on the device can't be transferred elsewhere, but you can generate the key separately and import it into the HSM while keeping a backup copy. TOTP apps generally work the same way, except the keys are always imported: you can save the secret used to configure the app (screenshot the QR code, or scan it with a regular QR code reader) and use that to set up the same TOTP on a different device. > You have one TOTP app generate a key pair, give you the public key, which the other TOTP app uses to generate an encrypted blob out of the stored codes, which only the target TOTP app can decrypt. Unless you somehow verify that the public key came from a "genuine" TOTP app, that's essentially the same as allowing the keys to be exported in plaintext. (User/attacker generates their own key and presents it to the TOTP app which duly encrypts its secrets in a way the user or attacker can easily decode.)
- decko 7y agoThat's why I have an NFC hardware key. Doesn't matter if I get a new phone then. Of course if you lose the hardware key, you still have the same problem.
- lifeisstillgood 7y agoThis exactly happened to me (I took my iPhone swimming in the Mediterranean). My personal solution is 2 encrypted files - one for my passwords, and one for the keys for the (sadly few) services using TOTP. So losing (ie stealing then decrypting) one is not losing both - ie the password and the TOTP are still mutually exclusive factors. I got back many of my TOTP accounts fairly easily, but boy the amount of trust placed in a SIM Swap is still scary. Compare for example to (my idealised way it should work) of every online account I have using 2 different U2F keys (ie different hardware IDs) to control the account. One I lock away in my bedroom safe and one I carry in my wallet [#]. Lose one and I still hopefully have the other. But a) can you name any service that does that today? b) is my bedroom safe actually safe ? My work TOTP was backed up on cloud - and it still worked! The app had stored the key (probably securely) in a icloud backed up location. So the TOTP was no more safe than iCloud. Which is to be fair a pretty high bar. So I am fairly relaxed about it. But still, TOTP hardly counts as "something you have" these days. But I completely agree that the lifecycle problem (revocation mostly) is long way from being solved. I would just like to see dual U2F access controls as a default on web services today. [#] That's another problem. I am seriously contacting wallet makers to see if I can design a USB key and u2f key friendly wallet - I hate my keyring appraoch.
- t0mbstone 7y agoThis is why I use Authy for my 2FA tokens. They store everything encrypted in the cloud, so you can wipe your phone without losing access to your whole world.
- javagram 7y agoIf you use an iTunes encrypted backup to a Mac (or PC?) then restoring to a new phone works fine. I’ve restored my TOTP to a new phone this way. I guess for those who don’t want to do old-school backups to a PC this isn’t helpful though. I think just storing the TOTP in 1Password is probably the best approach for the average person. I print the backup codes and file them to a filing cabinet. Edit: for certain TOTPs I’ve also put them in an app on my Mac, so that gets backed up automatically with time machine. Also makes it much more convenient to get them than having to pull out a phone.
- dontbenebby 7y ago> If you use an iTunes encrypted backup to a Mac (or PC?) then restoring to a new phone works fine. I’ve restored my TOTP to a new phone this way. Really? That wasn't my experience when I restored from backups. Had to set them up again despite most everything else carrying over.
- javagram 7y agoLooked again and it seems like things changed sometime around 2015-2017. Sorry for the misinfo. https://dpron.com/recovering-google-authenticator-keys-from-ios-backups/ https://dpron.com/recovering-google-authenticator-keys-from-...
- hrez 7y agoGoogle broke that for their Authenticator some time ago. This app https://mattrubin.me/authenticator/ https://mattrubin.me/authenticator/ works with encrypted backups.
- ignorant 7y agoYes! Plus you might not have an expensive data plan when you travel. Better solution - central trust via apple face recognition (federated, private), but used by others as login.
- sametmax 7y agoAndOTP has an import/export feature. Bitwarden has automatic sync. tetripin has just a clear text file you can export. There are technical solutions.
- johnmaguire2013 7y agoAuthenticator Plus is a nice simple paid (one time) option for encrypted OTP syncing, and supports both Android and iOS. Additionally, Duo Mobile supports cloud backup and restore of third-party OTPs. (Disclosure: I work for Duo.)
- unethical_ban 7y agoEven after your edit: Treat your TOTP keys like passwords and store them. It's like "secrets management". At some point, somehow, automation programs need secrets to access APIs. At some point, no matter what, there will be sensitive data in a file on a container/server for your program. Likewise, "Kill the Password" initiatives are shorthand for "Yeah we know there will always be a password somewhere but let's merge it with 2FA, call it a PIN and we'll be good". I'm ranting a bit, but what I'm saying is that people will need to store secrets for accounts for a long time. Every single Internet citizen should have Keepass or Lastpass for account management, and that database should be well secured, and should also house their TOTP break-glass codes. (If you're paranoid you can store them in a different database). Barring a Password DB compromise, 2FA still gives a good benefit.
- wslh 7y agoExactly this. The onboarding process is simple but the total cost of ownership expensive. I ended up having my older mobile phone with me like a token device and will migrate its keys when I have time to do that. I was even confused by the Samsung migration using the USB OTG connector since doesn't clearly states that some stuff is not migrated. I hate when you need to put your brain in sysadmin mode instead of disconnecting it expecting a process that just works.
- jkirsteins 7y agoThere is probably no good answer that doesn't sacrifice security. At some point you have to be willing to say "ok, I accept this risk, this is still way better than using just passwords." Personally, I enroll multiple devices for each account where I enable 2FA (technically not a supported operation, but nobody can really tell if you scan a QR code twice). It's technically less secure, but I think a decent compromise. (self promo, but related to the topic at hand: since I don't have 2 phones, I made a utility to enable using T2-equipped Macs as a 2FA client that binds the keys to the hardware. You can check it out at http://github.com/sqreen/twofa http://github.com/sqreen/twofa)
- hrez 7y agohttps://mattrubin.me/authenticator/ https://mattrubin.me/authenticator/ stores in iOS keychain and you can restore your device with TOTP codes from itunes encrypted backups.
- dontbenebby 7y ago>The main problem I have with TOTP (What you're using when you use Google Authenticator) is that the migration path doesn't exist when you get a new phone. It also doesn't migrate when restoring from backup, as I found out when my iPhone had an issue and I had to get a new one - if I'd known that I'd have done it on a weekend :/
- abdusco 7y ago> the migration path doesn't exist when you get a new phone I faced with this problem last month. I was using `Google Authenticator`, mainly because of its simplicity. But you cannot see the secret keys for entries. I had to transfer sqlite database out of the phone and extracted private keys manually.
- tialaramex 7y agoNobody paying attention was trying to get regular people to stop writing their passwords down. Threat models matter, there are no regular people for whom "Bad guys steal the book I wrote my passwords in" is a real threat. I bought my mother a nicer (but still inconspicous) Password Book for Xmas. Do I use one myself? Of course not, I have a password manager - but I run vi and flood-wired my home with Cat5 and my mother won't be doing either of those things either. Regular people get done by credential stuffing, by phishing and straight up guessable passwords. Two out of three of those is fixed by having lots of separate passwords written in that old diary kept in the third desk drawer. Phishing is hard, against online phishing (as opposed to lazier attacks that collect credentials offline to use later) the only really good defence is WebAuthn/ U2F and too many sites ordinary people care about don't offer that.
- dual_basis 7y agoI agree to some extent, however most people I have seen with password books still have very simple passwords and often reuse them or create them with simple rules (pet's name + year born + first three characters of the site I'm logging into).
- arkades 7y agoIs Authy not TOTP? I migrated to it from GA specifically because it divorced me from my single device.
- hrez 7y agoOn IOS use "Authenticator" app by Matt Rubin. It'll save codes with iTunes encrypted backups but not to iCloud. Then restore to new iphone. Not sure how that'll work out when they retire iTunes.
- rkagerer 7y agoIf you're using Google Authenticator and rooted your phone, it's not hard to extract the database and transfer the secrets to your new phone. Or you could use an alternative like Authenticator Plus which supports export / import (and has some other nifty features). Of course, both these options come at a cost to your security posture.