Last update: March 17, 2019. This website uses cookies. By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent. More information


Operating System Hardening


Debian Security Announcements[edit]

Since Whonix is based on Debian, it takes advantage of all the hard work done by the Debian security team: [1]

Debian takes security very seriously. We handle all security problems brought to our attention and ensure that they are corrected within a reasonable timeframe. Many advisories are coordinated with other free software vendors and are published the same day a vulnerability is made public and we also have a Security Audit team that reviews the archive looking for new or unfixed security bugs.

Experience has shown that "security through obscurity" does not work. Public disclosure allows for more rapid and better solutions to security problems. In that vein, this page addresses Debian's status with respect to various known security holes, which could potentially affect Debian.

Users should consider subscribing to the Debian security announcement mailing list to stay informed about the latest security advisories.

Harden Debian[edit]

Most hardening steps cannot be easily added to Whonix by default. Any major changes require careful research and significant developer/tester effort, otherwise system errors or breakage may occur. This is an open topic and Whonix developers are amenable to suggestions, as improving operating system security is a primary design goal.

Before attempting additional hardening measures below, be sure to fully understood them and apply the steps carefully:

Readers are welcome to add any additional hardening resources to this list.

Hardened Kernels[edit]

The upstream Kernel Self Protection Project (KSPP) [2] was established in 2015 with the goal of introducing more hardening features into mainline Linux. This includes many features found in the Grsecurity patchset, which was publicly available until early 2017. One advantage of KSPP is that users will no longer need to compile and tweak settings to create a secure kernel, as many hardening features become the default over time in various distributions. Up-to-date information on available hardening features can be viewed here.

The Hardened Kernel Project is a collaborative effort between Arch and Gentoo developers who handled Grsecurity packaging in their respective distributions with the goal of accelerating mainlining of the patchset. [3][4]

While kernel hardening is important, it only addresses a subset of security risks. It cannot protect against backdoors or security issues related to design, policy or yet unknown exploit classes.

Harden Software Repositories[edit]

Many operating systems provide multiple repositories. Since the Whonix implementation is based on Debian, these resources provide a suitable introduction for interested readers:

In summary, these resources confirm the main repository receives the most developer attention and security updates. This suggests possible hardening might involve editing /etc/apt/sources.list to strictly limit software to the main repository, while only installing security fixes and no other updates.

Whonix has not implemented this design by default and it is an open research question whether this will actually improve security.

Vulnerabilities at Install Time[edit]


Various installation media expose users to vulnerabilities, and those affected include:

The threat arises because the latest stable releases sometimes contain vulnerable, remotely exploitable applications. These applications are very likely to be used over untrusted networks [5] which are in a position to run man-in-the-middle attacks. One example of this vulnerability was [CVE-2014-6273], which affected apt-get in 2014.

Readers are welcome to help research this issue further, and document sane and effective solutions. [6]

Possible Solutions[edit]

Always Up-to-date Builds[edit]

If Whonix regularly released up-to-date builds, this would be an optimal solution for end users. However, the maintenance effort -- building, testing and uploading -- is resource-intensive and not currently feasible for the Whonix team.

Greater community support is needed for testing proposed Whonix package updates and major new releases, alongside an automated test suite for Whonix.


When using virtual machines, Whonix-Gateway could be configured to use the host apt-cache. Physically-isolated Whonix-Gateways could use an apt-cache running on a separate machine. apt-cacher-ng is an example implementation of such an apt-cache.

This configuration does not anonymize operating system updates by default, which is a big disadvantage. [7] It would be first necessary to determine how to configure apt-cacher-ng on the host to force downloads through Tor.

Eventually Whonix-Workstation could use an apt-cache that is running on Whonix-Gateway. Unfortunately, this would increase the Whonix-Gateway attack surface if/when Whonix-Workstation is compromised. On the other hand, it would decrease the Whonix-Workstation attack surface if/when a vulnerable apt-get is used for downloads over untrusted Tor exit relays.


Another possibility is somehow using apt-offline to complete the initial updates of both Whonix-Gateway and Whonix-Workstation.

Building from Source Code using Current Sources[edit]

Self-created Whonix builds from source code use current sources, thereby solving this problem. Although frozen sources have been deprecated for reasons outlined in Build documentation; using current sources comes with its own issues.


  5. Such as Tor exit relays.
  6. Forum discussion.
  7. This leaks a list of installed packages to ISP-level adversaries and update servers. For example, if a user installed a webserver that is likely to be used to host a hidden web service, then this information would leaked.


Whonix Operating System Hardening wiki page Copyright (C) Amnesia <amnesia at boum dot org>
Whonix Operating System Hardening wiki page Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP <>

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.

No user support in comments. See Support.

Comments will be deleted after some time. Specifically after comments have been addressed in form of wiki enhancements. See Wiki Comments Policy.

Add your comment
Whonix welcomes all comments. If you do not want to be anonymous, register or log in. It is free.

Random News:

Did you know that Whonix could provide protection against backdoors? See Verifiable Builds. Help is wanted and welcomed.

https | (forcing) onion

Share: Twitter | Facebook

This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix, then Edit! Edits are held for moderation.

Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP. Whonix is a trademark. Whonix is a licensee of the Open Invention Network. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix itself. (Why?)

By using our website, you acknowledge that you have read, understood and agreed to our Privacy Policy, Cookie Policy, Terms of Service, and E-Sign Consent. Whonix is provided by ENCRYPTED SUPPORT LP. See Imprint.