Let me introduce you to Whonix. 2
Whonix is a free open source operating system 3
that's focused specifically on anonymity, privacy, and security. 4
It uses the TOR anonymity network 5
which we cover in detail in its own section, 6
and it's based on Debian GNU Linux, 7
one of the operating systems I highly recommend, 8
as you should know already by now. 9
Whonix implements security through isolation, 10
which is why it's here in the section on isolation. 11
It's an operating system that specifically 12
uses the principle of isolation to enable security 13
for privacy and anonymity. 14
What does Whonix help you do? 15
Well, it will help you hide your 16
internet service provider assigned IP address, 17
it will prevent your ISP from spying on you, 18
it can prevent websites from identifying you, 19
it can prevent malware from identifying you, 20
and it can help you circumvent censorship. 21
Whonix isn't like the other operating systems 22
and live operating systems we have gone through, 23
in that it is focused on the principle of isolation. 24
The Whonix developers provide a nice summary of what 25
Whonix is and this is what they have to say. 26
Whonix consists of two parts. 27
One solely runs TOR and acts as a gateway, 28
which they call the Whonix Gateway, 29
and which you can see here in VirtualBox. 30
The other, which they call the Whonix Workstation, 31
is on a completely isolated network, 32
only connections through TOR are possible. 33
With Whonix you can use applications 34
and run servers anonymously over the internet. 35
DNS leaks for all intents and purposes are impossible 36
and not even malware with root privileges 37
can find out the user's real internet assigned IP address. 38
So as you can see here, the workstation 39
and the gateway are virtual machines 40
available for download in the OVA format, 41
which is an open standard for packaging 42
and distributing virtual applications. 43
We went through how to use these already 44
in setting up a testing environment. 45
This is where you would download the OVA virtual machines, 46
the workstation and the gateway. 47
So you would need to download 48
and import into VirtualBox 49
and you're good to go for testing out Whonix. 50
You can also download the scripts 51
and install Whonix from source. 52
As you can see here, Whonix works in VirtualBox, KVM and Qubes. 53
Qubes we haven't discussed yet, Qubes we're going to discuss later. 54
For the best security you would use Whonix with Qubes, 55
and then a step down would be to use it with KVM, 56
and a step down further would be to use it with VirtualBox. 57
But there's no reason why you can't use it with VirtualBox for testing it out 58
and having a play with it. 59
VirtualBox is not inherently insecure, 60
it's just that KVM and particularly Qubes 61
are a much more secure solution to put Whonix on. 62
But as I said, we're going to cover Qubes a little bit later on. 63
But no matter what hypervisor you use, 64
it is two virtual machines, it is the gateway here, 65
and it is a workstation here. 66
Let me show you the network configuration, 67
and all of the settings and configurations 68
work straight out of the box because it's an OVA file, 69
so you don't have to change 70
these network settings that I'm about to show you. 71
So if you look here, you can see adapter one is on NAT 72
and adapter two is on internal network 73
and the network name is Whonix. 74
So two network adapters, 75
this one is going on to my local network 76
and therefore will go to the internet because it's assigned DHCP 77
from my router and firewall. 78
And then here is the internal network 79
that is created, called the Whonix network, 80
there is no other network. 81
Now, if we go to the workstation, 82
look at its network settings, 83
and you can see its network adapter is set to be on the Whonix network, 84
the internal network, 85
so the workstation is only connected to the gateway, 86
it is not connected to my local LAN in any way. 87
So as the Whonix gateway name suggests, 88
a gateway is a gateway for the workstation. 89
So let me start the gateway and show you what this looks like. 90
The gateway has to be started first 91
because that creates the TOR connection. 92
So there it's starting. 93
And this is a KDE desktop and it starts to do its initial checks. 94
I’ll install the workstation. 95
And you can see the workstation is also doing its initial checks. 96
I'll show you how that network isolation 97
is configured here on the workstation 98
and there you can see the IP address, 99
10.152.152.11 for the workstation. 100
And for eth1, which is the local VM only network, 101
is the 10.152.152.10 IP address for the gateway, 102
they both have slash 18 subnets. 103
Then if we look at the root, 104
we can see that the workstation has 105
10.152.152.10 as its default gateway, 106
so all traffic is being sent to the gateway. 107
The workstation here is used for your tasks 108
like email, browsing the web, 109
and the gateway's role is to enforce the TOR connection, 110
this is the network isolation. 111
The workstation cannot tell what it's real IP address is, 112
so neither can an adversary 113
who may have happened to hack 114
the workstation via say a browser hack or a phishing attack. 115
Which is why they say leaks are impossible in Whonix 116
and malware with even root privileges 117
cannot find out the user's real IP address, 118
this is the isolation principle. 119
It's not technically impossible, but it is more difficult, 120
because as you can see, any malware that's on here 121
would have to hack this gateway via the network, 122
or find some other way to determine the real IP address, 123
so it's much more difficult. 124
Also because we're using VMs, hardware IDs 125
and Mac addresses are also protected 126
as virtual machines act as isolation 127
from the host and other VMs. 128
So there you are, you can see browsing the web using Tor. 129
Let's have a look at the gateway first, 130
so let's start at the top here. 131
What we're looking at here is something called ARM. 132
It's the anonymizing relay monitor, 133
so it's like a status monitor for TOR and for this gateway. 134
It shows things like resource usage, bandwidth, CPU. 135
It's a little bit like Top but for TOR. 136
So you can see there 137
some data being downloaded from the workstation. 138
If I press M 139
you'll see similar sort of functionality as you do in the TOR browser. 140
So I can create a new identity, I can stop TOR, restart, 141
I can go through the setup wizard 142
and set the gateway up as a relay or bridge or client, 143
that's not going to mean much to you yet unless you understand TOR, 144
but we do cover all this in the section on TOR, 145
so don't worry about that for now. 146
Then you can view the connections, 147
various circuits there that set up, 148
the current configurations, 149
the talk file, talk file is used to configure TOR, 150
again we're going to talk through this later in section on TOR. 151
So that's arm, you can think of it as top for TOR. 152
Next is time sync. 153
TOR requires an accurate time or it will fail to work. 154
Establishing the correct time using standard methods 155
such as an unauthenticated NTP is a potential deanonymizer, 156
so Whonix has to use another method. 157
Whonix uses something called SDW date 158
and this is it now running in order to try and establish the time. 159
When Whonix starts, if it doesn't believe it has the correct time, 160
it will automatically start time sync 161
and as it says here, don't use the internet 162
until time sync has been successful. 163
While waiting for that, there's also Whonix check, 164
this checks the VM, it looks for TOR browser updates, 165
OS updates, Whonix versions, Whonix news, 166
plus a long list of other checks that it does. 167
So we can see there the time sync was good. 168
And this is the Whonix check 169
and you can see here this is warning me 170
that you need to do an app-get update and an app-get dist upgrade 171
in order to get the latest packages from Debian and Whonix. 172
That check happens every time you start the virtual machines. 173
You can make configurations to the talk file using this link here. 174
We cover the talk file in the section on TOR. 175
I've got an extra setting here, Sandbox 1. 176
You can make user firewall setting changes, 177
these are the global settings, 178
and this is where a lot of the gateway’s configuration 179
is as to what it does, 180
whether it's a transparent proxy, on what port, 181
and so on. 182
One of the best things about Whonix 183
is the Whonix gateway itself. 184
Any VM, not just a Whonix workstation, 185
as long as it's configured correctly, 186
could use the Whonix gateway 187
to take advantage of its security features 188
and the torrification of that internet connection. 189
In fact, you don't technically have to be a VM either. 190
If the gateway is configured in a certain way, 191
a physical machine could also use the gateway. 192
If you want to connect your own workstation 193
to the Whonix gateway, 194
then you will need to connect it to the Whonix network, 195
as we saw here. 196
Once it's on the Whonix network, 197
it needs to have the right IP addresses set up. 198
You can use the IP address of the workstation 199
if you're not using the workstation 10.152.152.11, 200
but I believe you can use any IP address that's in that subnet. 201
So for example I've got a workstation with dot 50, 202
it'll need a subnet mask which is slash 18. 203
which translates into 255.255.192.0, 204
your default gateway should be settled obviously as the Whonix gateway 205
which always has this address 10.152.152.10 206
and preferred DNR should also be the same, 207
and then your own custom workstations should work 208
with the Whonix gateway. 209
Your own custom workstation is inferior 210
if you're not using socks proxy. 211
So that's something you're going to have to look into 212
setting up if you want to use your own work station, 213
but that's a more advanced usage of Whonix. 214
And there’s a useful link here for setting up your own workstation, 215
so check that out. 216
What you can see here is a representation 217
of the Whonix workstation here, 218
the Whonix gateway here 219
and then the three hop circuit of the TOR network, 220
first node, second node, third node, and then the destination. 221
The Whonix gateway here 222
acts as both a transparent TOR proxy and a socks proxy. 223
Transparent means that even if downloaded applications 224
aren't configure to use TOR, 225
they will still go through the Whonix gateway 226
and be transparently torrified, 227
transparent as in transparent TOR proxy. 228
This is a good feature, 229
it means you can download and install things that you need 230
and they don't need to be specifically configured to use TOR, 231
they can go through the transparent proxy. 232
But note, all trans proxied apps use the same TOR circuit. 233
As you can see illustrated here, 234
it goes through the same nodes, 235
they'll have the same exit IP address 236
and be seen as the same to the destination. 237
Now, socks proxies on the other hand, 238
is used when an application is specifically 239
configured to use TOR as a proxy. 240
So for example, the proxy settings within the browser. 241
If you look here, these are the socks proxied applications 242
within Whonix and the ports that they use 243
and whether they are preinstalled and preconfigured to use socks. 244
So you can see the TOR browser here 245
is connecting locally on the workstation 246
on port 9150 and is using the socks proxy. 247
If you install Thunderbird, 248
then this will also use a socks proxy. 249
There's also command line apps 250
that you do need to go through TOR, 251
and of course these also go through the socks proxy, 252
so you've got things like wget, curl, 253
aptitude and app get for downloading your apps from the repository, 254
so plenty of preconfigured 255
applications to use as socks proxy. 256
And that's good, because using the socks proxy 257
is better for security 258
because it provides what is called stream isolation, i.e. 259
each application uses a different TOR circuit, as illustrated here. 260
So you can see this one's going that way, 261
this one's going that way, 262
this one's going that way. 263
Therefore, each application going through the socks proxy 264
potentially has a different IP address. 265
Not always, they may have a different circuit, 266
but their exit may be the same. 267
Even so, this protects against identity correlation attacks 268
because of TOR circuit sharing. 269
It is recommended you use a different workstation 270
per alias to prevent correlation attacks. 271
I talk more on correlation attacks in the section on TOR. 272
If you want to get a little bit more advanced with Whonix, 273
it is possible to run Whonix on a physical machine 274
to provide physical isolation, 275
which has its security pros and cons. 276
The Whonix gateway is best to be physically isolated 277
and if you want to know more about that, 278
read here and understand the various options, 279
and the pros and cons if you want to 280
consider going down the physical isolation route. 281
Let's have a look at the workstation now. 282
As I said, this is where you use the internet 283
and you find the TOR browser. 284
You'll find the workstation to be very sparse on applications, 285
this is by design to reduce the possible attack surface. 286
So if you're looking at applications here, 287
you can go through and have a look what they've got. 288
As I said, not too much, 289
but that's by design. 290
But you're able to install any applications that you want, 291
and after installing, it will use the trans proxy 292
unless you specifically configure it to use a socks proxy. 293
You download apps in just the same way as on any other Debian distribution. 294
So for example that's how you install 295
Icedove, Enigmail and Torbirdy, 296
just the same app get or aptitude, there's no restrictions. 297
Check here for what socks proxies might be available 298
for any apps that you might want to install. 299
What's great is that whatever you install, 300
will go through the gateway and it will be torrified, 301
so there's no chance of leaks. 302
With any operating system where TOR 303
isn't happening on a gateway, 304
newly installed applications could leak. 305
This is why it's not advisable to install applications on Tails 306
because the torrification happens within Tails, 307
so you need to specifically configure applications 308
to go through TOR socks proxies 309
or TOR transparent proxies. 310
Let's look at its features list here. 311
So obviously you got a lot of anonymous services, 312
you can do IRC, you can do email, 313
as we said it's based on Debian, which is great. 314
It's also based on TOR, you can use it with VirtualBox, 315
although VirtualBox is not recommended 316
for the most secure configuration. 317
As it says here, you can torrify almost any application, 318
that's one of its major major bonuses, 319
and you can potentially torify any operating system as well. 320
If you set up your own workstation DNSSEC over TOR, 321
encrypted DNS. 322
It's free open source 323
and you have the IP DNS leak protection, 324
which is so important, and the list goes on. 325
Oh yes, it also includes JonDonym 326
and it can also be used for torring anonymizing services 327
through other anonymizing services. 328
We talk about that in its own section. 329
And here it's got some advantages of Whonix, 330
what do we think of these. 331
Install any software package, that's a great feature. 332
That’s a great advantage over live operating systems 333
where you cannot do that. 334
And then all the rest of this is about preventing leaks 335
which again is its main benefit really because of the isolation. 336
Let me read a couple of recommendations 337
from the Whonix site 338
which I think are important for you to know about. 339
So it's recommended that you keep a master copy 340
of Whonix workstation, keep it updated, 341
make regular clean snapshots, but do not edit any settings 342
or install additional software, or use it directly for any activity. 343
Instead, make a clone 344
or use snapshotting, 345
but never mix up clean and unclean states 346
for activities that require anonymity. 347
After importing the VMs, 348
do a first run of the Whonix gateway 349
and workstation virtual machines, securely update it, 350
after that stop and do not browse anywhere 351
or open any unauthenticated 352
communication channel to the internet. 353
Shut down the virtual machines and create snapshots 354
of their clean state before browsing 355
or initiating any connections with the outside world. 356
Note, the only exception to this is running APT 357
which has a guaranteed way 358
of securely downloading and verifying packages. 359
So some important steps there that you should follow.