Ringo,<div><br></div><div>So I find it funny that you write this as I am compiling a micro X11 VM for the exact application you describe, for many of the same reason you mention.</div><div>I&#39;ve been playing with this idea for quiet some time now, about a year.  </div>
<div>I have a rough working prototype of what I would like to see, but it&#39;s about 420MB in size, based on gentoo, and to me that is way to large.</div><div>I&#39;ve looked into Xbuntu and lots of others, and the solution I&#39;m trying is to use the Kamakazie OpenWRT build for generic x86 running just X and a web browser application.</div>
<div>So trying to get Mozilla, aka Firefox, integrated into the kamakazie build system is a nightmare.  I tried, coderman tried, and we&#39;re not going to try anymore with it.  Mozilla code wasn&#39;t designed for this type of thing.<br>
</div><div><br></div><div>Three days ago coderman and I thought that chrome might be a good option.  He downloaded the linux version, compiled and said it looked pretty straight forward and would probably work.</div><div>
So now I&#39;m recompiling the Micro X11 VM with a kernel update, then I&#39;ll try and add chrome into the Mix.  If all goes well, we should have something in a few weeks.</div><div><br></div><div>Just so you know, I thought this was going to be much easier than it has turned out to be....their are all kinds of incompatibility issues, bugs, and customizations that always come up.</div>
<div>It has taken a very long time since initial idea to get this far and keep it this small.  Right now the X11 VM is coming in around 11MB, that&#39;s with Tor, kernel, X11, and the minimums needs to run.</div><div>I&#39;m not sure how big Chrome is, but we&#39;ll see.</div>
<div><br></div><div>It&#39;ll be based on a similar build system as Tor VM.  The idea is to keep it small in size, low in memory usage, and integrated like it&#39;s any other application on the system, even though it&#39;s running in a VM.  The VM engine we used in Tor VM is Qemu.  My personal goal is to try and get everything at or below 50MB in size, but we&#39;ll see how that turns out.</div>
<div><br></div><div>If you haven&#39;t looked at Tor VM, you might want to do so.  It&#39;s a good base to start a project like what you describe, and is what we&#39;ve been working on (quietly) for some time now. :)</div>
<div><a href="https://www.torproject.org/torvm/">https://www.torproject.org/torvm/</a></div><div><a href="http://www.janusvm.com/tor_vm/">http://www.janusvm.com/tor_vm/</a></div><div><br></div><div><br></div><div>- Kyle</div>
<div><br><div class="gmail_quote">On Tue, Aug 18, 2009 at 11:12 PM, Ringo <span dir="ltr">&lt;<a href="mailto:2600denver@gmail.com">2600denver@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I would appreciate any feedback people have on this. This is just an<br>
idea and it&#39;s kind of beta, so don&#39;t use this unless you know what<br>
you&#39;re doing. PGP key at bottom of message<br>
<br>
<br>
<br>
<br>
More Secure Tor Browsing Through A Virtual Machine in Ubuntu<br>
<br>
Whenever somebody uses the internet through Tor using the standard<br>
set-up, they are assuming that the program (such as Firefox) they&#39;re<br>
using is immune to serious remote attacks such as code execution attacks<br>
that could allow an adversary to run commands on their system. It is<br>
possible to use Tor without making these assumptions, thus making Tor<br>
use safer.<br>
<br>
The basic idea behind securing Tor browsing through a virtual machine is<br>
to put the user&#39;s programs in a sandbox. A virtual machine is the<br>
ultimate example of this. Even if an attacker were to be able to gain<br>
command-line access through a vulnerability in a program such as<br>
Firefox, they still wouldn&#39;t be able to obtain the user&#39;s IP address,<br>
look at their file system, or gain access to any other<br>
personally-identifiable information.<br>
<br>
As an added benefit of running a virtual machine, you can also allow<br>
scripts, flash, and all sorts of other nasty code to run in your browser<br>
as even if it tries to break out it won&#39;t be able to. You should be<br>
aware that this will break your anonymity across identities through<br>
things like flash cookies. We&#39;ll discuss that more later as well as<br>
steps that can be taken to prevent it.<br>
<br>
Unfortunately, virtual machines require a lot of memory, cpu time, and<br>
disk space. If you don&#39;t have extra of these, you might want to consider<br>
building a chroot jail instead. If you want to install a virtual<br>
machine, keep reading.<br>
<br>
I&#39;ll be using Xubuntu for this guide because it&#39;s an easy distribution<br>
for newbies to use and it&#39;s relatively lightweight. If you&#39;re dealing<br>
with less system resources, you might want to try doing this with Damn<br>
Small Linux or installing Fluxbox. If you get it to work, please<br>
document how it was done so other people can lean from your experience.<br>
<br>
Part One: Download Xubuntu<br>
The first thing we&#39;ll have to do is grab a copy of Xubuntu. If you have<br>
lots of spare resources, you can use Ubuntu as the instructions will be<br>
almost identical.<br>
You can get the 9.04 (Jaunty Jackalope) version of Xubuntu at<br>
<a href="http://www.xubuntu.com/get#jaunty" target="_blank">http://www.xubuntu.com/get#jaunty</a>. I strongly suggest you use the<br>
Torrents they provide at<br>
<a href="http://mirror.anl.gov/pub/ubuntu-iso/CDs-Xubuntu/9.04/release/xubuntu-9.04-desktop-i386.iso.torrent" target="_blank">http://mirror.anl.gov/pub/ubuntu-iso/CDs-Xubuntu/9.04/release/xubuntu-9.04-desktop-i386.iso.torrent</a>.<br>

<br>
<br>
Part Two: Configure Your Host System<br>
While we&#39;re waiting for Xubuntu to download, let&#39;s set up your host<br>
system. The first thing we&#39;ll need to do is create a user to run the<br>
virtual machine. Go to System&gt;Administration&gt;Users and Groups and add a<br>
new user. You&#39;ll need to set a password for them, so make sure you write<br>
it down when you do. Also, go to advanced and write down the user id.<br>
I&#39;m calling this user “torify” in my examples.<br>
I&#39;m assuming you already have Tor/Privoxy set up at the standard ports<br>
(9050 and 8118) if not, please install them and remember any<br>
non-standard configurations you have.<br>
Let&#39;s set up our firewall so the “torify” user can only access localhost:<br>
sudo iptables -t nat -A OUTPUT -m owner --uid-owner torify -j DNAT<br>
--to-destination 127.0.0.1<br>
<br>
This firewall rule will only stick around until you restart your system<br>
(or re-connect to the network). If you want to make it persistent,<br>
there&#39;s a guide at <a href="https://help.ubuntu.com/community/IptablesHowTo" target="_blank">https://help.ubuntu.com/community/IptablesHowTo</a> which<br>
explains how to even if you&#39;re using the Gnome or Xcfe Network Manager.<br>
<br>
If you have any software listening on any port (even if it&#39;s only<br>
accessibly from localhost) then the virtual machine will be able to see<br>
it. This is not a risk if you&#39;re browsing Tor safely in your virtual<br>
machine but if you allow flash, java, etc. then it could become a risk.<br>
A common open port on Linux systems is port 631, which is the CUPS<br>
service&#39;s web interface for managing print jobs. If you open<br>
<a href="http://localhost:631" target="_blank">http://localhost:631</a> in your web browser, you should be able to see if<br>
it&#39;s there or not. You can temporarily disable it by going to the System<br>
Monitor (in System&gt;Administration), finding cupsd in the process list,<br>
and killing it. This will only kill CUPS until the next system restart<br>
(or possibly the next login).<br>
<br>
Next, we&#39;ll install the software required to run the virtual machine.<br>
Type the following command in the terminal (Start&gt;Accessories&gt;Terminal).<br>
If your processor doesn&#39;t support virtualization, you should only<br>
install qemu. If you don&#39;t know if your processor supports it, go ahead<br>
and install it as you can always remove it later.<br>
sudo aptitude install qemu kqemu-common kqemu-source<br>
<br>
Once this is installed, you&#39;ll have to restart. Go ahead, I&#39;ll still be<br>
here.<br>
<br>
Now that you&#39;ve got Qemu/KVM installed, let&#39;s do the final step in<br>
configuring your system. Remember where I asked you to write down the<br>
user id? Replace “id” in the following two commands with the id of your<br>
“torified” user.<br>
sudo adduser `id -un` libvirtd<br>
sudo adduser `id -un` kvm<br>
<br>
This allows your torify user (and virtual machine) to take advantage of<br>
advanced virtualization features if you have them.<br>
<br>
Part Three: Install and Browse<br>
So you&#39;re almost ready to start browsing via Tor.  First we&#39;ll need to<br>
make a hard drive for your virtual machine. I suggest around 8G<br>
(gigabytes) but you can do more. To make a hard drive of this size in<br>
your current directory, run this command:<br>
qemu-img create -f raw file.disk 8G<br>
<br>
Run this command to start installing your virtual machine. You can<br>
change what&#39;s after -m if you have more or less available memory<br>
(megabytes). Some processors have additional virtualization support.<br>
Instead of using qemu, just try using kvm (same text after the command).<br>
If you get errors or it doesn&#39;t work, you should probably stick with<br>
qemu. Next, run this command to boot your torified operating system.<br>
<br>
qemu -hda file.disk -m 512 -name TorMachine -cdrom<br>
xubuntu-9.04-desktop-i386.iso -boot d<br>
<br>
Select “try xubuntu without any changes..” and then double-click the<br>
install icon on the desktop when it&#39;s loaded. The instructions are<br>
pretty straight-forward. When it asks you for a network proxy, type in<br>
<a href="http://10.0.2.2:8118" target="_blank">http://10.0.2.2:8118</a> so it can grab updates.<br>
<br>
Once Xubuntu is installed, be sure to restart and update everything<br>
before browsing the web. It will automatically notify you of updates. If<br>
it doesn&#39;t notify you of any updates, something may have gone wrong so<br>
manually check by running the command “sudo update-manager”.<br>
<br>
Part Four: Using Your Virtual Machine<br>
Alright, we&#39;re all done setting up your virtual machine. All of your<br>
proxy settings in Xubuntu should be the same as in your host system<br>
except that you should replace 127.0.0.1 with 10.0.2.2. I strongly<br>
suggest installing TorButton and NoScript in your web browser but<br>
allowing scripts is also a possibility.<br>
<br>
Before you start your virtual machine, make sure you&#39;ve applied the<br>
iptables rules and disabled CUPS. Then, use this command from the<br>
directory with your virtual hard drive to start your virtual machine. Go<br>
in and tweak the settings just how you like them.<br>
qemu -hda file.disk -m 512 -name TorMachine<br>
<br>
In the future, if you&#39;re not planning on changing settings, saving<br>
files, etc. or you&#39;re taking the risk of allowing active scripts to run,<br>
make sure you add “-snapshot” to the end of the command you start your<br>
virtual machine with. This will stop your virtual machine from saving<br>
any changes that are made to it, like flash cookies. Changes will be<br>
stored while only you&#39;re using the virtual machine, so when you close it<br>
and re-open it, it&#39;s like starting a fresh system.<br>
<br>
If you have any suggestions for changes to this guide, feedback, or<br>
questions please drop me an email at ringo{at}<a href="http://hackbloc.org" target="_blank">hackbloc.org</a>.<br>
<br>
-----BEGIN PGP PUBLIC KEY BLOCK-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
mQGiBEniUKIRBADfn8kULsRd3si+zPnVbeVp4C/cjxfOxvPURPjRMDPRZPuDuEI5<br>
QIiMP+lZs0Y1BS/zubrwJ/R+knZW0dfkCbd0IBqhtcci4ZiDXRCNxxYow0MysweG<br>
sbZE0QY4T2u40ffOLs9m/ENiDebUxknTyAg8/Jim9aBdEDgurCc7HCX+iwCghfLh<br>
1POMWQRkXB4zUmXQfp+u+0MD/j5SUN6ct6fH4ex3L/WeIHRA+PZXBEpQv5HCwcYO<br>
9VAtS0KYTtrBePXuhabjmiyhWIVsPHa8A+5RW3ONkK4gQ71E7sh2nu44p0rOSVkz<br>
9/ZQiHVCjxZJNhvCsabIFT2/G8OFo2XPnJ0+8Gfluueb5a/HKArUWHIvkws82kQ5<br>
75RJBACJp436/Bvk/CpKDkI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