Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules.d/40sdmem/README.md
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions modules.d/40sdmem/module-setup.sh
Original file line number Diff line number Diff line change
@@ -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
}

5 changes: 5 additions & 0 deletions modules.d/40sdmem/wipe.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "Checking for mounted disks..."
dmsetup ls --target crypt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably depend on this properly.

echo "WIPE RAM!"
/bin/sdmem -f
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This as well.

echo "WIPE DONE!"