Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Privacy
  3. Security is a mess, and why a threat model is important

Security is a mess, and why a threat model is important

Scheduled Pinned Locked Moved Privacy
privacy
22 Posts 12 Posters 4 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D [email protected]

    Should you store them in the password manager itself?

    No. Yubikeys support storing 2FA keys on hardware. Just buy one, they start from 33€.

    F This user is from outside of this forum
    F This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #21

    Make sure you're getting a newer one.

    They have versions which have a hardware vulnerability that allows the device to be cloned.

    1 Reply Last reply
    0
    • charger8232@lemmy.mlC [email protected]

      If someone observed you entering your ring 0 passphrase and stole your backup of ring 0 or ring 0 itself, the database becomes vulnerable. For that reason, it is a good idea to encrypt your database using a different passphrase than ring 0, and/or mitigate the risk of someone having the ability to see you type your ring 0 passphrase.

      Storing the ring 0 passphrase on a hardware security key as I mentioned in the previous reply allows you to automatically type your ring 0 passphrase without the need to remember it or risk being seen typing it in. Another way to mitigate this attack would be enabling biometrics on your ring 0 device. However, that doesn't protect seeing you type the passphrase in a BFU state.

      This is the method I've come up with:

      I have a hardware security key (let's call it hsk 0). It is configured to store the passphrase for my airgapped GrapheneOS phone (my ring 0 device). ring 0 has biometrics enabled. This means hsk 0 is only used to unlock ring 0 in the BFU state, and can be kept in the safe otherwise. A second factor PIN can be applied to ring 0, and a copy stored in the safe. In general, the second factor PIN will be used often enough to memorize. My ring 0 has a KeePassDX database (db 0), and Aegis for TOTP (I want to avoid the mixup of saying 2FA when I am referring to TOTP). db 0 is protected using a memorized passphrase, and also has biometrics enabled. I found that storing the db 0 passphrase using any other medium introduces too many risks and vulnerabilities. Inside db 0 is the duress passphrase for ring 0, as well as all device credentials for ring 1 devices. The Aegis app will store TOTP for all accounts. An unencrypted backup of the phone will be made and stored in the safe.

      Let's pause here and recap what would need to happen in order to obtain a ring 1 passphrase:

      1. An attacker would need either the phone or a backup of it
      2. If the attacker has the phone in a BFU state, the attacker would need hsk 0 stored in your safe to unlock it
      3. If the attacker has the phone in an AFU state, the attacker would need your fingerprint as well as the second factor PIN you have memorized or a copy of it in your safe
      4. Once the attacker unlocks the phone, or if the attacker only has a backup of the phone, the attacker would need the passphrase only you know in order to unlock the database.

      It's important the safe isn't stored in your home, but rather something like a safety deposit box, that way you aren't alone near the safe at any time.

      The passphrase for Aegis is stored in db 0, and biometrics can be enabled if you want. Each ring 1 device contains an independent KeePassXC database each, that way if a device is remotely compromised while the database is unlocked the damage is minimal. An encrypted backup server is one of the ring 1 devices, which keeps all other ring 1 devices automatically backed up. All accounts are protected via 2FA (whether it's another hardware security key (hsk 1) or TOTP). 2FA recovery codes are stored in a safe separate from our ring 0 backup. That means TOTP follows the 3-2-1 backup method (1 copy on ring 0, 1 backup in a safe offsite, and 2FA recovery codes kept somewhere else. 3 different storage mediums)

      Now, what an attacker would have to do to break into an account:

      1. Compromise the device hosting the KeePassXC database storing the account
      2. Compromise the KeePassXC database
      3. If the account is protected by TOTP: either compromise ring 0 and compromise Aegis, or find the backup of ring 0 and compromise Aegis, or find the 2FA recovery codes
      4. If the account is protected by a hardware security key: Find hsk 1 (or a backup of it)

      Some hardware security keys allow entering a PIN before successful authentication. One of those is good as your "main" hsk 1, and the PIN can be stored in db 0 in case you forget (forcing the attacker to also need to compromise ring 0 to use hsk 1).

      I'm a bit tired while writing this, so please point out any obvious flaws. Here is a summary:

      1. A hardware security key hsk 0 stores the passphrase for ring 0
      2. hsk 0 is stored in a safe (safe 0) when not in use, and a backup can be stored in another safe (safe 1)
      3. ring 0 has biometrics enabled, as well as a second factor PIN
      4. The second factor PIN is both memorized and a copy stored in safe 0
      5. You have the passphrase for ring 0's KeePassDX database (db 0) stored in memory
      6. db 0 has biometrics enabled
      7. Aegis is installed on ring 0 to store all TOTP codes
      8. A backup of ring 0 is stored in safe 0
      9. db 0 stores the credentials for all ring 1 devices
      10. One ring 1 device is used as an encrypted backup server for all other ring 1 devices
      11. Each ring 1 device has their own independent KeePassXC databases (db 1)
      12. All accounts are either protected with another hardware security key (hsk 1) or TOTP.
      13. 2FA recovery codes are stored in safe 1
      14. A copy of hsk 1 is kept in safe 0
      ? Offline
      ? Offline
      Guest
      wrote on last edited by
      #22

      You're system sounds well thought out and more than secure enough for most people's needs, so if that is what works for you I would go for it. I also like the fun idea for the duress passphrase, I just hope a friend doesn't get tempted to try and unlock your phone and accidentally wipe everything! Overall, the only comments I would make are:

      • be wary of using biometrics for ring 0, in countries like the US the cops can force you to use your biometrics, by law. GrapheneOS does have ways to quickly disable biometric unlock in emergencies, or automatically disable it after a set period of time
      • you are using both a security key and a passphrase for securing the ring 0 database. Perhaps commit to one of them, to reduce complexity. The more complicated the system, the more places there can be vulnerabilities
      • getting access into the ring 0 device is effectively compromising the database, even if you have a password on the database. There are numerous things that an attacker can do once in control of the device, like enabling internet, flash a custom rom and copy all the files over to make it look identical, installing a keylogger, changing the UI to hide any modifications, etc. This is also why I try to use my ring 0 device as little as possible, every time I enter the password is another chance for the password to be stolen
      • putting your Aegis TOTP app on ring 0 means you have to constantly use your ring 0 device. I prefer to use my ring 0 device as little as possible, both for security and convenience. My TOTP app is on a ring 1 device instead, and is only used to secure online accounts (which I consider ring 2). If you want to use 2FA for ring 1 then I suppose you are forced to put your TOTP app on ring 0, though I find the inconvenience not worth it.
      1 Reply Last reply
      0
      • System shared this topic on
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups