Jump to: navigation, search

Computer Security Education

(Redirected from Pre Install Advice)



Whonix, with its default settings, may provide better protection than Tor alone. Higher levels of security can be achieved depending on how much you are willing to invest in security practices and procedures. See Documentation.

Safer Upgrades[edit]

If you already have Whonix installed, before performing an upgrade to your current Whonix setup, you are advised to shutdown any running Whonix instance currently attached to the internal virtual network named 'Whonix'. This is required to prevent cross contamination of the new machines you are importing, in the event that a powerful adversary has taken control over the ones currently in use.

Note: This is not required if you intend to create a new virtual network for the machines you are importing.

Tor Browser Bundle[edit]

It is recommended that you always have the latest release of Tor Browser Bundle installed on your host.

The Tor Browser Bundle is great for testing, whether you live in a censored or not and if Tor is blocked by your ISP or not. If you need (private) or (obfuscated) bridges for the Tor Browser Bundle, you will also need them for Whonix. (See Bridges.)

If the Tor Browser Bundle fails to work on your system, Whonix will similarly fail to work. If the Tor Browser unexpectedly stops running in Whonix, you can still use the Tor Browser independently to visit the Whonix Homepage.

Host Security[edit]


If the host system is compromised by Malware[1] so is every virtual machine with Whonix, Tor and all anonymous communication. Malware can see your desktop, everything you type, send and receive Antivirus products and personal firewalls[2] are NOT drop in solutions for a secure host. Malware can often stay undetected and application level personal firewalls are often circumvented [3]. Polymorphic code[4] and Rootkits[5] essentially render Antivirus products helpless. [6] [7]

The optimal scenario is to not get infected by Malware in the first place. Once malicious code has accessed a system, it is next to impossible to contain. This is not to say that Antivirus scanning and firewalls are totally useless, however, refer to them as your very last line of defence. If you do find malware on your system, this only demonstrates that your precautions didn't work. It is the precautions (hardening, secure host operating system, signed software) that are of most importance not the detection.

Using a dedicated host operating system[edit]

It is recommended that you use a dedicated host operating system just for hosting Whonix Virtual Machines. Should your every day operating system already be compromised, Whonix could not provide any additional protection. It's best to have one dedicated host operating system which is used to only host Whonix.

Using Whonix on External Media[edit]

Unfortunately, Whonix does not provide a user friendly USB creator (help welcome!). However, you can install the host operating system(s) required for Whonix on (encrypted) a dedicated external disk(s) such as USB, FireWire, eSATA, etc for futher security. This will reduce the risk of other operating system(s) infecting Whonix's host operating system. You can remove and hide the Whonix disk(s) while they are not in use.

There are a number of guides online explaining how to install Linux on USB. Whonix differs only in that you must install a supported virtualizer and Whonix.

Using your own host[edit]

It is recommended that you only use Whonix on computers you own with no sharing privileges. While other users may be trusted, they might not be equally knowledgeable in computer security. Only one mistake is required for your system to be compromised.

Needless to say, hosting Whonix on your cloud, on a foreign server you do not physically control, on a VPS etc is not recommended. Information on these systems is readily accessible to their owners/regulators.

Using a dedicated host computer[edit]

For the ultimate host security option you should use a dedicated computer just for hosting Whonix. Ideally one, that you never used for anything else before.[8]

Firmware Updates[edit]

This chapter contains general security advice and is unspecific to Whonix.

Due to the hardware and host operating system specificity and difficulty of this topic, it is outside the scope of Whonix documentation. The links provided may not be the most relevant and you may have to research this topic further on your own.

This includes BIOS updates, non-free drivers or firmware and processor microcode updates (on Debian systems, depending on your processor, either the intel-microcode or the amd-microcode package).

Updating firmware may or may not improve security. On one hand you may fix vulnerabilities. On the other hand, an update may introduce a new backdoor. If you know of examples of one of these situations, feel free to edit this chapter. As an end user, you unfortunately have to blindly trust the hardware producer anyway, so it might be better to get the non-Free updates.

(See also the thread on the debian-security mailing list How secure is an installation with no non-free packages?)

Using Libre Software Hardware[edit]

This chapter contains general security advice and is unspecific to Whonix.

Open-source hardware is not affected by the non-Free firmware updates issue described above. Such hardware might be more trustworthy. (Lemote Yeeloong Notebook maybe?)

TODO: research and expand

Disable TCP Timestamps[edit]

Adversaries can remotely access the current uptime of your machine and the host's clock-down to millisecond precision. To avoid this information being passed, it is recommended that you disable TCP timestamps on your systems. The less information attackers can get, the higher the security.

Linux or Qubes[edit]


You can skip this Temporary chapter and move on to #Permanently if you are looking for a permanent solution.

To dynamically disable TCP timestamping on Linux...

(When using Qubes: in the NetVM.)

Become root.

sudo su

Disable TCP timestamping.

echo 0 > /proc/sys/net/ipv4/tcp_timestamps


To make that change permanent...

(If using Qubes OS, make sure the following steps are taken in sys-net VM. Doing it at the dom0 level essentially provides nothing.) (This will be the default in Qubes R3.1 and above.)

Go into Terminal

For Qubes OS, the correct Terminal is located by clicking on the following:

Qubes App Launcher Menu (the grey/blue Q logo) ---> ServiceVM:sys-net ---> sys-net: Terminal

Become root.

sudo su

You need to add the following line to /etc/sysctl.conf or /etc/sysctl.d/tcp_timestamps.conf:

net.ipv4.tcp_timestamps = 0

To do that, you could use the following command.

echo "net.ipv4.tcp_timestamps = 0" > /etc/sysctl.d/tcp_timestamps.conf

Or this one (known to work for Qubes 3.0):

echo "net.ipv4.tcp_timestamps = 0" > /etc/sysctl.conf

To apply the sysctl settings without reboot, run the following command.

sysctl -p

Check if it's really set.

sysctl -a

If it worked correctly, the system should respond the following: net.ipv4.tcp_timestamps = 0


To disable TCP timestamping on Windows, run the following root command:

netsh int tcp set global timestamps=disabled

Note: You must have administrator privileges.

Other Operating Systems[edit]


Disable ICMP Timestamps[edit]


This will be the default in Qubes 3.1 and above.


ICMP Timestamps need to be blocked using your firewall. This is distro dependent and varies widely as does having a firewall enabled on your specific OS - some distros don't turn it on. There are many differing ways to accomplish this via command-line, its recommended to consult your distro's documentation.

Instead for a more straightforward way, you advised to download a GUI front-end to configure your firewall and have it set to silently drop all incoming connections by default, allowing only outgoing traffic from your machine.

Other Operating Systems[edit]

TODO: document.

Host Operating System[edit]

Windows Hosts[edit]

GNU/Linux are both recommended above Windows as host operating system.

Microsoft 'silently' updates users' machines even if they have Windows Update disabled. [9] [10] As well as this, Windows is bundled with a large number of programs that 'phone home' by default. Accordingly, Windows as a host system is not recommended for supporting anonymity. [11] Additional privacy risks have been introduced with Windows 8. One example is the smartscreen filter, which reports to Microsoft what software you are running on your computer. [12] This feature includes a kill switch that can allow Microsoft (or any one with an exploit for this mechanism) to delete programs on your machine without your consent. [13]

Before patching Windows, Microsoft is known to consult with intelligence agencies and provide information on security holes before they inform the public and fixes are produced.[14] Since the NSA also buys security holes from software companies [15] and uses them to gain unauthorized access into computer systems, [16] it is reasonable to assume that the NSA also uses information supplied by Microsoft and that Windows users are at a higher risk.

Microsoft updates use weak cryptographic verification such as MD5 and SHA-1. The CMU Software Engineering Institute said about MD5 in 2009, it "should be considered cryptographically broken and unsuitable for further use". [17] In 2012, the Flame malware exploited the weaknesses in MD5 to fake a Microsoft digital signature. [18]

If you insist on using a Windows host, ensure that Windows was installed from a legitimate source. Not a pirated ISO found online that could include malware. You shouldn't have any pirated software programs, which usually involve running unverified, possibly malicious binary cracks or key generators.

Stick to renowned Open Source software, such as Firefox, Gimp, 7-zip, Libre Office, etc., which is less likely to contain malicious code. Only download over https (SSL) and check the GPG signatures.

GNU/Linux Hosts[edit]

Using GNU/Linux on the host and only using in-repository software is automatically gpg signed and installed from the distributor's repositories by the package manager. This is much safer than downloading stuff from the web like you have to do as a Windows user.

Which host operating system do you recommend?[edit]

Debian GNU/Linux is recommended as a reasonable compromise of security and usability (popularity, documentation). For extra security tips for download, verification and installation see Debian Tips.

There are of course other options. See "Why don't you use <your favorite most secure operating system> for Whonix?" for analysis of alternatives.

LAN/Router Security[edit]

If your Whonix-Gateway is ever compromised, it can theoretically access any computer in your local network. Therefore, if you are the administrator of your home network, it's recommended that you lock down the web interface of your home router, i.e. installing the latest firmware with latest security patches and using a secure password.

Host Firewall[edit]

Having a simple host firewall (gufw - Uncomplicated Firewall[19] on Debian), denying all incoming ports, is recommended as well.

On the host, on Debian.

1. Install gufw.

sudo apt-get update && sudo apt-get install gufw

2. Start gufw


3. Press unlock. Enter password.

4. Press enable.

5. Settings: Incoming: Deny Outgoing: Allow


Does your computer or notebook have a microphone? You could have a built-in one, but never noticed it - mute it, just in case. This chapter only applies to non-USB microphones.

Microphones connected to your host are available to VirtualBox virtual machines such as the Whonix-Workstation. VirtualBox does not yet have a feature to disable microphones inside virtual machines.[20] If your Whonix-Workstation ever gets compromised by malware, an adversary could eavesdrop through your microphone. Unless you plan to use Voip inside Whonix-Workstation, it's recommended to mute your microphone in your host operating system's audio settings. If you do plan to use Voip, you should mute and possibly unplug your microphone after use.

External microphones should be unplugged for ultimate security. If your microphone is built-in and you decide to disable your microphone, you can check the BIOS see find out if the microphone can be disabled. Removing built-in microphones may be a bit more difficult, but if you have the skills to remove it, go for it.


Does your computer or notebook have a webcam? You could have a built-in one, but just never noticed - check your computer's datasheet and operating system hardware manager.

Unless you plan to use a webcam inside Whonix-Workstation, it's recommended to disable or possibly remove your webcam. If you do plan to use a webcam you should disable and possibly unplug your webcam after use.

External webcams should be unplugged for optimal security. If your webcam is built-in and you decide to disable it, you can check the BIOS to find out if the webcam can be disabled. Removing built-in webcams may be a bit more difficult, but if you have the skills to remove it, go for it. Alternatively, cover the webcam externally.

Whonix information[edit]

MAC Address[edit]


All network cards, both wired and wireless, have a unique identifier stored within them called their MAC address[21]. This is used to assign an address to your computer on the local network. This address is not traceable [22]

However, other computers on the local network could log it, which then would provide proof that your computer has been connected to that network. If you are using an untrusted, public network you should consider spoofing[23] it.

Using your home connection[edit]

Changing your MAC address is not required. However, when not using a VM your physical MAC address could be revealed in the case of a browser exploit. If you are already under suspicion, this would eventually provide proof of your identity. When the MAC address has been changed, root access is required to discover the real physical address. (Note: This is yet to be tested)

Consider: If your home network uses a cable modem internet connection, the ISP either provides the cable modem device as part of the service or requires pre-registration of the MAC address of your self-provided cable modem in order to setup your service. If you manage to hack/change the MAC address of the modem, your service would immediately cease functioning (because the IP assignment is apportioned for, and bound to, that specific MAC address). As a result, when connecting from behind a cable modem/NAT router, spoofing the MAC address of your PC's ethernet adapter may be pointless. If you are traced, the trackable endpoint will be the MAC address of your cable modem device.

Using a public computer (e.g. in a library, Internet-cafe)[edit]

The MAC address should not be changed, as it may bring undesired admin attention to your service and/or simply forbid your access to the Internet.

Using a personal computer (e.g. a laptop, wherever it happens) in a public network[edit]

The MAC address should be changed, and /var/lib/tor/state should be removed so that a new set of guards is selected.

It is advisable that the admin not discover the use of Tor on your computer. This depends on your configuration, i.e. perhaps you are using obfsproxy or you tunnel your traffic through SSH/VPN.

Changing the MAC address and being a Tor user, depending on your personal threat model, might be risks for re/visiting that public network.

If you are going to reuse the same public network, you have to decide, if you are going to use the very same MAC address (and set of guards) or if you are going to create a new MAC address. If you suspect that the admin has seen you and logged the MAC, it could be unwise to change the MAC address, since this could be appear suspect. If you believe that public network is adequately public and that you have not bee observed, you might decide to use a new MAC address (popular vendor ID, random/unique second part) each time you use this network.

For more discussion on this rather difficult topic, see Dev/MAC.

Random MAC address[edit]

Using a random MAC address is not recommended. While this might sufficiently confuse some adversaries, it will not defeat skilled adversaries. If you are using a random MAC address, it might happen that the vendor ID of the MAC address is non-existent. Even if it was existent, you might end up with a vendor ID, which has either never been used or not been used in decades. If you are going to spoof your MAC, you have to use a popular vendor ID.

The initial second part of the MAC address may be random/unique.

As yet, we cannot provide detailed instructions on how to create such appropriate MAC addresses. Research is still ongoing.

The reason why MAC changing is not always enabled is that it might cause problems on some networks.

Auto-connect issue[edit]

Apart from the difficulty creating an appropriate MAC address, there are also technical hurdles. All the work of creating this MAC will be futile if you boot your computer and it instantly connects to the public network and spills your MAC address. For Virtual Machine users: your host operating system most likely automatically connects (updates, perhaps time sync). For Physical Isolation users: Whonix-Gateway automatically connects to Tor after start.

Also if you use a USB WiFi device, this might also occur.

Changing MAC address[edit]

For Qubes Hosts[edit]

Qubes users do this in their NetVM. Refer to the Qubes documentation / support. See:

For Linux Hosts[edit]

If you are interested in this with Non-Qubes-Whonix, please press on expand on the right.

Non-Qubes-Whonix means all Whonix platforms except Qubes-Whonix. That includes KVM, VirtualBox and Physical Isolation.

TODO: test and expand, please help!


Standard-Download-Version (Virtual Machine) users

Edit /etc/network/interfaces on the host.

Physical Isolation users

Edit /etc/network/interfaces on Whonix-Gateway


Get Macchanger

apt-get update && apt-get install macchanger


Changing MAC

If instructions 1+ below don't work, you can use the following to manually change the MAC address for your device (eth0, wlan0, etc.):

ifconfig wlan0 down
macchanger -a wlan0
ifconfig wlan0 up
This might also work without macchanger:
ifconfig wlan0 down
ifconfig wlan0 hw ether 00:AA:BB:CC:DD:EE
ifconfig wlan0 up
Or, using iproute2 commands:
ip link set down wlan0
ip link set wlan0 address 00:AA:BB:CC:DD:EE
ip link set up wlan0


Below "iface eth0 inet dhcp" Add

hwaddress ether 00:00....

To automatically randomize the MAC address on boot, if desired, add

pre-up macchanger -e eth0


To prevent automatically bringing up new network interfaces, all that is needed is to uncomment.

auto eth0

Then manually bring up with

sudo ifup eth0


See footnote. [24]

Known bugs[edit]

Check Download page for a list of known bugs.

Most Security[edit]

If you want to learn all of the security concerns that Whonix considers you should, before installing Whonix, read all Whonix Documentation pages. Depending on your security needs, you might also like to consult the Design pages.

What's next?[edit]

After reading and applying Computer Security Education, download, verify and install Whonix. Then read and apply Post Install Advice.


  1. https://en.wikipedia.org/wiki/Malware
  2. https://en.wikipedia.org/wiki/Personal_firewall
  3. https://www.grc.com/lt/leaktest.htm
  4. https://en.wikipedia.org/wiki/Polymorphic_code
  5. https://en.wikipedia.org/wiki/Rootkit
  6. http://arstechnica.com/security/2014/05/antivurus-pioneer-symantec-declares-av-dead-and-doomed-to-failure/
  7. A botnet authors was even writing undefeatable malware and trolling antivirus vendors.
  8. To reduce risks of eventual previous hardware compromised.
  9. http://voices.washingtonpost.com/securityfix/2007/09/microsofts_stealth_update_come.html
  10. http://www.zdnet.com/blog/hardware/confirmation-of-stealth-windows-update/779
  11. https://trac.torproject.org/projects/tor/wiki/doc/TransparentProxyLeaks#Windows
  12. http://log.nadim.cc/?p=78
  13. http://www.pcmag.com/article2/0,2817,2400985,00.asp
  14. https://www.techdirt.com/articles/20130614/02110223467/microsoft-said-to-give-zero-day-exploits-to-us-government-before-it-patches-them.shtml
  15. https://threatpost.com/nsa-bought-exploit-service-from-vupen-contract-shows/102314
  16. http://www.theguardian.com/world/2013/oct/04/tor-attacks-nsa-users-online-anonymity
  17. https://en.wikipedia.org/wiki/MD5#cite_note-11
  18. http://arstechnica.com/security/2012/06/flame-crypto-breakthrough/
  19. https://en.wikipedia.org/wiki/Uncomplicated_Firewall
  20. https://www.virtualbox.org/ticket/12026
  21. https://en.wikipedia.org/wiki/MAC_address
  22. Unless your computer is infected with Malware looking for this number.
  23. https://en.wikipedia.org/wiki/MAC_spoofing


Whonix Computer Security Education wiki page Copyright (C) Amnesia <amnesia at boum dot org>
Whonix Computer Security Education wiki page Copyright (C) 2012 -2014 Patrick Schleizer <adrelanos@riseup.net>

This program comes with ABSOLUTELY NO WARRANTY; for details see the wiki source code.
This is free software, and you are welcome to redistribute it
under certain conditions; see the wiki source code for details.

Random News:

Know iptables? Want to contribute? Check out possible iptables improvements. Say hello in development forum.

Impressum | Datenschutz | Haftungsausschluss

https | (forcing) onion
Share: Twitter | Facebook | Google+
This is a wiki. Want to improve this page? Help welcome, volunteer contributions are happily considered! See Conditions for Contributions to Whonix, then Edit! IP addresses are scrubbed, but editing over Tor is recommended. Edits are held for moderation. Whonix (g+) is a licensee of the Open Invention Network. Unless otherwise noted above, content of this page is copyrighted and licensed under the same Free (as in speech) license as Whonix itself.