Question: Hidden Services, Virtual Machines, and iptables

Ringo 2600denver at gmail.com
Wed Jul 8 01:10:59 UTC 2009


Hey Tor users,

My work to write a how-to manual for setting up and securing hidden
services is well underway, but I've got a question that's been getting
at me.

Obviously, hidden services are the 'most secure' when they're run inside
a virtual machine (qemu, vmware, etc. pick your poison). One could
certainly run Tor inside the vm and then have that torrc contain the
instructions for the hidden service. The problem then, is that the vm
has to access the web. We would only want the vm accessing the web IF it
was going through Tor, but we wouldn't want to just route all vm traffic
through the host's Tor client because then you could be running Tor...
over Tor.

One solution would be to create an iptables blacklist (on the host) and
then ban connections to any computers which *aren't* Tor servers. This
seems like it might be a little work to implement and an adversary could
always set up a Tor server if they could hack your hidden service and
remotely execute code (or cause your web server to fetch external content).

Of course, one could always run a hidden service on the host machine and
then redirect all traffic to the vm, but the pitfalls in this are
obvious. You've only got one layer of encryption and any serious
exploits found in Tor could be used against the host machine, revealing
the true IP address of the hidden service. Also, if somebody were forced
to reveal the encryption key to the hard drive, the game would be up as
opposed to running a vm from a deniably-encrypted truecrypt drive that
was mounted remotely via ssh.

Does anybody have any solutions to this dilemma or thoughts on ways to
restructure the model so this isn't a problem?

Also, anybody with hidden service security tips (particularly on
implementing a LAMP server) is welcome to contact me off-list for
obvious reasons. My PGP key is pasted below.

Thanks,
Ringo


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.9 (GNU/Linux)

mQGiBEniUKIRBADfn8kULsRd3si+zPnVbeVp4C/cjxfOxvPURPjRMDPRZPuDuEI5
QIiMP+lZs0Y1BS/zubrwJ/R+knZW0dfkCbd0IBqhtcci4ZiDXRCNxxYow0MysweG
sbZE0QY4T2u40ffOLs9m/ENiDebUxknTyAg8/Jim9aBdEDgurCc7HCX+iwCghfLh
1POMWQRkXB4zUmXQfp+u+0MD/j5SUN6ct6fH4ex3L/WeIHRA+PZXBEpQv5HCwcYO
9VAtS0KYTtrBePXuhabjmiyhWIVsPHa8A+5RW3ONkK4gQ71E7sh2nu44p0r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JruIdNw1rvJSe+uAIYQeBv+rinxzAyL
4f/p/+vvgnfgkEc2G1hLuGTvWMsAAwYP+gIhIgQ6UwQ0Bu1gyRN88Gs9H0fnQ74Z
RmFXDgUtpn1YrFzFfTNegQh8vvgo1pXV4ZDPc0w9Cs8QHrspnkYrvSymAEmwYtGd
nvnAVVROIJfN5d140Z1FJXCgFp/3m2SAX1omYyN3/5WX9ef1uaYWub48kSdqfHlr
xe8Z15nXQ9E6WMgDtP5jXpfCkAnweW6/WSGRrHlRyBUevCTyRSZ4dwtim0GHsls9
VbfDYWJVxiKWdgjtjg+PfsXrdQG2KICEHXprS9/tYCheWaHP4couXVHDPUNMGK/w
HSYXbr0/xA0i0JHpRzVCDweKZ32hgbYkTXp0U7ArBYLtbfpWlB8uWHFFAIS5yJQL
YMwc8/qFCgl5fUGMk4ZLTgbftQo/sfcOAIPQl2nVjhnvzucj8PgBBaJgH9ORTpW6
89zIzOtfXfju0dq4LC6Xj4h6SA/duh8dEiBzewNJ1FwnlrywvaQjsVdx5+5RolAk
gZKcT4hHCj+s2vCAyF5R70rfKkZkKhMuUzEWc4R4AzbkmI1eTtEl/FJVCzBsJRan
HC+YMgCdf2ujTxvBltytpWrs0nvzFVY6+RyihQsqlV6KeOtDBTv38a8Q5gdARK0j
5og+X3SWHW0p29PSKk6a3NeSB08J0wlXsrNOJ/JXlYw/yIifZdgl6fO8V7rPBoQt
xIQB5UKSXj8YiE8EGBECAA8FAkniUKICGwwFCQHhM4AACgkQVRztCIhay+vXkQCf
beWbtPmJOWbXn+9LEaJTqcN73REAn2MmtesdDs24QjWfZeTfc8dyEZ2n
=O0oE
-----END PGP PUBLIC KEY BLOCK-----













More information about the tor-talk mailing list