this post was submitted on 20 Apr 2024
65 points (98.5% liked)

Privacy

32103 readers
699 users here now

A place to discuss privacy and freedom in the digital world.

Privacy has become a very important issue in modern society, with companies and governments constantly abusing their power, more and more people are waking up to the importance of digital privacy.

In this community everyone is welcome to post links and discuss topics related to privacy.

Some Rules

Related communities

much thanks to @gary_host_laptop for the logo design :)

founded 5 years ago
MODERATORS
 

I have read quite a few posts about preventing account password takeover from various malicious ways, and many OPSEC measures are there to prevent it from happening.

Consider a case where you face a total blackout or technical failure. Now, you need to log in to your password manager, which requires either OTP on email or TOTP. You don't have access to the TOTP app because the backup is stored in cloud storage, whose email login also requires OTP.

How would you prevent such from happening?I haven't found a satisfactory solution or explanation for that yet.

all 35 comments
sorted by: hot top controversial new old
[–] eya@lemmy.dbzer0.com 49 points 7 months ago* (last edited 7 months ago) (1 children)

You backup your 2FA locally. Problem solved.

If you're using the cloud for anything related to security you're doing something wrong. (In my opinion)

[–] Extrasvhx9he 17 points 7 months ago* (last edited 7 months ago)

Just to add on what you want is the 3,2,1 method of backing up. You're asking for trouble if you just rely on cloud storage for anything that important. Export your TOTP seeds or copy your 8-10 generated OTPs. If shit hits the fan you'll be able to use a TOTP generator or a password manager that has one built in to get your codes.

[–] RageAgainstTheRich@lemmy.world 35 points 7 months ago (1 children)

Oh this is a good post for me! This happened to me. I had my pc drive encrypted so when it boots, i need to provide it with the password before it boots my OS. I use bitwarden to store my passwords and my bitwarden needs my 2FA code to unlock.

I wanted to install the newest version of LineageOS on my phone so i backed up everything to my pc and made sure i had everything backed up properly.

Then i wiped my phone and downloaded the new LineageOS iso and had to put it on my phone using ADB. But it had an issue to where it wouldn't detect the phone. So i thought "Let me reboot my PC real quick because that might fix it."

Presses reboot.......... "Please type your password to decrypt your harddrive: "

Fuck....

I have never had a worse panic attack in my life. EVERYTHING was on that drive. My work, my photos, my bank info, my entire life was on that encrypted drive.

But my password was on bitwarden. And to unlock bitwarden i needed my 2FA. Which i had backed up on my drive... which was now encrypted and i couldn't unlock anymore.

I absolutely fucking lost it.

I dug through the entire house and after almost 8 hours of searching i found one of my old laptops in a box in the attic. I suddenly i got the idea that MAYBE i had once backed up my phone stuff before because i ran the phone OS it came with and i then at one point installed LIineageOS.

I dug through every single folder and suddenly i found an old vault backup of the two-factor authenticator UNENCRYPTED app that i had used before.

I send it to my wife's phone and imported it into the app. The ONLY account that was on there... was bitwarden.

After almost 14 hours of pure stress and panic, i was able to decrypt my harddrive.

So my PERSONAL advice is ALWAYS store a physical backup.

I don't want to go through that stress ever again.

[–] EngineerGaming@feddit.nl 15 points 7 months ago

The only passphrases I actually fully remember are the ones for drive LUKS and for the password manager databases.

[–] Max_P@lemmy.max-p.me 14 points 7 months ago (1 children)

Backup codes. You're supposed to print them out and put it in a fire safe or something. They're longer and not time based and valid until you rotate them. With those you can lose everything and still access your accounts.

My KeePass database is also synchronized locally on most of my devices, so even if my server is dead I'm not really locked out, I just have annoying merge conflicts to resolve.

Also, Yubikeys. They're nice. If whatever blackout destroys your Yubikey, you have much worse problems to worry about than checking your email.

[–] dessalines@lemmy.ml 4 points 7 months ago (1 children)

If you're referring to keepass database merge conflicts, I use Syncthing and get these occasionally too, but KeepassDX for android can sometimes notice it and ask you if you want to merge them.

[–] Max_P@lemmy.max-p.me 2 points 7 months ago* (last edited 7 months ago)

Yeah similar setup except I use NextCloud.

KeepassDX is great, can use it with just about anything too. I used it over sftp for a bit. It'll happily do Google Drive, OneDrive, DropBox and just about anything that implements the right content providers.

Going through the provider is nice, it gives NextCloud an opportunity to sync it before it hands it over to KeepassXC, and knows when it gets saved too so it can sync it immediately. I don't think I've had merge conflicts since, and I still have my offline copy just in case.

The annoying part is when you've added a password on one side and cleaned up a bunch of passwords on the other side. When they get merged, it doesn't merge what changed it merges the databases together so your cleanup is gone. It's safe at least, and exceedingly rare.

[–] mp3@lemmy.ca 13 points 7 months ago* (last edited 7 months ago) (2 children)

One trick is that you can enroll your TOTP codes on more than one device, the only thing the device need is the clock to be synced to provide the correct code.

You can store your TOTP codes in many places:

  • A mobile app like Aegis (Android) or 2FAS (Android, iOS). Those even offer a way of backing up your TOTP codes, but you need to take the proper measure to store them safely.
  • A password manager that can handle TOTP like Bitwarden (with a premium subcription) or KeePassXC.
  • A security key like the Yubikey 5 can safely store TOTP keys (up to 32) and generate them through the Yubikey Authenticator app.

That way you don't get caught your pants down if one of your device dies, get stolen, etc. Also, keep the recovery keys / backup keys in a safe place just in case of a worst case scenario.

Keep in mind that your TOTP backup and Password Manager files like KeePassXC can be the weakest link in your OPsec if you're not careful.

[–] gaylord_fartmaster@lemmy.world 3 points 7 months ago

Great advice, just want to add that Bitwarden will do TOTP for free if you self-host Vaultwarden.

[–] veroxii@aussie.zone 1 points 7 months ago (1 children)

I thought KeePass files are strongly encrypted. How are they the weakest link if you use a proper pass phrase?

[–] mp3@lemmy.ca 5 points 7 months ago* (last edited 7 months ago) (1 children)

A strong and unique passphrase is indeed really important here, but you need to keep in mind that once the kdbx file is in the attacker's hand, that's the only thing that keep them out.

There's no 2FA, and no throttling on the bruteforce process. So it's really important to use a strong password there to avoid it being the weakest link.

[–] catloaf@lemm.ee 3 points 7 months ago (1 children)

You can kind of do MFA on the database. You can require a key, which can be very long and complex, and you can store it on a USB drive. You might be able to use a key stored on a yubikey or something too, I haven't tried it. It probably depends on which KeePass variant you're using.

[–] sntx@lemm.ee 1 points 7 months ago (1 children)

I use KeePass with three factors:

  • The password
  • A keyfile I distribute out of band between all hosts that should be able to open the database
  • A set of Hardware Keys supporting challange-response

Works really well IMO. I use KeePassXC on Linux and KeePass2Android on Android.

[–] mp3@lemmy.ca 2 points 7 months ago (1 children)

I suppose they all use the same challenge-response key?

[–] sntx@lemm.ee 2 points 7 months ago

Yes, unfortunately they need to atm.

[–] Vendetta9076@sh.itjust.works 6 points 7 months ago

I mean the answer is dont store the backup in a place unreachable when you need it.

[–] shortwavesurfer@monero.town 6 points 7 months ago

Print the single OTP QR code on paper, laminate and store in a lockbox

[–] vividstructure@thelemmy.club 5 points 7 months ago (1 children)

I backed up the most important passwords and recovery codes on paper.

[–] xilliah@beehaw.org 1 points 7 months ago

Bonus: cut it up and entrust it it to trusted people in envelopes. In case something happens they can combine their secrets to get access.

[–] RovingFox@infosec.pub 4 points 7 months ago* (last edited 7 months ago) (1 children)

Personally I use BitWarden with a unique pain in the ass password that I have written it down somewhere.

From there I can get back into everything.

[–] synestia@lemmy.ml 4 points 7 months ago (1 children)

Export your OTP database to an (optionally) encrypted file on a USB stick and put that in a lockbox/somewhere safe. If encrypting the stick/file: make sure you use a memorized/written down password.

[–] xilliah@beehaw.org 1 points 7 months ago

FYI data on USB sticks might not last as long as you might expect.

[–] AnEilifintChorcra@sopuli.xyz 3 points 7 months ago

All my drives are encrypted and have an encrypted backup of 2FA, a whole bunch of drives and my phone would all have to fail at the same time. This is following 3-2-1 so not all are in the same place or running at the same time

I use veracrypt to make encrypted portable files that contain 2FA and I back them up to random cloud storage using simplelogin email accounts, no 2FA on these for this exact reason. I know my password manager passphrase but I also do the same thing with it as the 2FA file just on a different account.

If any of the accounts gets hijacked then all they have is a throwaway email and password for that account and a random tiny encrypted file.

My codes aren't labeled with the email that they are for, just the service, e.g Proton1, and the passphrase has no other information stored with it so even if they magically managed to decrypt either of the files and gain access to the codes/ passphrase they don't have any idea what accounts any of them are for.

Log in to a cloud storage -> download the file -> decrypt it -> add it to any compatible app -> login to the password manager

[–] vrighter@discuss.tchncs.de 3 points 7 months ago

keep a copy of the db on your phone. I set up syncthing so the "cloud" I back up to is just my phone. You can obviously use other methods too for redundancy. I also use keepass, so my database is in my control.

[–] grue@lemmy.world 3 points 7 months ago

That's what generating some backup OTPs (e.g. like this, minus the Google part since this is !privacy) and printing them out on physical paper is for.

[–] solrize@lemmy.world 2 points 7 months ago

Now, you need to log in to your password manager, which requires either OTP on email or TOTP. You don’t have access to the TOTP app because the backup is stored in cloud storage, whose email login also requires OTP.

The mind wobbles. Don't do what you are describing.

[–] kevincox@lemmy.ml 2 points 7 months ago (1 children)

I created a USB with an encrypted copy of my root password to a few people. It also has backups of encrypted passwords databases and some other useful files.

[–] xilliah@beehaw.org 1 points 7 months ago

FYI data on USB sticks might not last as long as you might expect.

[–] slazer2au@lemmy.world 2 points 7 months ago

I sync my KeePass database to Dropbox.

I have access to Dropbox on my phone and my desktop. Of I change either I can copy the file to the new device and setup the sync again.

[–] JoeKrogan@lemmy.world 2 points 7 months ago

I export my totp from freeotp+. I have it added to keepassxc and sync that with syncthing to multiple devices.

If I lose the phone I can just import the exports to a fresh app on another phone.

Another option is use waydroid and backup the VM

[–] Ozy@lemmy.world 1 points 7 months ago

3-2-1 rule, 3 backups, 2 locations, 1 off-site

but it's more like 3-3-2 for me tbh

[–] EngineerGaming@feddit.nl 1 points 7 months ago

Log in to your password manager? KeepassXC just needs a decryption password. AFAIK you can set up additional protection but none of that include email.

[–] land@lemmy.ml 1 points 7 months ago

My set up OTP app + YubiKey