Q:

How to wipe RAM on shutdown (prevent Cold Boot Attacks)?

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:

https://tails.boum.org/contribute/design/memory_erasure/
http://tails.boum.org/forum/Ram_Wipe_Script/
http://dee.su/liberte-security
http://forum.dee.su/topic/stand-alone-implementation-of-your-ram-wipe-scripts

Can you please provide instructions on how to wipe the RAM once Ubuntu is shutdown/restarted?
Thanks for your efforts!

A:

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!

