6

My system is encrypted using Full Disk Encryption, i.e. everything except /boot is encrypted using dmcrypt/luks. I am concerned about Cold Boot Attacks.

Prior work:

Can you please provide instructions on how to wipe the RAM once Ubuntu is shutdown/restarted?

Thanks for your efforts!

5

You could use sdmem.

sudo apt-get install secure-delete

To make it run at every shutdown, we'll create an Upstart job file called memory_wipe.conf.

Note: this is one command. Copy/paste it in its entirety!

echo '# upstart config - wipes memory on shutdown

description  "Wipes memory on shutdown"

start on (runlevel [016] and stopped gdm)

script
    sdmem
end script' > sudo tee /etc/init/memory_wipe.conf

Restart your computer and upon the next reboot, your RAM will be wiped securely!

  • Isn't kexec into a new kernel required? Otherwise the old kernel does not get overwritten? – James Mitch Aug 21 '12 at 9:02
  • Wiping the RAM when gdm stops might be a bad idea, since it causes an unclean shutdown? sdmem might overwrite itself or the kernel, therefore crashing the system without wiping the complete the RAM? – James Mitch Aug 21 '12 at 9:03
  • Why are the implementations in the Live CD's (prior work) so complex and these so simple? Too simple to be safe? – James Mitch Aug 21 '12 at 9:07
0

Take a look at this thread

http://ubuntuforums.org/showthread.php?t=1500936

If you still want to do it then:

Look for secure-delete in Synaptic

The Secure-Delete package comes with four commands:

srm - Secure remove; used for deleting files or directories currently on your hard disk;

smem - Secure memory wiper; used to wipe traces of data from your computer's memory (RAM);

sfill - Secure free space wiper; used to wipe all traces of data from the free space on your disk;

sswap - Secure swap wiper; used to wipe all traces of data from your swap partition.

Source: http://ubuntuforums.org/showthread.php?t=1008111

And to make it run when you want:

To execute a script upon rebooting Ubuntu

Put your script in /etc/rc0.d Make it executable (sudo chmod +x myscript) Note: The scripts in this directory are executed in alphabetical order

The name of your script must begin with K99 to run at the right time. To execute a script at shutdown

Put your script in /etc/rc6.d Make it executable (sudo chmod +x myscript) Note: The scripts in this directory are executed in alphabetical order

The name of your script must begin with K99 to run at the right time.

Source: http://en.kioskea.net/faq/3348-ubuntu-executing-a-script-at-startup-and-shutdown

If you do not know how to make a script:

Make a text file in an easy to find directory:

Code:

#!/bin/bash

COMMAND1

COMMAND2

COMMAND3`

Use the shebang line that I have given. Replace COMMAND1 and etc with the command you would like the script to run.

Save the text file and then you have to make it executable. For this I will assume that the the file is called "test.sh". To make it executable:

chmod 775 test.sh

Then you can run the script:

./test.sh

Source: http://ubuntuforums.org/showthread.php?t=928839

Hope this helps,

Leinardo

  • Why use the deprecated rc runlevel system? – James Mitch Aug 21 '12 at 9:04
  • I don't think this can work. Unless kexec into a fresh kernel with smem, the old kernel may overwrite itself or smem and not everything is cleaned. – James Mitch Aug 21 '12 at 9:06
0

Actually you don't need it if you are not using DDR2 or older RAMs. Here and here are resources that confirm DDR3 looses voltage to fast to be susceptible to Cold Boot Attack (CBA)s.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.