Actions

Website and Server Tests

From Whonix



Websitetest.jpg

Introduction[edit]

Security is not a checklist, nor is it simply about having website tests show a lot of green or positive results for features like:

  • SSL certificate
  • HTTP Strict Transport Security (HSTS)
  • Certification Authority Authorization (CAA) Policy
  • Expect-CT header
  • Domain Name System Security Extensions (DNSSEC)
  • Content Security Policy (CSP)
  • Feature-Policy
  • Mail Transfer Agent Strict Transport Security (MTA-STS)
  • SMTP TLS Reporting (TLS-RPT)
  • DNS-based Authentication of Named Entities (DANE)
  • Sender Policy Framework (SPF)
  • DomainKeys Identified Mail (DKIM)
  • Domain-based Message Authentication, Reporting and Conformance (DMARC)
  • Frame Options
  • Cross-Site Scripting (XSS) Protection
  • Content Type Options

While it is nice to have these website or server security features, in a similar fashion to Browser Tests the context is important and there are many false positives.

Website test sites like hardenize.com are helpful tools for website owners to check various security features, but these tests say little about the server's actual security. For instance, tests cannot check if: the kernel, operating system and web applications are fully up-to-date or neglected; SSH is configured for public key authentication only; the server is Kicksecure-hardened; and whether backups are being made and so forth.

For example, at the time of writing the Microsoft website recorded a "C" rating at securityheaders.com. Further, they did not have a CSP and neither DNSSEC nor DANE were configured. Despite this, the Microsoft website is not routinely hacked so malicious software can be uploaded by unauthorized third parties. [1]

As elaborated in the CSP entry on this page, the threat models are nuanced and Whonix ™ does not engage in security theater. While imperfections exist, reasonable efforts are made to improve website security despite constrained resources and developer time. A Comparison of Test Results with Others also helps to put this information into perspective.

For further information on this topic, see here.

Whonix Test Results[edit]

Table: Whonix ™ Test Results

Test Site / Feature Result
Email DANE

Email DANE (SMTP)

DNS-based Authentication of Named Entities (DANE) is a bridge between DNSSEC and TLS. In one possible scenario, DANE can be used for public key pinning, building on an existing publicly-trusted certificate. In another approach, it can be used to completely bypass the CA ecosystem and establish trust using DNSSEC alone. Feature not implemented or disabled

Your server doesn't support this feature.

The whonix.org website does not offer free or paid email accounts. whonix.org only uses email for these purposes:

  • sending emails to wiki editors who signed up to be notified about changes
  • forum email sign-up and notifications
  • Mailing Lists
  • developer accounts

DANE should not be relied upon even if email security was perfect and all DANE tests were passed. It is far safer to use end-to-end encryption methods like OpenPGP or even better, codecrypt.

hardenize.com

Forums:

hstspreload.org
SSL Labs
Website DANE See DANE TLSA References. Quote DANE TLSA (DNS-based Authentication of Named Entities) for whonix.org [archive]:

For now decided not to implement it due to:

  • low adaption
  • no support in major browsers
  • complex, maintenance demanding setup

Content Security Policy (CSP)[edit]

Threat Model[edit]

In simple terms, a Content Security Policy (CSP) defines server instructions for what resources can be loaded by client browsers and from where. The OWASP Foundation [archive] provides more detail:

Is a W3C specification offering the possibility to instruct the client browser from which location and/or which type of resources are allowed to be loaded. To define a loading behavior, the CSP specification use “directive” where a directive defines a loading behavior for a target resource type. Directives can be specified using HTTP response header (a server may send more than one CSP HTTP header field with a given resource representation and a server may send different CSP header field values with different representations of the same resource or with different resources) or HTML Meta tag, the HTTP headers below are defined by the specs:

One use of a CSP is for web server software (like nginx) to tell the visitor's browser (such as Mozilla Firefox) what resources (like HTML, JavaScript and images) to load from which authorized sources. This is an interesting, nuanced threat model. At first sight it appears improbable that a CSP running on web server software can provide additional security for the software itself. However, modern web applications are very complex and prone to software bugs and security vulnerabilities.

Consider the following example. A certain web application might not be functioning as expected due to a bug, or it may even be compromised because an attacker exploited an existing vulnerability. However, a compromised web application does not necessarily lead to a compromise of the web server software (like nginx), let alone a whole server (root) compromise. That is, the web server software might still function according to specifications. Under these conditions, a CSP can limit what the web application -- or more accurately, what the results of the output of the web application processed by the visitor's browser -- can do. For example, a CSP enforced by the web server software can prohibit [2] the browser from loading content from third party websites. In some cases, web application vulnerabilities might be rendered completely harmless or made less useful due to a CSP's ability to contain faulty or compromised web applications. [3]

Another good CSP use case concerns webmail, that is, reading email in a browser. For better security and privacy, all content from third party websites should be prohibited while content from the email provider is allowed. Even if this is in place, it is far safer to follow the Whonix ™ recommendation to avoid webmail entirely, and instead use an email client that has disabled all HTML and scripts (text-only mails).

Forum discussion: Content-Security-Policy now deployed on Whonix websites [archive]

Whonix CSP[edit]

whonix.org has an essential CSP. This is useful for the whonix.org onion domain since it avoids loading resources from the whonix.org clearnet domain and causing browser mixed content warnings. It is also helpful in avoiding clearnet connections for visitors who prefer the onion version of the Whonix ™ website. The reason is modern web applications are not designed for use on multiple domain names with the same database backend and/or for use with onion domains in general.

However, whonix.org does not yet have a CSP without 'unsafe-inline' and 'unsafe-eval' for all web applications:

  • This policy contains 'unsafe-inline' which is dangerous in the script-src directive.
  • This policy contains 'unsafe-eval' which is dangerous in the script-src directive.
  • This policy contains 'unsafe-inline' which is dangerous in the style-src directive.

Users who have NoScript enabled in their browser are unaffected.

Rather than relying on websites to deploy CSP, users should habitually use secure browsers, compartmentalize browsing in different virtual machines (VMs), harden their operating system, use Kicksecure, and utilize NoScript. The widespread and perfect deployment of CSP is unlikely to happen soon, if ever. Kicksecure and Whonix are real efforts aimed at improving security and privacy; limited developer time and resources mean only reasonable efforts are focused on CSP at present.

Whonix CSP Test Results[edit]

Table: Whonix ™ CSP Test Results

Domain Result
Homepage
Forums
Phabricator
Wiki [4]

Adding additional policies can only further restrict the capabilities of the protected resource

gzip[edit]

gzip is only relevant to performance and not security.

The https://onionheaders.website [archive] shows gzip is disabled, but manual checks with curl show it is actually enabled.

To confirm, run curl gzip test instructions [archive].

torsocks curl -H "Accept-Encoding: gzip" --head http://dds6qkxpwdeubwucdiaord2xgbbeyds25rbsgr73tbfpqpt4a6vjwsyd.onion/wiki/Documentation

The output includes the following.

Content-Encoding: gzip

Comparison with Others[edit]

Before making suggestions about features the whonix.org website should implement, please conduct research on much better funded organizations for a fair comparison. [5] See:

See Also[edit]

Footnotes[edit]

  1. The CSP is actually a recommendation for the browser. However, writing the following would be confusing:

    For example a CSP enforced by the web server software can recommend the browser to not load content from external websites and the browser would honor this advice.

  2. Of course it would be better to completely avoid faulty applications or compromises in the first place, but it is impossible to make this judgement in advance.
  3. The following CSP is under consideration; it was previously enabled, so this advice is not current. $wgCSPHeader [archive]

    It is not compatible with $wgUseFileCache

    Wiki users who are not logged in have 1 CSP, the essential CSP (by nginx). (Except for visitors of pages which are not yet cached.)

    Wiki users who are logged in have 2 CSPs, the essential CSP and on top of it the CSP generated by the mediawiki webapp setting $wgCSPHeader.

  4. Limited Whonix ™ resources make some features infeasible.


Fosshost is sponsors Kicksecure stage server Whonix old logo.png
Fosshost About Advertisements

Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki


Follow: 1024px-Telegram 2019 Logo.svg.png Iconfinder Apple Mail 2697658.png Twitter.png Facebook.png Rss.png Reddit.jpg 200px-Mastodon Logotype (Simple).svg.png

Support: 1024px-Telegram 2019 Logo.svg.png Discourse logo.png Matrix logo.svg.png

Donate: Donate Bank Wire Paypal Bitcoin accepted here Monero accepted here Contriute

Whonix donate bitcoin.png Monero donate Whonix.png United Federation of Planets 1000px.png

Twitter-share-button.png Facebook-share-button.png Telegram-share.png link=mailto:?subject=Website Tests&body=https://www.whonix.org/wiki/Website_Tests link=https://reddit.com/submit?url=https://www.whonix.org/wiki/Website_Tests&title=Website Tests link=https://news.ycombinator.com/submitlink?u=https://www.whonix.org/wiki/Website_Tests&t=Website Tests link=https://mastodon.technology/share?message=Website Tests%20https://www.whonix.org/wiki/Website_Tests&t=Website Tests

https link onion link Priority Support | Investors | Professional Support

Whonix | © ENCRYPTED SUPPORT LP | Heckert gnu.big.png Freedom Software / Osi standard logo 0.png Open Source (Why?)

The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.

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.