by gravitronic · 3y ago · 0 comments
To remove the lost 2FA, I need a fresh 2FA code. No alternatives given.
I keep all my 2fa secrets in pass for this reason. Never lose access again!
Imho it's a different story if you use a separate gpg-key/secret to access the 2fa secrets (which should also only happen in emergency cases).
This can easily be done with pass.
I KNOW it defeats the purpose. But honestly, where the heck else am I supposed to put them? I know from experience that printouts gets lost, and also that if someone were determined to hack me, the easiest route would be to break into my home and find the printouts.
So I guess I'm technically supposed to subscribe to a second password manager and store just my 2FA secrets inside of that, with a different master password. Or, put the 2FA secrets inside their own encrypted file stored in my password manager, but once again with their own password that... I can't keep in my password manager. But the biggest problem with both of these is I'm going to forget the password. I never forget my password manager master password because I use it weekly. But asking me to remember a password I last used 3 years ago because that's when I set up 2FA? It's not gonna happen.
It all feels so absurd that the UX side of me just rebels. Expecting users to store 2FA secrets in a different place from their passwords that is also just as secure... is just not something normal people are ever going to do.
And besides, this is fine as an archived backup in case someone loses their phone. It just so happens it's faster for me to xsel the output of oathtool than it is to unlock my phone, open app, select account, and remember code, esp because I live in the terminal anyway.
(Gmail's main target is not devs, or even computer literate people. And owning a smart phone =! literate.)
https://security.stackexchange.com/a/194279 explains it better than I could.
Although, for Google, I'm using FIDO.
function 2fa(){
local sec=$(pass show $1.secret)
local code=$(oathtool -b --totp "$sec")
echo $code | xsel -ib
echo "Copied $code"
}then call it as `2fa <account>`, and make sure you store each <account>'s secret as `pass insert <account>.secret -e`.
refs: https://www.cyberciti.biz/faq/use-oathtool-linux-command-lin...
So, I thought I'd better change that... but it looks like you can't change your recovery account.
Why are 2FA apps so obtuse!
Now it is not that necessary because google authenticator allows transfer of data.
But when authenticator had no such option I was quite terrified and came up with idea to get another phone just as a backup and scanning 2FA code with 2 phones always for all websites. Of course backup one is always on my desk - but I don't have offsite backup for these. Problem is I don't want these TOTP tokens offsite really so it is a bit of a challange :) to come up with everything proof plan.
For example:
> "Password Store" ('pass' compatible) for Android also supports TOTP to tokens and Gpg encryption.
> With Syncthing, 'gopass' and 'Android Password Store', I have a fully open source, very easy to reason about fully in my control, password and totp storage, accessible on all my devices. All of which can only be accessed with my Yubikey that I keep in my pocket and my GPG PIN.
This is needed for example to store the TOTP in a device that has no camera. Or in your Bitwarden Pro account. Obviously you wouldn't be able to scan a QR with such an application, so the actual string is needed you just copy-paste it, so it should be provided by any service that offers 2FA (I confirmed Google does)
xclip -sel clip -t image/png -o | zbarimg -
macOS: pngpaste - | zbarimg -[1]: https://digitalbunker.dev/how-do-time-based-one-time-passwor...
And works like a charm.
I mean, if it works for crypto wallets it might also work for 2FA...
Shameless plug, I spinned up a local html javascript page to import export these code phrases anytime, with customization options, like issuer name, account name etc.
Seriously, Google?
Might be micro, but this is not a sign of a healthy company on an upwards trajectory.
However, I also think that Google keeps track of a "security rating" for your session; when I don't log in for a while, Google asks me for my password but when I use that same session token on another physical address I also need to authenticate with 2FA.
This may imply that failed login attempts may flag your session as even worse than before. I have no idea if this is actually how it works or if this is purely coincidental, but it may be worth keeping in mind given that you have limited backup codes available to you.
My recommendation would be to first get a Google Takeout backup stored somewhere safe, then see if you can get another 2FA method that you have control over connected to your account.
What about adding someone who can get access to your email after six months of inactivity? Maybe they let you add that without your lost google authenticator? It'd be better than nothing.
Note: I mean in mobile apps, not browsers.