- Wipe LUKS Disk Encryption Key for Root Disk from RAM during Shutdown to defeat Cold Boot Attacks

- Confirm in console output if encrypted mounts (root disk) is unmounted. (Because that is a pre-condition for wiping the LUKS full disk encryption key from RAM.)

Thanks to @friedy10!

https://github.com/friedy10/dracut/tree/master/modules.d/40sdmem

https://forums.whonix.org/t/is-ram-wipe-possible-inside-whonix-cold-boot-attack-defense/5596
This commit is contained in:
Patrick Schleizer 2022-06-29 09:32:55 -04:00
parent adca1ebdf6
commit 38cdf2722b
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48
4 changed files with 30 additions and 1 deletions

3
debian/control vendored
View File

@ -15,7 +15,8 @@ Rules-Requires-Root: no
Package: security-misc
Architecture: all
Depends: python3, libglib2.0-bin, libpam-runtime, sudo, adduser, libcap2-bin,
apparmor-profile-dist, helper-scripts, libpam-modules-bin, ${misc:Depends}
apparmor-profile-dist, helper-scripts, libpam-modules-bin,
secure-delete, dmsetup, ${misc:Depends}
Replaces: tcp-timestamps-disable, anon-gpg-tweaks, swappiness-lowest
Description: Enhances Miscellaneous Security Settings
https://github.com/Whonix/security-misc/blob/master/README.md

View File

@ -0,0 +1,4 @@
### Make sure sdmem is part of the initramfs
sudo apt-get install secure-delete
sudo dracut --include /usr/bin/sdmem /bin/sdmem --force

View File

@ -0,0 +1,19 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
check() {
return 0
}
depends() {
return 0
}
install() {
inst_hook shutdown 40 "$moddir/wipe.sh"
}
installkernel() {
return 0
}

View File

@ -0,0 +1,5 @@
echo "Checking for mounted disks..."
dmsetup ls --target crypt
echo "WIPE RAM!"
/bin/sdmem -f
echo "WIPE DONE!"