Jump to: navigation, search

Dev/Operating System

< Dev(Redirected from OperatingSystem)

Operating System[edit]

Introduction[edit]

This chapter applies to the host(s), Whonix-Gateway and Whonix-Workstation.

Whonix Example Implementation is currently based on Debian. There were development discussions about switching to BSD, Alpine Linux or other secure operating systems.

Whonix can't protect against malicious code inserted into upstream operating system infrastructure. Debian ensures some chain of trust as it requires contributors to sign commits.

Why don't you use <your favorite most secure operating system> for Whonix?[edit]

Why do you use Debian, and not...

The operating system must have

  • acceptable usability
  • must be somewhat popular, because only that leads to sufficient public scrutiny and enough available documentation.
  • For redistribution of Whonix, there may also not be any legal/trademark issues such as with Ubuntu. (See "Switch from Ubuntu to Debian" chapter below).
  • Must have a secure operating system updater (package manager), i.e. must not fall through the TUF Threat Model (w). Not having a secure updater is very dangerous (w).
  • Source based distributions take a long time for upgrading and installation of packages, which users complain about. The same or even better security characteristics can be reached with deterministic (reproducible) builds.

Debian is a good compromise of security and usability.

By the way, this chapter won't only include examples which fall through Whonix's threat model.

Why not use a minimal Linux distribution? See Why are the Whonix images so big?

There might be more secure operating systems, such as Hardenend Gentoo, but in Patrick's opinion mortal users are unlikely to learn how to use them. More paranoids (and others) are welcome to use them for example as host operating system and leave feedback. Patches/ports welcome! [1]

OpenBSD is recommended against, because it completely falls through the Whonix threat model, see FAQ entry: Why aren't you using OpenBSD, it's the most secure OS ever!!!1!

FreeBSD and OpenWRT have their own FAQ entries you could look into.

Ubuntu isn't used as Whonix-Gateway/Workstation operating system for legal reasons (see below) and was lately negatively perceived due to privacy issues[2], so it's recommended against to use it as host operating system as well.

Mac OS X can not be used for legal reasons. Even if that were not a problem, it's still a proprietary, closed source operating system, We don't like their attitude and how they (not) communicate with the security community. Also also see: Apple Took 3+ Years to Fix FinFisher Trojan Hole.

Alpine Linux on first sight appears to have interesting security features. But they don't package Tor yet. Other than that, we didn't look thoroughly into it.

Fedora yet did not fall through Whonix's threat model and could be considered as host and future or alternative Whonix-Gateway/Workstation operating system. Also Qubes OS, an operating system focusing on security by isolation, is based on Fedora. Started considering it, help welcome, see Dev/Fedora.

Qubes OS as host operating system would is most interesting. For implementation, see Qubes.

Switch from Ubuntu to Debian[edit]

Beginning from 0.4.4, Whonix Example Implementation is based on Debian. Previously it was based on Ubuntu. From technical view, Ubuntu was a good choice, see About Ubuntu if you are interested.

The switch was due to Ubuntu Trademark issues, see About Ubuntu Trademark. The terms are long and complicated. Since Whonix's changes are beyond a remix (as defined by Ubuntu Licensing), Whonix would either to have to ask for a license, which they reserve to revoke. Such a legally insecure state is not acceptable. Or Whonix would have to rebrand Ubuntu. It would be possible in theory, but in practice it would require a lot work to remove all Ubuntu strings. Even new apt mirrors would be required, which is much beyond the manpower of the Whonix project.

Debian is much more free. According to Debian project leader Stefano Zacchiroli (in private mail), there are no trademark issues as long as the derivative does not claim to be Debian. That is easy to fulfill.

Derivatives of Debian are even encouraged to use Debian infrastructure, see Derivatives/Guidelines. Debian even supports derivatives. There is a lot documentation, see Derivatives and even a debian-derivatives mailing list.

About Debian[edit]

General[edit]

Whonix is based on Debian.

Reasons for being based on Debian:

  • stable distribution
  • exists for years
  • will likely still be around in 10 years
  • attempts to sow dissent failed [3]
  • massive architecture support [4]
  • secure package manager
  • As per checksec.sh --kernel, reports good kernel protection: GCC stack protector support, enforce read-only kernel data, restrict /dev/mem and /dev/kmem access are all enabled.
  • http://snapshot.debian.org, hosted and signed by a trusted third party (Debian) [5], allows implementation of robust build scripts [6] and Verifiable Builds
  • config-package-dev allows creation of robust configuration packages
  • grml-debootstrap is a tool that allows creation of bootable raw images
  • Debian is working on ReproducibleBuilds
  • huge knowledgeable community of Debian and their derivative users (stackexchange, debian forums, askubuntu and many more)
  • Debian Developers are very approachable at conferences
  • Tor has ties to Debian.
  • No legal/trademark issues.

Related statements from the FAQ reasoning why Debian is the base for Whonix Example Implementation:

General explanation, why so many distributions are based on Debian:

Also interesting:

Related:

Why is Whonix based on Debian Stable, not Debian Testing?[edit]

  • Sometimes severe bugs are introduced in Debian testing, such as the AppArmor bug, which prevented Tor from starting for everyone until a workaround was applied.
  • Sometimes bugs are introduced which break Whonix's build script, such as this bug related to mount, which breaks grml-debootstrap and therefore Whonix's build script or this kpartx bug.
  • Often other disturbing bugs are introduced, such as the grub bug (not able to reproduce and report upstream yet), non-functional VirtualBox Guest Additions or issues with shared folders.
  • Sometimes packages get entirely removed from Debian testing, such as enigmail wasn't available for a while in Debian testing. This is confusing and constantly creating support requests.
  • Too often, too many packages are upgraded (not just security fixes) (costs lots of time to keep up, bandwidth, system load).
  • obfs3 (obfsproxy 0.2.3) is available again in torproject's repository.
  • Quote, Debian Security FAQ:

If you want to have a secure (and stable) server you are strongly encouraged to stay with stable.

Popularity Contest[edit]

The Debian popularity-contest (popcon) package does not get installed on Whonix. Installing it gets prevented by the anon-banned-packages package.

popcon readme | popcon faq | popcon bugs | popularity contest mailing list | popularity contest mailing list: Drop atime and ctime for privacy reasons possible?

Some privacy considerations and reasons why it's not installed:

  • The connection would obviously need to go over its own Tor circuit (stream isolation). At the moment popcon tries to go through http and if it fails (no internet connectivity) it goes into the mail queue. (sendmail) Sendmail probably works though TransPort, but we don't know if it can be torified for proper stream isolation.
  • (From the popcon readme) "Each popularity-contest host is identified by a random 128bit uuid (MY_HOSTID in /etc/popularity-contest.conf)." - This would allow to enumerate a quite good guess about the amount number of Whonix users. We are not sure if sourceforge could already have an insight about that (due to Whonix News File downloads, see whonixcheck) or about any other negative implications.
  • MY_HOSTID would probably get created at Whonix build time and all Whonix users would have the same MY_HOSTID, which would make it useless. A new MY_HOSTID would have to be created at first boot of Whonix.
  • Popcon runs at a random day. Good.
  • If the machine is powered on: it runs at 6:47, which is bad, because a local adversary (ISP or hotspot) could guess popcon runs over Tor which would likely be a Whonix user.
  • If the machine is powered off at 6:47, it sends the report later, only if anachron is installed. It shouldn't run instantly after powering on, also for fingerprinting reasons. The time would have to be truly randomized.
  • The transmission is not encrypted, see popularity-contest should encrypt contents and it's not planned to encrypt it. Malicious Tor exit relays could modify the transmission, but this is only a minor issue. Such malicious Tor exit relays could send fake transmissions on their own.
  • It's questionable if and if yes, how long Debian will accept popularity contest transmissions from Tor exit relays. There is potential for electoral fraud.

For these reasons it's not a good idea to add popcon to Whonix. If you have suggestions or a different view, please get in contact.

Comparison of Hardening Compile Flags[edit]

Debian jessie:

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/bin/curl

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   /usr/bin/gpg

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/bin/gpg2

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   /bin/sed

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /bin/grep

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/bin/tor

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   /bin/bash

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   /usr/bin/gwenview

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
No RELRO        Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/lib/iceweasel/iceweasel

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Partial RELRO   Canary found      NX enabled    No PIE          No RPATH   No RUNPATH   /usr/lib/icedove/icedove

Securix (a derivative of Hardened Gentoo):

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/bin/curl

Error: Not an ELF file: /usr/bin/gpg: symbolic link to gpg2

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/bin/gpg2

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /bin/sed

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /bin/grep

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/bin/tor

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /bin/bash

TODO
  /usr/bin/gwenview

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/lib64/firefox/firefox

RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      FILE
Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   /usr/lib64/thunderbird/thunderbird

See Also[edit]

Footnotes[edit]

  1. Examples of usability issues.
    emerge firefox
    * There is NOT at least 4 GiB disk space at "/var/tmp/portage/www-client/firefox-31.5.0/temp"
    

    What do do? Increase tmpfs size as per http://wiki.gentoo.org/wiki/Portage_TMPDIR_on_tmpfs.

  2. Privacy in Ubuntu 12.10: Amazon Ads and Data Leaks
  3. Debian is Free. Imagine how much money that must cost proprietary competiors from whom not all of them necessarily play by the law.
  4. Not just i386, amd64 and perhaps arm. Should any platform become "evil", Debian as the universal operating system offers options and is most likely to port to new platforms.
  5. From perspective of Whonix.
  6. Build script won't break due to upstream repository changes.

Random News:

Did you contribute to Whonix? Feel free to add your name and what you did to the Whonix Authorship page.


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.