News for hackers. Stuff that matters.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by jvanderbot on Thursday January 19, 2023 @12:28PM (#34442973)
You can do this, or you can write down the secret (Click to get the text), and use oathtool to generate codes rather than google's auth.

I keep all my 2fa secrets in pass for this reason. Never lose access again!

Re:Tell HN: It is impossible to disable Google 2FA using bac... by tmerse on Thursday January 19, 2023 @12:50PM (#34443247)
But be careful. If you access the passwords and 2fa secrets via the same credentials you are back to one factor authentication if secret + pass store ever get compromised.

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.

Re:Tell HN: It is impossible to disable Google 2FA using bac... by crazygringo on Thursday January 19, 2023 @01:34PM (#34443767)
Yeah... I do the same thing. 2FA secrets in my password vault.

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.

Re:Tell HN: It is impossible to disable Google 2FA using bac... by hunter2_ on Thursday January 19, 2023 @01:46PM (#34443923)
> store 2FA secrets in a different place from their passwords is just not something normal people are ever going to do

Normal people, in the sense of people who do what the interface says to do instead of layering anything else on top, are told 2FA means "something you know, and something you have."

"Know" means it exists only in your mind; it is not stored elsewhere. "Have" means you cannot possibly produce it with your mind; it's stored elsewhere.

When abiding by this concept, "storing 2FA secrets in a different place from their passwords" (the former in some electronic or printed format; the latter in one's mind) is simple. Things get complicated when people start storing both in some electronic or printed format, but that's not what any login interface tells people to do.

The neologism "passkey" (a string used in lieu of a password, but which is not memorable, and therefore is destined to be something you "have") will probably help to sort out this concept: there would be no confusion about the fact that combining a passkey with totp constitutes two "have" items, and therefore is 1FA until combined with something else (biometric, probably).

Re:Tell HN: It is impossible to disable Google 2FA using bac... by notpushkin on Thursday January 19, 2023 @02:44PM (#34444656)
I think using a password manager is already 2FA.

Something you have: a password database on your PC.

Something you know: your master password.

TOTP is a nice addon, but you can store it in the same password manager. It will still help with some attacks (e. g. if a hacker manages to MITM your traffic, they only get the password + one code, which is not sufficient to log in again).

Re:Tell HN: It is impossible to disable Google 2FA using bac... by rhussmann on Thursday January 19, 2023 @01:50PM (#34443985)
It's misleading to say that storing your passwords and 2FA secrets in the same place defeats the purpose. There are several vectors here, right?

Enabling 2FA on a site (regardless of how or where the 2nd factor is stored) means if a malicious party were to obtain your plaintext password, they still wouldn't be able to access your account. So, outside of the entire discussion of password managers and secrets, 2FA does require a second factor.

Keeping your 2nd factor in the password vault does make the vault a much higher-value target. But it doesn't diminish the fact that if only your plaintext password is compromised (for example through a leak or re-use) the account is still protected until the point the 2nd factor is compromised.

Security is a spectrum, and often at odds with convenience. While demonstrating that something is provably secure is important, I feel we often fall victim to the nirvana fallacy when discussing the practical everyday use of these things.

Re:Tell HN: It is impossible to disable Google 2FA using bac... by hunter2_ on Thursday January 19, 2023 @02:26PM (#34444462)
Off topic: remarkable that you've made your first comment from a near-decade-old account!
Re:Tell HN: It is impossible to disable Google 2FA using bac... by rhussmann on Thursday January 19, 2023 @03:30PM (#34445199)
Long-time lurker, first-time caller.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by mprime1 on Friday January 20, 2023 @03:35AM (#34450464)
> I KNOW it defeats the purpose. But honestly, where the heck else am I supposed to put them?

Backing up my 2FA codes is one of the reasons that led me to create PortableSecret: https://news.ycombinator.com/item?id=34083366

Some people took issue with my comment regarding ‘not all secrets belong in your password manager’ but your comment is exactly what I meant.

Re:Tell HN: It is impossible to disable Google 2FA using bac... by mr_mitm on Thursday January 19, 2023 @01:04PM (#34443419)
How is a regular user supposed to think of all this in advance? It's ridiculous. Securely proving your identity in case of loss of proof of identity is hard enough with just passwords. With 2FA it's pretty much impossible.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by bbarnett on Thursday January 19, 2023 @01:06PM (#34443453)
I'm sure all of this will make sense to grandma, too.

(Gmail's main target is not devs, or even computer literate people. And owning a smart phone =! literate.)

Re:Tell HN: It is impossible to disable Google 2FA using bac... by tmerse on Thursday January 19, 2023 @01:28PM (#34443703)
It may not help grandma as much as someone who maintains some popular opensource library that you may happen to use or someone that puts parts of their savings into crypto.

Who is more likely to visit this page (and use tools like pass) is up for you to decide.

The point still stands. Storing passwords and 2fa secrets inside in the same box will weaken the 2 in 2fa.

(Gmail's main target is not devs, or even computer literate people. And owning a smart phone =! literate.)

Grandma can always print the 2fa seed or write down the alphanumeric value and store it not next to the sheet with her passwords – same principle (I think she won't use pass anyway as opposed to the person I was originally replying to which tells me they are most likely technically literate).

Re:Tell HN: It is impossible to disable Google 2FA using bac... by lexapro on Thursday January 19, 2023 @02:04PM (#34444183)
Grandmas usually don't set up two-factor authentication in the first place.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by bbarnett on Thursday January 19, 2023 @04:32PM (#34445909)
Google will leave grandmas no choice.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by jvanderbot on Thursday January 19, 2023 @02:39PM (#34444608)
My laptop, which contains all this secret information, is way, way more secure than my phone. There's the boot decrypt password, login password, then gpg password. My phone has ... A pin.

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.

Re:Tell HN: It is impossible to disable Google 2FA using bac... by notpushkin on Thursday January 19, 2023 @02:46PM (#34444686)
Android phones are encrypted by default, but for encryption, they use the same PIN as your lock screen. There's some command you could run to replace it with a strong password while keeping screen lock PIN simple, but it didn't work for me last time I tried.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by mr_mitm on Friday January 20, 2023 @05:43AM (#34451210)
Surely the data is encrypted using a 128 bit key or better, and the key is stored on some secure enclave which rate limits PIN entries, is it not?
Re:Tell HN: It is impossible to disable Google 2FA using bac... by notpushkin on Tuesday January 24, 2023 @02:33AM (#34500576)
> Surely the data is encrypted using a 128 bit key or better

I think so, yeah.

> and the key is stored on some secure enclave which rate limits PIN entries, is it not?

That – I'm not so sure about. I didn't really think about it too much before you pointed it out, but it would make sense for the Android floks to have implemented it. I'll look into it a bit later!

Re:Tell HN: It is impossible to disable Google 2FA using bac... by philjohn on Thursday January 19, 2023 @02:46PM (#34444685)
I enrol any TOTP codes into 3 Yubikey's, and also keep the private key physically printed out.

Although, for Google, I'm using FIDO.

Re:Tell HN: It is impossible to disable Google 2FA using bac... by leokennis on Thursday January 19, 2023 @06:18PM (#34447018)
This is not entirely true.

https://security.stackexchange.com/a/194279 explains it better than I could.

Re:Tell HN: It is impossible to disable Google 2FA using bac... by SillyUsername on Thursday January 19, 2023 @01:57PM (#34444067)
You can do this, or you can just start using Microsoft Authenticator which will sync your Authenticator codes to your Microsoft account for when you reinstall the app elsewhere.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by GordonS on Thursday January 19, 2023 @02:10PM (#34444278)
I just checked, and my MS Authenticator is backing up to... my Google account.

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!

Re:Tell HN: It is impossible to disable Google 2FA using bac... by my123 on Thursday January 19, 2023 @02:53PM (#34444778)
on iOS, MS Authenticator backups to iCloud. No way to retain the codes on an iOS->android migration (or the opposite).
Re:Tell HN: It is impossible to disable Google 2FA using bac... by jvanderbot on Thursday January 19, 2023 @02:42PM (#34444644)
this is also fine. I have a personal preference to never look at my phone while working, and I'm always in terminal anyway ...
Re:Tell HN: It is impossible to disable Google 2FA using bac... by kevin_thibedeau on Thursday January 19, 2023 @02:46PM (#34444691)
MS Authenticator breaks if you have to do a factory reset on the phone.
Re:Tell HN: It is impossible to disable Google 2FA using bac... by jvanderbot on Thursday January 19, 2023 @03:43PM (#34445350)
for the curious:

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...