• JustEnoughDucks@feddit.nl
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    10 months ago

    But what is the threat model where a TPM-stored LUKS key protects against?

    I fail to see it. It doesn’t protect against any physical attacks at all, and it also doesn’t protect against attacks while the system is powered on.

    It seems to only protect against the attack of someone stealing your hard drive out of your system but leaving the entire system behind. Maybe for encrypting extra data drives that will want to be resold later? But that is more a datacenter threat model

    • asudox@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      10 months ago

      Let’s say you have LUKS with TPM enabled. Verified or Safe Boot is also on, so someone cannot access your decrypted files just with some live usb distro. And let’s say you also have a password set for changing BIOS/UEFI settings so the attacker cannot disable safe boot without a password. So the attacker might want to steal the hard drive in this case to get the data, but that’s also not possible because the hard drive is encrypted and the key is in the TPM. The way TPM also checks for integrity makes the system tamper-proof. So any attempt at tampering with the hardware will trigger the tamper protection and ask the user for a recovery passphrase to let the TPM hand over the decryption key again. So actually TPM is useless without safe boot and without a password for the user account in your OS. The only thing protecting your data from the attacker in this case is your user password… unless the user has one of these raspberry pi pico devices that are programmed to take the TPM keys sent to the CPU at boot in plaintext. Though I am pretty sure this is also fixed or will be fixed in the future. Maybe public key cryptography could help. I haven’t researched that yet.

      TL;DR: TPM is pretty useless without safe boot, but is pretty decent with safe boot. TPM is not the securest thing in the world but for a regular user it’s probably the best choice without sacrificing convenience.

      • Para_lyzed@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        10 months ago

        Just wanted to add that your BIOS password can be circumvented by taking out the CMOS battery. That will clear all your settings and allow unrestricted access. A BIOS password should absolutely never be used as a form of security, it is trivial to bypass.

        Granted, I don’t believe that the TPM will give the key if secure boot were disabled, I just wanted to mention that BIOS passwords don’t do anything against any real attack.

        • asudox@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          10 months ago

          I also want to add that the TPM will request the recovery key if the BIOS goes back to factory defaults. I also think changing the secure boot setting might trigger it. If that’s the case then a BIOS password is pretty useless.

          • Para_lyzed@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            10 months ago

            I believe that the TPM will refuse to provide keys after secure boot is disabled, but I didn’t intend to imply that it could be used to bypass TPM decryption or anything. Just as an aside that BIOS passwords are effectively useless at preventing access to the BIOS.

            • asudox@lemmy.worldOP
              link
              fedilink
              arrow-up
              1
              ·
              10 months ago

              It does seem like most of the TPMs indeed do not provide the keys if secure boot is disabled. Sorry for the misunderstanding.

    • Bitrot@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      10 months ago

      It does protect against physical attacks. PCRs are used to tie keys to specific hardware and software configurations and versions, boot paths, kernel command line arguments, etc and will lock out if changed. One of the reasons Ubuntu waited so long for official support was to set up the infrastructure for unified kernels and signing, the kernel and initrd are unified and signed and verified before it will unlock to protect against sophisticated attacks that most people will never encounter. For most people worried about theft, having it lock out when the boot order is changed would be enough. And when running, brute forcing the login process is slow and can be made even more painful with lockouts.

      The TPM functions very differently than putting keys on a permanently attached usb drive.

    • aksdb@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      Aside from the full scenarios provided in the other comments, there is another, more simple reason to still prefer it: your daily workflow is not intercepted, but if your disk dies, you can throw it out and replace it without a second thought, since it was encrypted all the time.

    • delirious_owl@discuss.online
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      The threat ia that someone who uses a shitty password and then their laptop gets taken by a sophisticated actor that could crack their stupid password in an hour without the TPM wiping itself after X failed attempts.

      The solution, of course, is to not use shitty passwords