<p>Over the last few months I've had a couple of friends go through some rather unfortunate domestic situations which have involved partners spying on their computer activities, intercepting and even sending emails from what they thought was a private account. They&rsquo;ve used a variety of means ranging from simply accessing a machine that's not been locked through to using a keylogger or network sniffer to steal passwords and read email.</p> <p></p> <p>There are weaknesses with any operating system, especially if you do not have sole access to the machine or a way to secure the local area network to avoid eavesdroppers, so to try and solve the problem I looked at ways to eliminate the risks of both physical access and software spying.</p> <p></p> <p>The solution I came up with is a little technical, but works pretty well and provides a good balance of security and ease of use</p> <p align="center" style="text-align:center;"><a href="http://amzn.to/iQhaE1"><span style="color:windowtext;text-decoration:none;"><div class='p_embed p_image_embed'> <img alt="Image001" height="300" src="/images/2011/05/image001.jpg?w=300" width="300" />

</div> </span></a></p> <p>The first part of the solution is unobtrusive USB Flash Drives. These can take many forms but for convenience I’ve been using LaCie USB Keys that look like keys. They come in various sizes (though I consider 8GB the minimum for what I’m doing) and are easy to hide in plain sight, and you’re not likely to misplace it if it’s with your house or car keys.</p> <p></p> <p>The second part of the solution is a stand-alone installation of Ubuntu. While it’s not as user friendly or as familiar as Windows or OSX for a lot of people its fairly simple to set up a totally self-contained installation that runs entirely from the USB Key – it leaves no trace on the host machine, it never starts the host machine (so software key-loggers and other spyware are useless) and it’s fairly light-weight so you can start up or shut down in less than 30 seconds.</p> <p></p> <p>Setting Ubuntu up in this way doesn’t follow the usual path to build a LiveCD that most people use to try out Linux – with that style of setup you can’t store data on the drive or perform in-place upgrades (patching the build, adding new drivers or even migrating to a new version)</p> <p></p> <p>The final part of the solution is installing anti-virus scanners that you can use to examine the host machine, and a VPN client to secure your communications with the outside world…</p> <p></p> <p>Preparing the Bootable Ubuntu key</p> <p>These instructions do assume you have a clue what you’re doing, and that you can deal with the consequences of doing something wrong along the way. If you follow the recommendations you should be okay but, as with anything of this nature, there may be dragons ahead…</p> <p></p> <p>Safely selecting the right drive.</p> <p>You may omit this step if after partitioning you choose to install grub to the root of the usb drive you are installing Ubuntu to, (ie sdb not sdb1). Unless you do this correctly though you can overwrite the HDD MBR which can be a pain to deal with so it’s not recommended. If you don’t know what grub is… proceed with caution!</p> <p class="MsoListParagraph">·         Turn off and unplug the computer.</p> <p class="MsoListParagraph">·         Remove the side from the case.</p> <p class="MsoListParagraph">·         Unplug the power cable from the hard drive.</p> <p class="MsoListParagraph">·         Plug the computer back in.</p> <p></p> <p>Installing Ubuntu</p> <p class="MsoListParagraph">·         Insert the flash drive.</p> <p class="MsoListParagraph">·         Insert the Live CD.</p> <p class="MsoListParagraph">·         Start the computer, the CD should boot.</p> <p class="MsoListParagraph">·         Select language</p> <p class="MsoListParagraph">·         Select “Install Ubuntu”.</p> <p class="MsoListParagraph">·         Select Download updates while installing and Select Install third-party software.
If you have an active network connection (wired recommended) this will save time later on.
</p> <p class="MsoListParagraph">·         Forward</p> <p class="MsoListParagraph">·         At “Allocate drive space” select “Specify partitions manually (advanced)”.</p> <p class="MsoListParagraph">·         Forward</p> <p class="MsoListParagraph">·         Confirm Device is correct.</p> <p class="MsoListParagraph">·         Click “free space” and then “Add”.</p> <p class="MsoListParagraph">·         Select “Primary”, “New partition size …” = 4 to 6 GB, Beginning, Ext4, and Mount point = “/” then OK.</p> <p></p> <p>Optionally configure a Home partition</p> <p>If you’re only planning to have a single user and primarily store data in desktop folders then this isn’t required.</p> <p class="MsoListParagraph">·         Click “free space” and then “Add”.</p> <p class="MsoListParagraph">·         Select “Primary”, “New partition size …” = 4 to 8 GB, Beginning, Ext2, and Mount point = “/home” then OK.</p> <p></p> <p>Optionally configure swap space</p> <p>This allows hibernation but from experience with this configuration it’s quicker and easier to shut down and start than hibernate.</p> <p class="MsoListParagraph">·         Click “free space” and then “Add”.</p> <p class="MsoListParagraph">·         Select “Primary”, “New partition size …” = remaining space, (1 to 2 GB, same size as RAM), Beginning and “Use as” = “swap area” then OK.</p> <p></p> <p>Finish installation</p> <p class="MsoListParagraph">·         Confirm “Device for boot loader installation” points to the USB drive. Default should be ok if HDD was unplugged.</p> <p class="MsoListParagraph">·         Click “Install Now”.</p> <p class="MsoListParagraph">·         Select your location.</p> <p class="MsoListParagraph">·         Forward.</p> <p class="MsoListParagraph">·         Select Keyboard layout.</p> <p class="MsoListParagraph">·         Forward.</p> <p class="MsoListParagraph">·         Insert your name, username, password, computer name and select if you want to log in automatically or require a password.</p> <p class="MsoListParagraph">·         Select “Encrypt my home folder” for added security (especially if there is a risk of losing the drive)</p> <p class="MsoListParagraph">·         Select forward.</p> <p class="MsoListParagraph">·         Wait until install is complete.</p> <p class="MsoListParagraph">·         Turn off computer and reconnect the HDD.</p> <p class="MsoListParagraph">·         Reboot computer and select the flash drive to start</p> <p class="MsoListParagraph">·         Log in and complete installation, upgrading packages and adding options like Chrome browser or Evolution email client</p> <p></p> <p>Securing your connection</p> <p>While having a stand-alone machine image that allows you to keep local content secure you want to make sure no one is sniffing communications on wired or wireless networks. At the very least you need to ensure people are not stealing passwords so in Chrome you want  to install something like the KB SSL Enforcer which will try to redirect any connection to a secure channel to make snooping a lot harder.</p> <p></p> <p>If you want to ensure none of your online communications are overheard then you want to install and configure a Virtual Private Network (VPN) connection with someone like StrongVPN – this has the added advantage for some that you can even choose which country you want to appear to be surfing from :)</p> <p></p> <p>There are a number of Linux based anti-virus solutions (such as ClamAV) that can be used to scan the host machine but I’d recommend if you want to clean a Windows machine that you get a bootable version of Spybot S&D (that you can also run from a Flash Drive and keep up-to-date) as that’s a more robust solution.</p> <p></p> <p>Email and Documents</p> <p>Depending on your situation you may want to keep as much as possible on the USB Key and as little as possible on the web, vice versa or somewhere in between. Personally I recommend setting up a new webmail (Hotmail or Gmail) account only once you are securely connected (so the password is never visible on an unsecured connection) and using Evolution to keep that in sync with the local drive so you can work either from the disk in off-line mode, or log in from a web browser in an internet café or somewhere away from prying eyes. For documents a service like Ubuntu One (probably a good bet as it’s integrated with the OS), DropBox or SkyDrive gives you the flexibility of working locally or “in the cloud”. </p> <p></p> <p>Given the risks of losing the drive, or corruption happening due to an overzealous or early removal I would strongly recommend keeping important data backed up somewhere secure and online just in case. You might want to consider installing Prey on the image just in case you lose it.</p> <p></p> <p>Stay safe out there!</p> <p>A lot of the things you need to do to stay safe is common sense – don’t share logins, don’t re-use password and things like that but sometimes you need to bring more sophisticated tools and techniques to bear… I’d love to see some comments about how to improve this solution or make it simpler. If you like the idea of having this sort of setup but the instructions have put you off I’m happy to build a key for you for a reasonable fee (to cover time and expenses). Support for Ubuntu or any other applications mentioned here should come from the respective suppliers.</p>