Giter VIP home page Giter VIP logo

Comments (7)

osresearch avatar osresearch commented on August 24, 2024 1

My concern with not tying the disk key to the TPM is the ease of surreptitiously cloning the disk on the x230 -- one phillips screw and the SSD slides out -- followed by an offline (or shoulder-surfing) attack on the passphrase. If the key is derived from both the user passphrase and the TPM, then the attacker would need possession of the machine and the TPM can enforce rate limiting, etc.

from heads.

osresearch avatar osresearch commented on August 24, 2024 1

Once the kernel has been rebuilt, add the keys as before. Then check that it can be mounted with:

cryptsetup --keyfile /secret.key luksOpen /dev/dm-1 qubes-root
mount -o ro /dev/dm-3 /root

The key can be sealed and the stored in the NVRAM. The NVRAM space with the key should be password protected, which will require the user to input a password before the key can be unlocked. This will provide rate limiting.

On boot up the official initramfs can be copied to Heads' /tmp, the key can be retrieved from the NVRAM (with the password) and unsealed (based on the PCRs). This can be put into a cpio file and appended to the official initramfs -- http://unix.stackexchange.com/questions/243657/appending-files-to-initramfs-image-reliable

The kernel boot parameters need to be amended to specify the rd.luks.keyfile= for the partitions. This didn't work the first time; need to try again.

from heads.

tlaurion avatar tlaurion commented on August 24, 2024

Not sure about this. The Luks container should be verified against
tampering. The disk shouldn't be bound to a single computer.

from heads.

osresearch avatar osresearch commented on August 24, 2024

Hackish way to test it out -- extract Qubes initrd into /tmp/, chroot into it and activate the disk:

chroot /tmp/initrd
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev
lvm lvchange -a y qubes_dom0
lvm lvscan
cryptsetup luksDump /dev/dm-0
cryptsetup luksAddKey /dev/dm-0 /secret.key

The setup fails since the Heads kernel doesn't have aes-xts-plain64 cipher support. (Issue #44)

The secret key is not the right size since sealfile2 fails on larger than 128 byte files. (Issue #45)

from heads.

osresearch avatar osresearch commented on August 24, 2024

The initramfs file doesn't seem to be handled the way that I had hoped -- it doesn't decompress all of the pieces, so it is necessary to append to it. The wrap-cpio program will merge multiple cpio files to install the ones that we want, but the other parts still need to be written.

from heads.

osresearch avatar osresearch commented on August 24, 2024

The keyfile parameter might be fixed in systemd: systemd/systemd@c802a73

from heads.

osresearch avatar osresearch commented on August 24, 2024

The systemd fix doesn't actually work -- only the root partition is decrypted with that parameter. Instead I've modified /boot/boot.sh to generate /etc/crypttab on every boot with a reference to /secret.key. This is slow but effective.

from heads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.