Open eloquence opened 4 years ago
A balanced approach would still get us quite a reduction in complexity:
securedrop-workstation
TemplateVM for sd-proxy
, consolidating as described in #471; and netvm
to sd-whonix
, which doesn't require its own TemplateVM (due to binddirs storing onion auth info)Since we merged #447, we're customizing the underlying whonix-gw-15
TemplateVM, but perhaps we could avoid that by changing the log aggregation approach (#463).
Given the workstation's limited needs, I think it's feasible to do this with Tor's transparent proxy support (see: TransPort
and maybe MapAddress
in the torrc manual) while using iptables/nftables to lock down requests the securedrop.Proxy
calls can make. Happy to draw up a proposal when you'd like to look at this again.
As one data point, most of my recent updater run failures have been due to update failures specifically on the Whonix templates, usually due to an "Invalid response from proxy: Unable to connect" tinyproxy error. This is with the clearnet repos configured, not the onion service ones. If this is a common experience, it may be more grist for the mill of either simplifying our Whonix config our eliminating the dependency on Whonix altogether.
Connect sd-proxy to the internet directly, but isolate it as best as possible.
sd-proxy
should:
arti
as a "drop-in" replacement for when it supports onion services (with authentication) and we've tested it thoroughly enough to switchsys-firewall
as netvm, but block all outgoing network connections except for TCP by the user debian-tor
and all incoming connections except TCP connections to tor
's SOCKSPort
by localhostsecuredrop-proxy
connect to tor
's SOCKSPort
directly via python-requests
' SOCKS5 proxy supportCreate a new qube called sd-tor
, essentially a simpler version of the Whonix gateway, which acts as a no-GUI netvm that transparently proxies traffic via Tor.
sd-tor
should:
tor
's DNSPort
tor
's TransPort
feature in conjunction with iptables TPROXY
/ nftables' tproxy
to allow regular TCP packets to be routed over TorTransPort
except if they originate with the user debian-tor
There's some overlap between the two so I tried to summarise it, let me know if splitting this up would be helpful:
deb.torproject.org
repository to sd-small-bullseye-template
and install tor
(and …keyring
) (affected repo: securedrop-workstation)sd-tor
(affected repo: securedrop-workstation)sd-whonix
to do the same on sd-tor
(affected repo: securedrop-workstation)/rw/config/firewall/$qubename.rules
if the file exists (affected repo: securedrop-builder → folder: securedrop-workstation-config)tor.service.d/sdw-override.conf
with ConditionalHost=sd-proxy
While removing features (or fortuitous side effects) is hardly ever great, I think the trade-off here is worth it. I'd opt for Option 1. Please note, that would probably affect our threat model, but I think it'd be the setup that is easiest to understand/maintain and most "future proof" for when arti
becomes viable.
In addition, I think there is an argument to be made that Option 1 should really be sd-proxy-dvm
with sd-proxy
being a "named DispVM" (not sure about the terminology here), because really we don't want persistence in every day operation (a mitigation not too dissimilar to Qubes' new default of making sys-usb
disposable)
I am a big +1 on this solely for "decrease the overall complexity of the workstation".
Minor nit: I think we should re-host tor debs for the workstation just like we do for the server. Or just grab them from bullseye-backports, which are kept roughly up to date with new Tor releases.
Regarding Option 1, I realised that we could use Qubes' firewall system for outgoing connections, which I think would be preferable, because it allows us to block access to private network addresses (10/8
, 100.64/10
, 172.16/12
, 192.168/16
subnets) "outside" of sd-proxy
. Blocking outgoing network access per-user (as in, only allow debian-tor
to connect to anything but 127.0.0.1
) would still have to live "inside" the qube though.
Still into this, will probably proceed with an arti
-enhanced proxy, dropping the whonix requirement, once arti
is stable and in general use.
Because
sd-proxy
does not use a browser, there are only limited security benefits in the split VM architecture we currently use to access Tor. The complexity cost is significant. Post-beta, we should consider the advantages and disadvantages of different approaches:1) No change 2) Using a single Whonix-based VM to run the proxy 3) Using a single Debian-based VM to run the proxy and managing Tor access / Firewall rules ourselves 4) Other options