Scripts for surfing on memory only-nothing left on disk

Armed_Penguin_SmallHere is a script for linux computers that allows you to use Firefox to access the Internet without leaving any “evidence” behind on your hard disk. I’ve used it for months on a number of Ubuntu machines. you need sudo (root) access to use it, like on your own machine where shit left behind on disk could be recovered by file recovery software even after deletion. Two defenses exist: surfing on RAM, as in this script, or using an encrypted home directory.

###BEGIN SCRIPT;

### Firefox_private.sh ####
# get username for /home/(username)
USER=$(whoami)
#set up ramdisk on volatile memory
sudo mkdir -p /mnt/RAMDISK
sudo mount -o size=25% -t tmpfs tmpfs /mnt/RAMDISK
#copy settings, plugins, etc from normal .mozilla directory
cp -R /home/$USER/.mozilla /mnt/RAMDISK/.mozilla
#mount mozilla(firefox) directories on volatile memory
sudo mount -o bind /mnt/RAMDISK/.mozilla /home/$USER/.mozilla #set permissions on mozilla directories
chown -R $USER /home/$USER/.mozilla
chmod 700 /home/$USER/.mozilla
chmod 744 /home/$USER/.mozilla/plugins
#open firefox brower and hold teminal open
firefox
#Revert to normal .mozilla directory on close and remove volatile #directory
sudo umount /home/$USER/.mozilla
sudo umount /mnt/RAMDISK
sudo rm -R /mnt/RAMDISK
#sudo swapoff -a #UNCOMMENT IF USING ENENCRYPTED SWAP or #whenever maximum security # is needed
#WARNING: SHUT OFF MACHINE if there is any danger of enemies #recovering information from memory #on a running machine!

#####  End Firefox_private.sh  ###

HOW TO PUT YOUR ENTIRE HOME DIRECTORY INTO RAM IN UBUNTU; 1:Create a new user named “ram” . This user should be given sudo priviliges so you can intentionally save a file if needed, using sudo nautilus 2: copy the script below to the desktop and make it executable 3: click on it, select “run in terminal” and letr it run-you will need to log back in as ram to use the volatile(nothing stored on disk) home directory.
####Begin script #
# Home_on_Ram.sh ###
####    Home_on_Ram      #######
#This script is for secure browsing and file handling with nothing
#left on disk unless deliberately saved other than to home or /tmp

# IT IS NECESSARY TO LOG BACK IN AFTER RUNNING THIS SCRIPT! echo “Before you can use this script you MUST create user account ‘ram’
” echo “WARNING:” echo “you are going to be logged out-please save all work and close all programs”
echo ” ”
echo “log back in when this script completes as ram”
echo “You can save files to your normal /home/(username) directory with sudo nautilus”
echo “but NOTHING will go to disk by default”
#set up ramdisk on volatile memory
sudo mkdir -p /mnt/RAMDISK
sudo mount -o size=50% -t tmpfs tmpfs /mnt/RAMDISK
#Create directories within Ramdisk sudo mkdir /mnt/RAMDISK/TMP sudo mkdir /mnt/RAMDISK/VAR_TMP
sudo mkdir /mnt/RAMDISK/VAR_SPOOL
sudo mkdir /mnt/RAMDISK/VAR_MAIL
sudo mkdir /mnt/RAMDISK/home
sudo mkdir /mnt/RAMDISK/home/ram
#mount home and temp directories on volatile memory
sudo mount -o bind /mnt/RAMDISK/home/ram /home/ram
sudo chown ram /home/ram
sudo chmod 744 /home/ram
sudo mount -o bind /mnt/RAMDISK/TMP /tmp
sudo chmod 1777 /tmp
sudo mount -o bind /mnt/RAMDISK/VAR_TMP /var/tmp
sudo mount -o bind /mnt/RAMDISK/VAR_SPOOL /var/spool
sudo mount -o bind /mnt/RAMDISK/VAR_MAIL /var/mail
sudo chmod 1777 /var/tmp echo “Setting up all home and temp directories in ram”
sleep 5
sudo swapoff -a
#kill X to force logout and back in so
# temp files will write to new mountpoints
sudo killall Xorg
###    End Home_On_Ram.sh  ###

Leave a Reply --WARNING: do not "Comment using Facebook" or using Twitter-you expose your information to 3ed party tracking

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s