Updating the Tor Browser design doc
Georg Koppen

Georg Koppen commited on 2017-03-13 09:23:30
Zeige 1 geänderte Dateien mit 715 Einfügungen und 341 Löschungen.

... ...
@@ -1,9 +1,9 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Design and Implementation of the Tor Browser [DRAFT]</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div class="article"><div class="titlepage"><div><div><h2 class="title"><a id="design"></a>The Design and Implementation of the Tor Browser [DRAFT]</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Mike</span> <span class="surname">Perry</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:mikeperry#torproject org">mikeperry#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Erinn</span> <span class="surname">Clark</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:erinn#torproject org">erinn#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Steven</span> <span class="surname">Murdoch</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:sjmurdoch#torproject org">sjmurdoch#torproject org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">May 6th, 2015</p></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="#idp53435264">1. Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#components">1.1. Browser Component Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="#DesignRequirements">2. Design Requirements and Philosophy</a></span></dt><dd><dl><dt><span class="sect2"><a href="#security">2.1. Security Requirements</a></span></dt><dt><span class="sect2"><a href="#privacy">2.2. Privacy Requirements</a></span></dt><dt><span class="sect2"><a href="#philosophy">2.3. Philosophy</a></span></dt></dl></dd><dt><span class="sect1"><a href="#adversary">3. Adversary Model</a></span></dt><dd><dl><dt><span class="sect2"><a href="#adversary-goals">3.1. Adversary Goals</a></span></dt><dt><span class="sect2"><a href="#adversary-positioning">3.2. Adversary Capabilities - Positioning</a></span></dt><dt><span class="sect2"><a href="#attacks">3.3. Adversary Capabilities - Attacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="#Implementation">4. Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="#proxy-obedience">4.1. Proxy Obedience</a></span></dt><dt><span class="sect2"><a href="#state-separation">4.2. State Separation</a></span></dt><dt><span class="sect2"><a href="#disk-avoidance">4.3. Disk Avoidance</a></span></dt><dt><span class="sect2"><a href="#app-data-isolation">4.4. Application Data Isolation</a></span></dt><dt><span class="sect2"><a href="#identifier-linkability">4.5. Cross-Origin Identifier Unlinkability</a></span></dt><dt><span class="sect2"><a href="#fingerprinting-linkability">4.6. Cross-Origin Fingerprinting Unlinkability</a></span></dt><dt><span class="sect2"><a href="#new-identity">4.7. Long-Term Unlinkability via "New Identity" button</a></span></dt><dt><span class="sect2"><a href="#other-security">4.8. Other Security Measures</a></span></dt></dl></dd><dt><span class="sect1"><a href="#BuildSecurity">5. Build Security and Package Integrity</a></span></dt><dd><dl><dt><span class="sect2"><a href="#idp55327360">5.1. Achieving Binary Reproducibility</a></span></dt><dt><span class="sect2"><a href="#idp55349120">5.2. Package Signatures and Verification</a></span></dt><dt><span class="sect2"><a href="#idp55353648">5.3. Anonymous Verification</a></span></dt><dt><span class="sect2"><a href="#update-safety">5.4. Update Safety</a></span></dt></dl></dd><dt><span class="appendix"><a href="#Transparency">A. Towards Transparency in Navigation Tracking</a></span></dt><dd><dl><dt><span class="sect1"><a href="#deprecate">A.1. Deprecation Wishlist</a></span></dt><dt><span class="sect1"><a href="#idp55389664">A.2. Promising Standards</a></span></dt></dl></dd></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idp53435264"></a>1. Introduction</h2></div></div></div><p>
2
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Design and Implementation of the Tor Browser [DRAFT]</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /></head><body><div class="article"><div class="titlepage"><div><div><h2 class="title"><a id="design"></a>The Design and Implementation of the Tor Browser [DRAFT]</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Mike</span> <span class="surname">Perry</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:mikeperry#torproject org">mikeperry#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Erinn</span> <span class="surname">Clark</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:erinn#torproject org">erinn#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Steven</span> <span class="surname">Murdoch</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:sjmurdoch#torproject org">sjmurdoch#torproject org</a>&gt;</code></p></div></div></div></div><div><div class="author"><h3 class="author"><span class="firstname">Georg</span> <span class="surname">Koppen</span></h3><div class="affiliation"><div class="address"><p><code class="email">&lt;<a class="email" href="mailto:gk#torproject org">gk#torproject org</a>&gt;</code></p></div></div></div></div><div><p class="pubdate">March 10th, 2017</p></div></div><hr /></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="#idm29">1. Introduction</a></span></dt><dd><dl><dt><span class="sect2"><a href="#components">1.1. Browser Component Overview</a></span></dt></dl></dd><dt><span class="sect1"><a href="#DesignRequirements">2. Design Requirements and Philosophy</a></span></dt><dd><dl><dt><span class="sect2"><a href="#security">2.1. Security Requirements</a></span></dt><dt><span class="sect2"><a href="#privacy">2.2. Privacy Requirements</a></span></dt><dt><span class="sect2"><a href="#philosophy">2.3. Philosophy</a></span></dt></dl></dd><dt><span class="sect1"><a href="#adversary">3. Adversary Model</a></span></dt><dd><dl><dt><span class="sect2"><a href="#adversary-goals">3.1. Adversary Goals</a></span></dt><dt><span class="sect2"><a href="#adversary-positioning">3.2. Adversary Capabilities - Positioning</a></span></dt><dt><span class="sect2"><a href="#attacks">3.3. Adversary Capabilities - Attacks</a></span></dt></dl></dd><dt><span class="sect1"><a href="#Implementation">4. Implementation</a></span></dt><dd><dl><dt><span class="sect2"><a href="#proxy-obedience">4.1. Proxy Obedience</a></span></dt><dt><span class="sect2"><a href="#state-separation">4.2. State Separation</a></span></dt><dt><span class="sect2"><a href="#disk-avoidance">4.3. Disk Avoidance</a></span></dt><dt><span class="sect2"><a href="#app-data-isolation">4.4. Application Data Isolation</a></span></dt><dt><span class="sect2"><a href="#identifier-linkability">4.5. Cross-Origin Identifier Unlinkability</a></span></dt><dt><span class="sect2"><a href="#fingerprinting-linkability">4.6. Cross-Origin Fingerprinting Unlinkability</a></span></dt><dt><span class="sect2"><a href="#new-identity">4.7. Long-Term Unlinkability via "New Identity" button</a></span></dt><dt><span class="sect2"><a href="#other-security">4.8. Other Security Measures</a></span></dt></dl></dd><dt><span class="sect1"><a href="#BuildSecurity">5. Build Security and Package Integrity</a></span></dt><dd><dl><dt><span class="sect2"><a href="#idm1010">5.1. Achieving Binary Reproducibility</a></span></dt><dt><span class="sect2"><a href="#idm1042">5.2. Package Signatures and Verification</a></span></dt><dt><span class="sect2"><a href="#idm1049">5.3. Anonymous Verification</a></span></dt><dt><span class="sect2"><a href="#update-safety">5.4. Update Safety</a></span></dt></dl></dd><dt><span class="appendix"><a href="#Transparency">A. Towards Transparency in Navigation Tracking</a></span></dt><dd><dl><dt><span class="sect1"><a href="#deprecate">A.1. Deprecation Wishlist</a></span></dt><dt><span class="sect1"><a href="#idm1090">A.2. Promising Standards</a></span></dt></dl></dd></dl></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm29"></a>1. Introduction</h2></div></div></div><p>
3 3
 
4 4
 This document describes the <a class="link" href="#adversary" title="3. Adversary Model">adversary model</a>,
5 5
 <a class="link" href="#DesignRequirements" title="2. Design Requirements and Philosophy">design requirements</a>, and <a class="link" href="#Implementation" title="4. Implementation">implementation</a>  of the Tor Browser. It is current as of Tor Browser
6
-4.5.
6
+6.5.1.
7 7
 
8 8
   </p><p>
9 9
 
... ...
@@ -25,7 +25,7 @@ Support Release (ESR) Firefox branch</a>. We have a <a class="ulink" href="https
25 25
 against this browser to enhance privacy and security. Browser behavior is
26 26
 additionally augmented through the <a class="ulink" href="https://gitweb.torproject.org/torbutton.git/tree/" target="_top">Torbutton
27 27
 extension</a>, though we are in the process of moving this functionality
28
-into direct Firefox patches. We also <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/tree/browser/app/profile/000-tor-browser.js?h=tor-browser-31.6.0esr-4.5-1" target="_top">change
28
+into direct Firefox patches. We also <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/tree/browser/app/profile/000-tor-browser.js?h=tor-browser-45.8.0esr-6.5-2" target="_top">change
29 29
 a number of Firefox preferences</a> from their defaults.
30 30
 
31 31
    </p><p>
... ...
@@ -38,17 +38,18 @@ Instantbird, and XULRunner.
38 38
 
39 39
 To help protect against potential Tor Exit Node eavesdroppers, we include
40 40
 <a class="ulink" href="https://www.eff.org/https-everywhere" target="_top">HTTPS-Everywhere</a>. To
41
-provide users with optional defense-in-depth against Javascript and other
42
-potential exploit vectors, we also include <a class="ulink" href="https://noscript.net/" target="_top">NoScript</a>. We also modify <a class="ulink" href="https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/Bundle-Data/linux/Data/Browser/profile.default/preferences/extension-overrides.js" target="_top">several
41
+provide users with optional defense-in-depth against JavaScript and other
42
+potential exploit vectors, we also include <a class="ulink" href="http://noscript.net/" target="_top">NoScript</a>. We also modify <a class="ulink" href="https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/Bundle-Data/linux/Data/Browser/profile.default/preferences/extension-overrides.js" target="_top">several
43 43
 extension preferences</a> from their defaults.
44 44
 
45 45
    </p><p>
46 46
 
47 47
 To provide censorship circumvention in areas where the public Tor network is
48 48
 blocked either by IP, or by protocol fingerprint, we include several <a class="ulink" href="https://trac.torproject.org/projects/tor/wiki/doc/AChildsGardenOfPluggableTransports" target="_top">Pluggable
49
-Transports</a> in the distribution. As of this writing, we include <a class="ulink" href="https://gitweb.torproject.org/pluggable-transports/obfs4.git" target="_top">Obfs4proxy</a>,
49
+Transports</a> in the distribution. As of this writing, we include <a class="ulink" href="https://gitweb.torproject.org/pluggable-transports/obfs4.git" target="_top">Obfs3proxy,
50
+Obfs4proxy, Scramblesuit</a>,
50 51
 <a class="ulink" href="https://trac.torproject.org/projects/tor/wiki/doc/meek" target="_top">meek</a>,
51
-<a class="ulink" href="https://fteproxy.org/" target="_top">FTE</a>, and <a class="ulink" href="https://crypto.stanford.edu/flashproxy/" target="_top">FlashProxy</a>.
52
+and <a class="ulink" href="https://fteproxy.org/" target="_top">FTE</a>.
52 53
 
53 54
    </p></div></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="DesignRequirements"></a>2. Design Requirements and Philosophy</h2></div></div></div><p>
54 55
 
... ...
@@ -221,7 +222,7 @@ system-wide and/or operating system provided addons or plugins.
221 222
 Instead of global browser privacy options, privacy decisions should be made
222 223
 <a class="ulink" href="https://wiki.mozilla.org/Privacy/Features/Site-based_data_management_UI" target="_top">per
223 224
 URL bar origin</a> to eliminate the possibility of linkability
224
-between domains. For example, when a plugin object (or a Javascript access of
225
+between domains. For example, when a plugin object (or a JavaScript access of
225 226
 window.plugins) is present in a page, the user should be given the choice of
226 227
 allowing that plugin object for that URL bar origin only. The same
227 228
 goes for exemptions to third party cookie policy, geolocation, and any other
... ...
@@ -239,11 +240,29 @@ avoided. We believe that these addons do not add any real privacy to a proper
239 240
 should be focused on general solutions that prevent tracking by all
240 241
 third parties, rather than a list of specific URLs or hosts.
241 242
      </p><p>
242
-Filter-based addons can also introduce strange breakage and cause usability
243
-nightmares, and will also fail to do their job if an adversary simply
244
-registers a new domain or creates a new URL path. Worse still, the unique
245
-filter sets that each user creates or installs will provide a wealth of
246
-fingerprinting targets.
243
+Implementing filter-based blocking directly into the browser, such as done with
244
+<a class="ulink" href="http://ieee-security.org/TC/SPW2015/W2SP/papers/W2SP_2015_submission_32.pdf" target="_top">
245
+Firefox' Tracking Protection</a>, does not alleviate the concerns mentioned
246
+in the previous paragraph. There is still just a list concerned with specific
247
+URLs and hosts which, in this case, are
248
+<a class="ulink" href="https://services.disconnect.me/disconnect-plaintext.json" target="_top">
249
+assembled</a> by <a class="ulink" href="https://disconnect.me/trackerprotection" target="_top">
250
+Disconnect</a> and <a class="ulink" href="https://github.com/mozilla-services/shavar-list-exceptions" target="_top">adapted</a> by Mozilla.
251
+     </p><p>
252
+Trying to resort to <a class="ulink" href="https://jonathanmayer.org/papers_data/bau13.pdf" target="_top">filter methods based on
253
+machine learning</a> does not solve the problem either: they don't provide
254
+a general solution to the tracking problem as they are working probabilistically.
255
+Even with a precision rate at 99% and a false positive rate at 0.1% trackers
256
+would be missed and sites would be wrongly blocked.
257
+     </p><p>
258
+Filter-based solutions in general can also introduce strange breakage and cause
259
+usability nightmares. Coping with those easily leads to just <a class="ulink" href="https://github.com/mozilla-services/shavar-list-exceptions" target="_top">whitelisting
260
+</a>
261
+the affected domains defeating the purpose of the filter in the first place.
262
+Filters will also fail to do their job if an adversary simply
263
+registers a new domain or <a class="ulink" href="http://ieee-security.org/TC/SPW2015/W2SP/papers/W2SP_2015_submission_24.pdf" target="_top">
264
+creates a new URL path</a>. Worse still, the unique filter sets that each
265
+user creates or installs will provide a wealth of fingerprinting targets.
247 266
       </p><p>
248 267
 
249 268
 As a general matter, we are also generally opposed to shipping an always-on Ad
... ...
@@ -271,7 +290,7 @@ Tor, causing the user to directly connect to an IP of the adversary's
271 290
 choosing.</p></li><li class="listitem"><span class="command"><strong>Correlation of Tor vs Non-Tor Activity</strong></span><p>If direct proxy bypass is not possible, the adversary will likely
272 291
 happily settle for the ability to correlate something a user did via Tor with
273 292
 their non-Tor activity. This can be done with cookies, cache identifiers,
274
-Javascript events, and even CSS. Sometimes the fact that a user uses Tor may
293
+JavaScript events, and even CSS. Sometimes the fact that a user uses Tor may
275 294
 be enough for some authorities.</p></li><li class="listitem"><span class="command"><strong>History disclosure</strong></span><p>
276 295
 The adversary may also be interested in history disclosure: the ability to
277 296
 query a user's history to see if they have issued certain censored search
... ...
@@ -287,7 +306,7 @@ attempt to perform this correlation without the user's explicit consent.
287 306
 
288 307
 Fingerprinting (more generally: "anonymity set reduction") is used to attempt
289 308
 to gather identifying information on a particular individual without the use
290
-of tracking identifiers. If the dissident or whistleblower's timezone is
309
+of tracking identifiers. If the dissident's or whistleblower's timezone is
291 310
 available, and they are using a rare build of Firefox for an obscure operating
292 311
 system, and they have a specific display resolution only used on one type of
293 312
 laptop, this can be very useful information for tracking them down, or at
... ...
@@ -337,7 +356,7 @@ general suspicion.
337 356
 The adversary can perform the following attacks from a number of different
338 357
 positions to accomplish various aspects of their goals. It should be noted
339 358
 that many of these attacks (especially those involving IP address leakage) are
340
-often performed by accident by websites that simply have Javascript, dynamic 
359
+often performed by accident by websites that simply have JavaScript, dynamic
341 360
 CSS elements, and plugins. Others are performed by ad servers seeking to
342 361
 correlate users' activity across different IP addresses, and still others are
343 362
 performed by malicious agents on the Tor network and at national firewalls.
... ...
@@ -367,22 +386,21 @@ These types of attacks are attempts at subverting our <a class="link" href="#ide
367 386
 attributes</strong></span><p>
368 387
 
369 388
 There is an absurd amount of information available to websites via attributes
370
-of the browser. This information can be used to reduce anonymity set, or even
371
-uniquely fingerprint individual users. Attacks of this nature are typically
372
-aimed at tracking users across sites without their consent, in an attempt to
373
-subvert our <a class="link" href="#fingerprinting-linkability" title="4.6. Cross-Origin Fingerprinting Unlinkability">Cross-Origin
389
+of the browser. This information can be used to reduce the anonymity set, or
390
+even uniquely fingerprint individual users. Attacks of this nature are
391
+typically aimed at tracking users across sites without their consent, in an
392
+attempt to subvert our <a class="link" href="#fingerprinting-linkability" title="4.6. Cross-Origin Fingerprinting Unlinkability">Cross-Origin
374 393
 Fingerprinting Unlinkability</a> and <a class="link" href="#new-identity" title="4.7. Long-Term Unlinkability via &quot;New Identity&quot; button">Long-Term Unlinkability</a> design requirements.
375 394
 
376 395
 </p><p>
377 396
 
378
-Fingerprinting is an intimidating
379
-problem to attempt to tackle, especially without a metric to determine or at
380
-least intuitively understand and estimate which features will most contribute
381
-to linkability between visits.
397
+Fingerprinting is an intimidating problem to attempt to tackle, especially
398
+without a metric to determine or at least intuitively understand and estimate
399
+which features will most contribute to linkability between visits.
382 400
 
383 401
 </p><p>
384 402
 
385
-The <a class="ulink" href="https://panopticlick.eff.org/about.php" target="_top">Panopticlick study
403
+The <a class="ulink" href="https://panopticlick.eff.org/about" target="_top">Panopticlick study
386 404
 done</a> by the EFF uses the <a class="ulink" href="https://en.wikipedia.org/wiki/Entropy_%28information_theory%29" target="_top">Shannon
387 405
 entropy</a> - the number of identifying bits of information encoded in
388 406
 browser properties - as this metric. Their <a class="ulink" href="https://wiki.mozilla.org/Fingerprinting#Data" target="_top">result data</a> is
... ...
@@ -409,20 +427,25 @@ usage, and request ordering. Additionally, the use of custom filters such as
409 427
 AdBlock and other privacy filters can be used to fingerprint request patterns
410 428
 (as an extreme example).
411 429
 
412
-     </p></li><li class="listitem"><span class="command"><strong>Inserting Javascript</strong></span><p>
430
+     </p></li><li class="listitem"><span class="command"><strong>Inserting JavaScript</strong></span><p>
413 431
 
414
-Javascript can reveal a lot of fingerprinting information. It provides DOM
432
+JavaScript can reveal a lot of fingerprinting information. It provides DOM
415 433
 objects such as window.screen and window.navigator to extract information
416 434
 about the user agent.
417 435
 
418
-Also, Javascript can be used to query the user's timezone via the
436
+Also, JavaScript can be used to query the user's timezone via the
419 437
 <code class="function">Date()</code> object, <a class="ulink" href="https://www.khronos.org/registry/webgl/specs/1.0/#5.13" target="_top">WebGL</a> can
420 438
 reveal information about the video card in use, and high precision timing
421 439
 information can be used to <a class="ulink" href="http://w2spconf.com/2011/papers/jspriv.pdf" target="_top">fingerprint the CPU and
422
-interpreter speed</a>. In the future, new JavaScript features such as
423
-<a class="ulink" href="http://w3c-test.org/webperf/specs/ResourceTiming/" target="_top">Resource
424
-Timing</a> may leak an unknown amount of network timing related
425
-information.
440
+interpreter speed</a>. JavaScript features such as
441
+<a class="ulink" href="https://www.w3.org/TR/resource-timing/" target="_top">Resource Timing</a>
442
+may leak an unknown amount of network timing related information. And, moreover,
443
+JavaScript is able to
444
+<a class="ulink" href="https://seclab.cs.ucsb.edu/media/uploads/papers/sp2013_cookieless.pdf" target="_top">
445
+extract</a>
446
+<a class="ulink" href="https://www.cosic.esat.kuleuven.be/fpdetective/" target="_top">available</a>
447
+<a class="ulink" href="https://hal.inria.fr/hal-01285470v2/document" target="_top">fonts</a> on a
448
+device with high precision.
426 449
 
427 450
      </p></li><li class="listitem"><span class="command"><strong>Inserting Plugins</strong></span><p>
428 451
 
... ...
@@ -443,7 +466,7 @@ settings of the browser.
443 466
 <a class="ulink" href="https://developer.mozilla.org/En/CSS/Media_queries" target="_top">CSS media
444 467
 queries</a> can be inserted to gather information about the desktop size,
445 468
 widget size, display type, DPI, user agent type, and other information that
446
-was formerly available only to Javascript.
469
+was formerly available only to JavaScript.
447 470
 
448 471
      </p></li></ol></div></li><li class="listitem"><a id="website-traffic-fingerprinting"></a><span class="command"><strong>Website traffic fingerprinting</strong></span><p>
449 472
 
... ...
@@ -454,15 +477,16 @@ node itself.
454 477
      </p><p> The most comprehensive study of the statistical properties of this
455 478
 attack against Tor was done by <a class="ulink" href="http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf" target="_top">Panchenko
456 479
 et al</a>. Unfortunately, the publication bias in academia has encouraged
457
-the production of a number of follow-on attack papers claiming "improved"
458
-success rates, in some cases even claiming to completely invalidate any
459
-attempt at defense. These "improvements" are actually enabled primarily by
460
-taking a number of shortcuts (such as classifying only very small numbers of
461
-web pages, neglecting to publish ROC curves or at least false positive rates,
462
-and/or omitting the effects of dataset size on their results). Despite these
463
-subsequent "improvements", we are skeptical of the efficacy of this attack in
464
-a real world scenario, <span class="emphasis"><em>especially</em></span> in the face of any
465
-defenses.
480
+the production of
481
+<a class="ulink" href="https://blog.torproject.org/blog/critique-website-traffic-fingerprinting-attacks" target="_top">a
482
+number of follow-on attack papers claiming "improved" success rates</a>, in
483
+some cases even claiming to completely invalidate any attempt at defense. These
484
+"improvements" are actually enabled primarily by taking a number of shortcuts
485
+(such as classifying only very small numbers of web pages, neglecting to publish
486
+ROC curves or at least false positive rates, and/or omitting the effects of
487
+dataset size on their results). Despite these subsequent "improvements", we are
488
+skeptical of the efficacy of this attack in a real world scenario,
489
+<span class="emphasis"><em>especially</em></span> in the face of any defenses.
466 490
 
467 491
      </p><p>
468 492
 
... ...
@@ -482,8 +506,8 @@ function of the complexity of the categories</a> you need to classify.
482 506
 In the case of this attack, the key factors that increase the classification
483 507
 complexity (and thus hinder a real world adversary who attempts this attack)
484 508
 are large numbers of dynamically generated pages, partially cached content,
485
-and also the non-web activity of entire Tor network. This yields an effective
486
-number of "web pages" many orders of magnitude larger than even <a class="ulink" href="http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf" target="_top">Panchenko's
509
+and also the non-web activity of the entire Tor network. This yields an
510
+effective number of "web pages" many orders of magnitude larger than even <a class="ulink" href="http://lorre.uni.lu/~andriy/papers/acmccs-wpes11-fingerprinting.pdf" target="_top">Panchenko's
487 511
 "Open World" scenario</a>, which suffered continuous near-constant decline
488 512
 in the true positive rate as the "Open World" size grew (see figure 4). This
489 513
 large level of classification complexity is further confounded by a noisy and
... ...
@@ -529,7 +553,7 @@ has taken place. This adversary motivates our
529 553
 
530 554
 An adversary with arbitrary code execution typically has more power, though.
531 555
 It can be quite hard to really significantly limit the capabilities of such an
532
-adversary. <a class="ulink" href="http://tails.boum.org/contribute/design/" target="_top">The Tails system</a> can
556
+adversary. <a class="ulink" href="https://tails.boum.org/contribute/design/" target="_top">The Tails system</a> can
533 557
 provide some defense against this adversary through the use of readonly media
534 558
 and frequent reboots, but even this can be circumvented on machines without
535 559
 Secure Boot through the use of BIOS rootkits.
... ...
@@ -555,7 +579,7 @@ are typically linked for these cases.
555 579
 Proxy obedience is assured through the following:
556 580
    </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><span class="command"><strong>Firefox proxy settings, patches, and build flags</strong></span><p>
557 581
 
558
-Our <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/tree/browser/app/profile/000-tor-browser.js?h=tor-browser-31.6.0esr-4.5-1" target="_top">Firefox
582
+Our <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/tree/browser/app/profile/000-tor-browser.js?h=tor-browser-45.8.0esr-6.5-2" target="_top">Firefox
559 583
 preferences file</a> sets the Firefox proxy settings to use Tor directly
560 584
 as a SOCKS proxy. It sets <span class="command"><strong>network.proxy.socks_remote_dns</strong></span>,
561 585
 <span class="command"><strong>network.proxy.socks_version</strong></span>,
... ...
@@ -571,9 +595,11 @@ as set the pref <span class="command"><strong>media.peerconnection.enabled</stro
571 595
  </p><p>
572 596
 
573 597
 We also patch Firefox in order to provide several defense-in-depth mechanisms
574
-for proxy safety. Notably, we <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=8c6604d2b776f0d8e33ed9130c5f5b8cf744bac8" target="_top">patch
598
+for proxy safety. Notably, we <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=177e78923b3252a7442160486ec48252a6adb77a" target="_top">patch
575 599
 the DNS service</a> to prevent any browser or addon DNS resolution, and we
576
-also <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=c96c854c0eca21fed1362d1ddd164b657d351795" target="_top">patch
600
+also <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=6e17cef8f3cf61fdabf99e40d5e09a730142d6cd" target="_top">
601
+remove the DNS lookup for the profile lock signature</a>. Furhermore, we
602
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=8197f6ffe58ba167e3bca4230c5721ebcfae55de" target="_top">patch
577 603
 OCSP and PKIX code</a> to prevent any use of the non-proxied command-line
578 604
 tool utility functions from being functional while linked in to the browser.
579 605
 In both cases, we could find no direct paths to these routines in the browser,
... ...
@@ -581,6 +607,36 @@ but it seemed better safe than sorry.
581 607
 
582 608
  </p><p>
583 609
 
610
+For further defense-in-depth we disabled WebIDE because it can bypass proxy
611
+settings for remote debugging, and also because it downloads extensions we
612
+have not reviewed. We
613
+are doing this by setting
614
+<span class="command"><strong>devtools.webide.autoinstallADBHelper</strong></span>,
615
+<span class="command"><strong>devtools.webide.autoinstallFxdtAdapters</strong></span>,
616
+<span class="command"><strong>devtools.webide.enabled</strong></span>, and
617
+<span class="command"><strong>devtools.appmanager.enabled</strong></span> to <span class="command"><strong>false</strong></span>.
618
+Moreover, we removed the Roku Screen Sharing and screencaster code with a
619
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id= ad4abdb2e724fec060063f460604b829c66ea08a" target="_top">
620
+Firefox patch</a> as these features can bypass proxy settings as well.
621
+ </p><p>
622
+Shumway is removed, too, for possible proxy bypass risks. We did this by
623
+backporting a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=d020a4992d8d25baf7dfb5c8b308d80b47a8d312" target="_top">
624
+number</a> <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=98bf6c81b22cb5e4651a5fc060182f27b26c8ee5" target="_top">
625
+of</a> <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=14b723f28a6b1dd78093691013d1bf7d49dc4413" target="_top">Mozilla patches</a>.
626
+Further down on our road to proxy safety we <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=a9e1d8eac28abb364bbfd3adabeae287751a6a8e" target="_top">
627
+disabled the network tickler</a> as it has the capability to send UDP
628
+traffic.
629
+ </p><p>
630
+
631
+Finally, we <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=8e52265653ab223dc5af679f9f0c073b44371fa4" target="_top">
632
+disabled mDNS support</a>, since mDNS uses UDP packets. We also disable
633
+Mozilla's TCPSocket by setting
634
+<span class="command"><strong>dom.mozTCPSocket.enabled</strong></span> to <span class="command"><strong>false</strong></span>. We
635
+<a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/18866" target="_top">intend to
636
+rip out</a> the TCPSocket code in the future to have an even more solid
637
+guarantee that it won't be used by accident.
638
+
639
+ </p><p>
584 640
 During every Extended Support Release transition, we perform <a class="ulink" href="https://gitweb.torproject.org/tor-browser-spec.git/tree/audits" target="_top">in-depth
585 641
 code audits</a> to verify that there were no system calls or XPCOM
586 642
 activity in the source tree that did not use the browser proxy settings.
... ...
@@ -590,12 +646,12 @@ We have verified that these settings and patches properly proxy HTTPS, OCSP,
590 646
 HTTP, FTP, gopher (now defunct), DNS, SafeBrowsing Queries, all JavaScript
591 647
 activity, including HTML5 audio and video objects, addon updates, WiFi
592 648
 geolocation queries, searchbox queries, XPCOM addon HTTPS/HTTP activity,
593
-WebSockets, and live bookmark updates. We have also verified that IPv6
594
-connections are not attempted, through the proxy or otherwise (Tor does not
595
-yet support IPv6). We have also verified that external protocol helpers, such
596
-as SMB URLs and other custom protocol handlers are all blocked.
597
-
598
- </p></li><li class="listitem"><span class="command"><strong>Disabling plugins</strong></span><p>Plugins have the ability to make arbitrary OS system calls and  bypass proxy settings. This includes
649
+WebSockets, and live bookmark updates. We have also verified that external
650
+protocol helpers, such as SMB URLs and other custom protocol handlers are all
651
+blocked.
652
+ </p></li><li class="listitem"><span class="command"><strong>Disabling plugins</strong></span><p>
653
+Plugins, like Flash, have the ability to make arbitrary OS system calls and
654
+<a class="ulink" href="http://decloak.net/" target="_top">bypass proxy settings</a>. This includes
599 655
 the ability to make UDP sockets and send arbitrary data independent of the
600 656
 browser proxy settings.
601 657
  </p><p>
... ...
@@ -611,10 +667,28 @@ restricted from automatic load through Firefox's click-to-play preference
611 667
 
612 668
 In addition, to reduce any unproxied activity by arbitrary plugins at load
613 669
 time, and to reduce the fingerprintability of the installed plugin list, we
614
-also patch the Firefox source code to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=465cb8295db58a6450dc14a593d29372cbebc71d" target="_top">
670
+also patch the Firefox source code to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=09883246904ce4dede9f3c4d4bb8d644aefe9d1d" target="_top">
615 671
 prevent the load of any plugins except for Flash and Gnash</a>. Even for
616
-Flash and Gnash, we also patch Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=e5531b1baa3c96dee7d8d4274791ff393bafd241" target="_top">prevent loading them into the
617
-address space</a> until they are explicitly enabled.
672
+Flash and Gnash, we also patch Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=9a0d506e3655f2fdec97ee4217f354941e39b5b3" target="_top">
673
+prevent loading them into the address space</a> until they are explicitly
674
+enabled.
675
+ </p><p>
676
+With <a class="ulink" href="https://wiki.mozilla.org/GeckoMediaPlugins" target="_top">Gecko Media
677
+Plugins</a> (GMPs) a second type of plugins is available. They are mainly
678
+third party codecs and <a class="ulink" href="https://www.w3.org/TR/encrypted-media/" target="_top">EME</a>
679
+content decryption modules. We currently disable these plugins as they either
680
+can't be built reproducibly or are binary blobs which we are not allowed to
681
+audit (or both). For the EME case we use the <span class="command"><strong>--disable-eme</strong></span>
682
+configure switch and set
683
+<span class="command"><strong>browser.eme.ui.enabled</strong></span>,
684
+<span class="command"><strong>media.gmp-eme-adobe.enabled</strong></span>,
685
+<span class="command"><strong>media.eme.enabled</strong></span>, and
686
+<span class="command"><strong>media.eme.apiVisible</strong></span> to <span class="command"><strong>false</strong></span> to indicate
687
+to the user that this feature is disabled. For GMPs in general we make sure that
688
+the external server is not even pinged for updates/downloads in the first place
689
+by setting <span class="command"><strong>media.gmp-manager.url.override</strong></span> to
690
+<span class="command"><strong>data:text/plain,</strong></span> and avoid any UI with <span class="command"><strong>
691
+media.gmp-provider.enabled</strong></span> set to <span class="command"><strong>false</strong></span>.
618 692
 
619 693
  </p></li><li class="listitem"><span class="command"><strong>External App Blocking and Drag Event Filtering</strong></span><p>
620 694
 
... ...
@@ -642,7 +716,10 @@ bypassing Tor. It is for this reason we disable the addon whitelist
642 716
 before installing addons regardless of the source. We also exclude
643 717
 system-level addons from the browser through the use of
644 718
 <span class="command"><strong>extensions.enabledScopes</strong></span> and
645
-<span class="command"><strong>extensions.autoDisableScopes</strong></span>.
719
+<span class="command"><strong>extensions.autoDisableScopes</strong></span>. Furthermore, we set
720
+<span class="command"><strong>extensions.systemAddon.update.url</strong></span> and <span class="command"><strong>
721
+extensions.hotfix.id</strong></span> to an empty string in order
722
+to avoid the risk of getting extensions installed by Mozilla into Tor Browser.
646 723
 
647 724
   </p></li></ol></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="state-separation"></a>4.2. State Separation</h3></div></div></div><p>
648 725
 
... ...
@@ -655,29 +732,23 @@ system-wide extensions (through the use of
655 732
 disabled, which prevents Flash cookies from leaking from a pre-existing Flash
656 733
 directory.
657 734
 
658
-   </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="disk-avoidance"></a>4.3. Disk Avoidance</h3></div></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55029872"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
735
+   </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="disk-avoidance"></a>4.3. Disk Avoidance</h3></div></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm357"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
659 736
 
660 737
 The User Agent MUST (at user option) prevent all disk records of browser activity.
661
-The user should be able to optionally enable URL history and other history
738
+The user SHOULD be able to optionally enable URL history and other history
662 739
 features if they so desire.
663 740
 
664
-    </blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55031232"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
665
-
666
-We achieve this goal through several mechanisms. First, we set the Firefox
667
-Private Browsing preference
668
-<span class="command"><strong>browser.privatebrowsing.autostart</strong></span>. In addition, four Firefox patches are needed to prevent disk writes, even if
669
-Private Browsing Mode is enabled. We need to
670
-
671
-<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=44b8ae43a83191bbf5161cbdbf399e10c1b943d0" target="_top">prevent
672
-the permissions manager from recording HTTPS STS state</a>, <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=e5abcb28f131aa96e8762212573488d303b3614d" target="_top">prevent
673
-intermediate SSL certificates from being recorded</a>, <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=ee34e122ac2929a7668314483e36e58a88c98c08" target="_top">prevent
674
-the clipboard cache from being written to disk for large pastes</a>, and
675
-<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=c8e357740dd7bafa2a129007f27d2b243e36f4a2" target="_top">prevent
676
-the content preferences service from recording site zoom</a>. We also had
677
-to disable the media cache with the pref <span class="command"><strong>media.cache_size</strong></span>,
678
-to prevent HTML5 videos from being written to the OS temporary directory,
679
-which happened regardless of the private browsing mode setting.
680
-
741
+    </blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm360"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
742
+
743
+     We are working towards this goal through several mechanisms. First, we set
744
+     the Firefox Private Browsing preference
745
+     <span class="command"><strong>browser.privatebrowsing.autostart</strong></span>.
746
+     We also had to disable the media cache with the pref <span class="command"><strong>media.cache_size</strong></span>, to prevent HTML5 videos from being written to the OS temporary directory, which happened regardless of the private browsing mode setting.
747
+     Finally, we needed to disable asm.js as it turns out that
748
+     <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1047105" target="_top">asm.js
749
+     cache entries get written to disk</a> in private browsing mode. This
750
+     is done by setting <span class="command"><strong>javascript.options.asmjs</strong></span> to
751
+     <span class="command"><strong>false</strong></span> (for linkability concerns with asm.js see below).
681 752
     </blockquote></div><div class="blockquote"><blockquote class="blockquote">
682 753
 
683 754
 As an additional defense-in-depth measure, we set the following preferences:
... ...
@@ -699,18 +770,17 @@ auditing work to ensure that yet.
699 770
 
700 771
 For more details on disk leak bugs and enhancements, see the <a class="ulink" href="https://trac.torproject.org/projects/tor/query?keywords=~tbb-disk-leak&amp;status=!closed" target="_top">tbb-disk-leak tag in our bugtracker</a></blockquote></div></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="app-data-isolation"></a>4.4. Application Data Isolation</h3></div></div></div><p>
701 772
 
702
-Tor Browser Bundle MUST NOT cause any information to be written outside of the
703
-bundle directory. This is to ensure that the user is able to completely and
704
-safely remove the bundle without leaving other traces of Tor usage on their
705
-computer.
773
+Tor Browser MUST NOT cause any information to be written outside of the bundle
774
+directory. This is to ensure that the user is able to completely and
775
+safely remove it without leaving other traces of Tor usage on their computer.
706 776
 
707 777
    </p><p>
708 778
 
709
-To ensure TBB directory isolation, we set
779
+To ensure Tor Browser directory isolation, we set
710 780
 <span class="command"><strong>browser.download.useDownloadDir</strong></span>,
711 781
 <span class="command"><strong>browser.shell.checkDefaultBrowser</strong></span>, and
712 782
 <span class="command"><strong>browser.download.manager.addToRecentDocs</strong></span>. We also set the
713
-$HOME environment variable to be the TBB extraction directory.
783
+$HOME environment variable to be the Tor Browser extraction directory.
714 784
    </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="identifier-linkability"></a>4.5. Cross-Origin Identifier Unlinkability</h3></div></div></div><p>
715 785
 
716 786
 The Cross-Origin Identifier Unlinkability design requirement is satisfied
... ...
@@ -733,15 +803,15 @@ the URL bar origin for which browser state exists, possibly with a
733 803
 context-menu option to drill down into specific types of state or permissions.
734 804
 An example of this simplification can be seen in Figure 1.
735 805
 
736
-   </p><div class="figure"><a id="idp55052928"></a><p class="title"><strong>Figure 1. Improving the Privacy UI</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="NewCookieManager.png" align="middle" alt="Improving the Privacy UI" /></div><div class="caption"><p></p>
806
+   </p><div class="figure"><a id="idm393"></a><p class="title"><strong>Figure 1. Improving the Privacy UI</strong></p><div class="figure-contents"><div class="mediaobject" align="center"><img src="NewCookieManager.png" align="middle" alt="Improving the Privacy UI" /></div><div class="caption"><p></p>
737 807
 
738 808
 This example UI is a mock-up of how isolating identifiers to the URL bar
739
-origin can simplify the privacy UI for all data - not just cookies. Once
809
+domain can simplify the privacy UI for all data - not just cookies. Once
740 810
 browser identifiers and site permissions operate on a URL bar basis, the same
741 811
 privacy window can represent browsing history, DOM Storage, HTTP Auth, search
742 812
 form history, login values, and so on within a context menu for each site.
743 813
 
744
-</div></div></div><br class="figure-break" /><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55056352"></a>Identifier Unlinkability Defenses in the Tor Browser</h4></div></div></div><p>
814
+</div></div></div><br class="figure-break" /><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm400"></a>Identifier Unlinkability Defenses in the Tor Browser</h4></div></div></div><p>
745 815
 
746 816
 Unfortunately, many aspects of browser state can serve as identifier storage,
747 817
 and no other browser vendor or standards body has invested the effort to
... ...
@@ -761,45 +831,61 @@ Firefox versions.
761 831
 
762 832
 As a stopgap to satisfy our design requirement of unlinkability, we currently
763 833
 entirely disable 3rd party cookies by setting
764
-<span class="command"><strong>network.cookie.cookieBehavior</strong></span> to 1. We would prefer that
765
-third party content continue to function, but we believe the requirement for 
766
-unlinkability trumps that desire.
834
+<span class="command"><strong>network.cookie.cookieBehavior</strong></span> to <span class="command"><strong>1</strong></span>. We
835
+would prefer that third party content continue to function, but we believe the
836
+requirement for unlinkability trumps that desire.
767 837
 
768
-     </p></li><li class="listitem"><span class="command"><strong>Cache</strong></span><p>
838
+     </p></li><li class="listitem"><span class="command"><strong>Cache</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
839
+        All cache entries MUST be isolated to the URL bar domain.
840
+      </p><p><span class="command"><strong>Implementation Status:</strong></span>
769 841
 
770
-In Firefox, there are actually two distinct caching mechanisms: One for
771
-general content (HTML, Javascript, CSS), and one specifically for images. The
772
-content cache is isolated to the URL bar domain by <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=7c58be929777d386a03e1faaee648909151fd951" target="_top">altering
842
+In Firefox, there are actually several distinct caching mechanisms: One is for
843
+general content (HTML, JavaScript, CSS). That content cache is isolated to the
844
+URL bar domain by <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=9e88ab764b1c9c5d26a398ec6381eef88689929c" target="_top">altering
773 845
 each cache key</a> to include an additional ID that includes the URL bar
774 846
 domain. This functionality can be observed by navigating to <a class="ulink" href="about:cache" target="_top">about:cache</a> and viewing the key used for each cache
775
-entry. Each third party element should have an additional "id=string"
776
-property prepended, which will list the FQDN that was used to source it.
847
+entry. Each third party element should have an additional "string@:"
848
+property prepended, which will list the base domain that was used to source it.
777 849
 
778 850
      </p><p>
779 851
 
780
-Additionally, because the image cache is a separate entity from the content
781
-cache, we had to patch Firefox to also <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=d8b98a75fb200268c40886d876adc19e00b933bf" target="_top">isolate
852
+Additionally, there is the image cache. Because it is a separate entity from
853
+the content cache, we had to patch Firefox to also <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=05749216781d470ab95c2d101dd28ad000d9161f" target="_top">isolate
782 854
 this cache per URL bar domain</a>.
783 855
 
856
+     </p><p>
857
+Furthermore there is the Cache API (CacheStorage). That one is currently not
858
+available in Tor Browser as we do not allow third party cookies and are in
859
+Private Browsing Mode by default.
860
+     </p><p>
861
+Finally, we have the asm.js cache. The cache entry of the sript is (among
862
+others things, like type of CPU, build ID, source characters of the asm.js
863
+module etc.) keyed <a class="ulink" href="https://blog.mozilla.org/luke/2014/01/14/asm-js-aot-compilation-and-startup-performance/" target="_top">to the origin of the script</a>.
864
+Lacking a good solution for binding it to the URL bar domain instead (and given
865
+the storage of asm.js modules in Private Browsing Mode) we decided to disable
866
+asm.js for the time being by setting <span class="command"><strong>javascript.options.asmjs</strong></span> to
867
+<span class="command"><strong>false</strong></span>. It remains to be seen whether keying the cache entry
868
+to the source characters of the asm.js module helps to avoid using it for
869
+cross-origin tracking of users. We did not investigate that yet.
784 870
      </p></li><li class="listitem"><span class="command"><strong>HTTP Authentication</strong></span><p>
785 871
 
786 872
 HTTP Authorization headers can be used to encode <a class="ulink" href="http://jeremiahgrossman.blogspot.com/2007/04/tracking-users-without-cookies.html" target="_top">silent
787 873
 third party tracking identifiers</a>. To prevent this, we remove HTTP
788
-authentication tokens for third party elements through a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=b8ce4a0760759431f146c71184c89fbd5e1a27e4" target="_top">patch
874
+authentication tokens for third party elements through a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=5e686c690cbc33cf3fdf984e6f3d3fe7b4d83701" target="_top">patch
789 875
 to nsHTTPChannel</a>.
790 876
 
791 877
      </p></li><li class="listitem"><span class="command"><strong>DOM Storage</strong></span><p>
792 878
 
793
-DOM storage for third party domains MUST be isolated to the URL bar origin,
879
+DOM storage for third party domains MUST be isolated to the URL bar domain,
794 880
 to prevent linkability between sites. This functionality is provided through a
795
-<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=97490c4a90ca1c43374486d9ec0c5593d5fe5720" target="_top">patch
881
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=20fee895321a7a18e79547e74f6739786558c0e8" target="_top">patch
796 882
 to Firefox</a>.
797 883
 
798 884
      </p></li><li class="listitem"><span class="command"><strong>Flash cookies</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
799 885
 
800 886
 Users should be able to click-to-play flash objects from trusted sites. To
801
-make this behavior unlinkable, we wish to include a settings file for all platforms that disables flash
802
-cookies using the <a class="ulink" href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html" target="_top">Flash
887
+make this behavior unlinkable, we wish to include a settings file for all
888
+platforms that disables flash cookies using the <a class="ulink" href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html" target="_top">Flash
803 889
 settings manager</a>.
804 890
 
805 891
      </p><p><span class="command"><strong>Implementation Status:</strong></span>
... ...
@@ -811,15 +897,14 @@ file on Windows, so Flash remains difficult to enable.
811 897
      </p></li><li class="listitem"><span class="command"><strong>SSL+TLS session resumption</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
812 898
 
813 899
 TLS session resumption tickets and SSL Session IDs MUST be limited to the URL
814
-bar origin.
900
+bar domain.
815 901
 
816 902
      </p><p><span class="command"><strong>Implementation Status:</strong></span>
817 903
 
818
-We currently clear SSL Session IDs upon <a class="link" href="#new-identity" title="4.7. Long-Term Unlinkability via &quot;New Identity&quot; button">New
819
-Identity</a>, we disable TLS Session Tickets via the Firefox Pref
820
-<span class="command"><strong>security.enable_tls_session_tickets</strong></span>. We disable SSL Session
821
-IDs via a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=a01fb747d4b8b24687de538cb6a1304fe27d9d88" target="_top">patch
822
-to Firefox</a>. To compensate for the increased round trip latency from disabling
904
+We disable TLS Session Tickets and SSL Session IDs by
905
+setting <span class="command"><strong>security.ssl.disable_session_identifiers</strong></span> to
906
+<span class="command"><strong>true</strong></span>.
907
+To compensate for the increased round trip latency from disabling
823 908
 these performance optimizations, we also enable
824 909
 <a class="ulink" href="https://tools.ietf.org/html/draft-bmoeller-tls-falsestart-00" target="_top">TLS
825 910
 False Start</a> via the Firefox Pref
... ...
@@ -831,31 +917,31 @@ MUST NOT be reused for that same third party in another URL bar origin.
831 917
 
832 918
      </p><p>
833 919
 
834
-This isolation functionality is provided by the combination of a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=b3ea705cc35b79a9ba27323cb3e32d5d004ea113" target="_top">Firefox
835
-patch to allow SOCKS usernames and passwords</a>, as well as a Torbutton
920
+This isolation functionality is provided by a Torbutton
836 921
 component that <a class="ulink" href="" target="_top">sets
837 922
 the SOCKS username and password for each request</a>. The Tor client has
838 923
 logic to prevent connections with different SOCKS usernames and passwords from
839
-using the same Tor circuit. Firefox has existing logic to ensure that connections with
840
-SOCKS proxies do not re-use existing HTTP Keep-Alive connections unless the
841
-proxy settings match.  We extended this logic to cover SOCKS username and
842
-password authentication, providing us with HTTP Keep-Alive unlinkability.
924
+using the same Tor circuit. Firefox has existing logic to ensure that
925
+connections with SOCKS proxies do not re-use existing HTTP Keep-Alive
926
+connections unless the proxy settings match.
927
+<a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1200802" target="_top">We extended
928
+this logic</a> to cover SOCKS username and password authentication,
929
+providing us with HTTP Keep-Alive unlinkability.
843 930
 
844 931
      </p></li><li class="listitem"><span class="command"><strong>SharedWorkers</strong></span><p>
845 932
 
846 933
 <a class="ulink" href="https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker" target="_top">SharedWorkers</a>
847
-are a special form of Javascript Worker Threads that have a shared scope
848
-between all threads from the same Javascript origin.
849
-     </p><p><span class="command"><strong>Design Goal:</strong></span>
850
-
851
-SharedWorker scope MUST be isolated to the URL bar domain. A SharedWorker
852
-launched from a third party from one URL bar domain MUST NOT have access to
853
-the objects created by that same third party loaded under another URL bar domain.
934
+are a special form of JavaScript Worker threads that have a shared scope between
935
+all threads from the same Javascript origin.
854 936
 
855
-     </p><p><span class="command"><strong>Implementation Status:</strong></span>
937
+     </p><p>
856 938
 
857
-For now, we disable SharedWorkers via the pref
858
-<span class="command"><strong>dom.workers.sharedWorkers.enabled</strong></span>.
939
+The SharedWorker scope MUST be isolated to the URL bar domain. I.e. a
940
+SharedWorker launched from a third party from one URL bar domain MUST NOT have
941
+access to the objects created by that same third party loaded under another URL
942
+bar domain. This functionality is provided by a
943
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=d17c11445645908086c8d0af84e970e880f586eb" target="_top">
944
+Firefox patch</a>.
859 945
 
860 946
      </p></li><li class="listitem"><span class="command"><strong>blob: URIs (URL.createObjectURL)</strong></span><p>
861 947
 
... ...
@@ -867,19 +953,33 @@ web. While this UUID value is neither under control of the site nor
867 953
 predictable, it can still be used to tag a set of users that are of high
868 954
 interest to an adversary.
869 955
 
870
-     </p><p>
956
+      </p><p><span class="command"><strong>Design Goal:</strong></span>
871 957
 
872 958
 URIs created with URL.createObjectURL MUST be limited in scope to the first
873
-party URL bar domain that created them. We provide this isolation in Tor
874
-Browser via a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=0d67ab406bdd3cf095802cb25c081641aa1f0bcc" target="_top">direct
875
-patch to Firefox</a> and disable URL.createObjectURL in the WebWorker
876
-context as a stopgap, due to an edge case with enforcing this isolation in
877
-WebWorkers.
959
+party URL bar domain that created them.
878 960
 
879
-     </p></li><li class="listitem"><span class="command"><strong>SPDY</strong></span><p>
961
+     </p><p><span class="command"><strong>Implementation Status:</strong></span>
962
+
963
+We provide the isolation in Tor Browser via a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=7eb0b7b7a9c7257140ae5683718e82f3f0884f4f" target="_top">direct
964
+patch to Firefox</a>. However, downloads of PDF files via the download button in the PDF viewer <a class="ulink" href="https://bugs.torproject.org/17933" target="_top">are not isolated yet</a>.
965
+
966
+     </p></li><li class="listitem"><span class="command"><strong>SPDY and HTTP/2</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
880 967
 
881
-Because SPDY can store identifiers, it is disabled through the
882
-Firefox preference <span class="command"><strong>network.http.spdy.enabled</strong></span>.
968
+SPDY and HTTP/2 connections MUST be isolated to the URL bar domain. Furthermore,
969
+all associated means that could be used for cross-domain user tracking (alt-svc
970
+headers come to mind) MUST adhere to this design principle as well.
971
+
972
+    </p><p><span class="command"><strong>Implementation status:</strong></span>
973
+
974
+SPDY and HTTP/2 are currently disabled by setting the
975
+Firefox preferences <span class="command"><strong>network.http.spdy.enabled</strong></span>,
976
+<span class="command"><strong>network.http.spdy.enabled.v2</strong></span>,
977
+<span class="command"><strong>network.http.spdy.enabled.v3</strong></span>,
978
+<span class="command"><strong>network.http.spdy.enabled.v3-1</strong></span>,
979
+<span class="command"><strong>network.http.spdy.enabled.http2</strong></span>,
980
+<span class="command"><strong>network.http.spdy.enabled.http2draft</strong></span>,
981
+<span class="command"><strong>network.http.altsvc.enabled</strong></span>, and
982
+<span class="command"><strong>network.http.altsvc.oe</strong></span> to <span class="command"><strong>false</strong></span>.
883 983
 
884 984
      </p></li><li class="listitem"><span class="command"><strong>Automated cross-origin redirects</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
885 985
 
... ...
@@ -926,28 +1026,109 @@ We disable the password saving functionality in the browser as part of our
926 1026
 since users may decide to re-enable disk history records and password saving,
927 1027
 we also set the <a class="ulink" href="http://kb.mozillazine.org/Signon.autofillForms" target="_top">signon.autofillForms</a>
928 1028
 preference to false to prevent saved values from immediately populating
929
-fields upon page load. Since Javascript can read these values as soon as they
1029
+fields upon page load. Since JavaScript can read these values as soon as they
930 1030
 appear, setting this preference prevents automatic linkability from stored passwords.
931 1031
 
932
-     </p></li><li class="listitem"><span class="command"><strong>HSTS supercookies</strong></span><p>
1032
+     </p></li><li class="listitem"><span class="command"><strong>HSTS and HPKP supercookies</strong></span><p>
933 1033
 
934
-An extreme (but not impossible) attack to mount is the creation of <a class="ulink" href="http://www.leviathansecurity.com/blog/archives/12-The-Double-Edged-Sword-of-HSTS-Persistence-and-Privacy.html" target="_top">HSTS
1034
+An extreme (but not impossible) attack to mount is the creation of <a class="ulink" href="http://www.leviathansecurity.com/blog/archives/12-The-Double-Edged-Sword-of-HSTS-Persistence-and-Privacy.html" target="_top">HSTS</a>
1035
+<a class="ulink" href="http://www.radicalresearch.co.uk/lab/hstssupercookies/" target="_top">
935 1036
 supercookies</a>. Since HSTS effectively stores one bit of information per domain
936 1037
 name, an adversary in possession of numerous domains can use them to construct
937 1038
 cookies based on stored HSTS state.
938 1039
 
1040
+      </p><p>
1041
+
1042
+HPKP provides <a class="ulink" href="https://zyan.scripts.mit.edu/presentations/toorcon2015.pdf" target="_top">
1043
+a mechanism for user tracking</a> across domains as well. It allows abusing the
1044
+requirement to provide a backup pin and the option to report a pin validation
1045
+failure. In a tracking scenario every user gets a unique SHA-256 value serving
1046
+as backup pin. This value is sent back after (deliberate) pin validation failures
1047
+working in fact as a cookie.
1048
+
1049
+      </p><p><span class="command"><strong>Design Goal:</strong></span>
1050
+
1051
+HSTS and HPKP MUST be isolated to the URL bar domain.
1052
+
1053
+      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1054
+
1055
+Currently, HSTS and HPKP state is both cleared by <a class="link" href="#new-identity" title="4.7. Long-Term Unlinkability via &quot;New Identity&quot; button">New Identity</a>,
1056
+but we don't defend against the creation and usage of any of these supercookies
1057
+between <span class="command"><strong>New Identity</strong></span> invocations.
1058
+
1059
+      </p></li><li class="listitem"><span class="command"><strong>Broadcast Channels</strong></span><p>
1060
+
1061
+The BroadcastChannel API allows cross-site communication within the same
1062
+origin. However, to avoid cross-origin linkability broadcast channels MUST
1063
+instead be isolated to the URL bar domain.
1064
+
1065
+      </p><p>
1066
+
1067
+We provide the isolation in Tor Browser via a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=3460a38721810b5b7e785e18f202dde20b3434e8" target="_top">direct
1068
+patch to Firefox</a>. If we lack a window for determining the URL bar
1069
+domain (e.g. in some worker contexts) the use of broadcast channels is disabled.
1070
+
1071
+      </p></li><li class="listitem"><span class="command"><strong>OCSP</strong></span><p>
1072
+
1073
+OCSP requests go to Certfication Authorities (CAs) to check for revoked
1074
+certificates. They are sent once the browser is visiting a website via HTTPS and
1075
+no cached results are available. Thus, to avoid information leaks, e.g. to exit
1076
+relays, OCSP requests MUST go over the same circuit as the HTTPS request causing
1077
+them and MUST therefore be isolated to the URL bar domain. The resulting cache
1078
+entries MUST be bound to the URL bar domain as well. This functionality is
1079
+provided by a
1080
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=7eb1568275acd4fdf61359c9b1e97c2753e7b2be" target="_top">Firefox patch</a>.
1081
+
1082
+       </p></li><li class="listitem"><span class="command"><strong>Favicons</strong></span><p>
1083
+
1084
+When visiting a website its favicon is fetched via a request originating from
1085
+the browser itself (similar to the OCSP mechanism mentioned in the previous
1086
+section). Those requests MUST be isolated to the URL bar domain. This
1087
+functionality is provided by a
1088
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=f29f3ff28bbc471ea209d2181770677223c394d1" target="_top">Firefox patch</a>.
1089
+
1090
+      </p></li><li class="listitem"><span class="command"><strong>mediasource: URIs and MediaStreams</strong></span><p>
1091
+
1092
+Much like blob URLs, mediasource: URIs and MediaStreams can be used to tag
1093
+users. Therefore, mediasource: URIs and MediaStreams MUST be isolated to the URL bar domain.
1094
+This functionality is part of a
1095
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=7eb0b7b7a9c7257140ae5683718e82f3f0884f4f" target="_top">Firefox patch</a>
1096
+
1097
+      </p></li><li class="listitem"><span class="command"><strong>Speculative and prefetched connections</strong></span><p>
1098
+
1099
+Firefox provides the feature to <a class="ulink" href="https://www.igvita.com/2015/08/17/eliminating-roundtrips-with-preconnect/" target="_top">connect speculatively</a> to
1100
+remote hosts if that is either indicated in the HTML file (e.g. by
1101
+<a class="ulink" href="https://w3c.github.io/resource-hints/" target="_top">link
1102
+rel="preconnect" and rel="prefetch"</a>) or otherwise deemed beneficial.
1103
+
1104
+      </p><p>
1105
+
1106
+Firefox does not support rel="prerender", and Mozilla has disabled speculative
1107
+connections and rel="preconnect" usage where a proxy is used (see <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/18762#comment:3" target="_top"> comment
1108
+3 in bug 18762</a> for further details). Explicit prefetching via the
1109
+rel="prefetch" attribute is still performed, however.
1110
+
939 1111
       </p><p><span class="command"><strong>Design Goal:</strong></span>
940 1112
 
941
-There appears to be three options for us: 1. Disable HSTS entirely, and rely
942
-instead on HTTPS-Everywhere to crawl and ship rules for HSTS sites. 2.
943
-Restrict the number of HSTS-enabled third parties allowed per URL bar origin.
944
-3. Prevent third parties from storing HSTS rules. We have not yet decided upon
945
-the best approach.
1113
+All pre-loaded links and speculative connections MUST be isolated to the URL
1114
+bar domain, if enabled. This includes isolating both Tor circuit use, as well
1115
+as the caching and associate browser state for the prefetched resource.
1116
+
1117
+      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1118
+
1119
+For automatic speculative connects and rel="preconnect", we leave them
1120
+disabled as per the Mozilla default for proxy settings. However, if enabled,
1121
+speculative connects will be isolated to the proper first party Tor circuit by
1122
+the same mechanism as is used for HTTP Keep-alive. This is true for rel="prefetch"
1123
+requests as well. For rel="preconnect", we isolate them <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=9126303651785d02f2df0554f391fffba0b0a00e" target="_top">via
1124
+this patch</a>. This isolation makes both preconnecting and cache warming
1125
+via rel=prefetch ineffective for links to domains other than the current URL
1126
+bar domain. For links to the same domain as the URL bar domain, the full cache
1127
+warming benefit is obtained. As an optimization, any preconnecting to domains
1128
+other than the current URL bar domain can thus be disabled (perhaps with the
1129
+exception of frames), but we do not do this. We allow these requests to
1130
+proceed, but we isolate them.
946 1131
 
947
-      </p><p><span class="command"><strong>Implementation Status:</strong></span> Currently, HSTS state is
948
-cleared by <a class="link" href="#new-identity" title="4.7. Long-Term Unlinkability via &quot;New Identity&quot; button">New Identity</a>, but we don't
949
-defend against the creation of these cookies between <span class="command"><strong>New
950
-Identity</strong></span> invocations.
951 1132
       </p></li></ol></div><p>
952 1133
 For more details on identifier linkability bugs and enhancements, see the <a class="ulink" href="https://trac.torproject.org/projects/tor/query?keywords=~tbb-linkability&amp;status=!closed" target="_top">tbb-linkability tag in our bugtracker</a>
953 1134
   </p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="fingerprinting-linkability"></a>4.6. Cross-Origin Fingerprinting Unlinkability</h3></div></div></div><p>
... ...
@@ -961,7 +1141,7 @@ vectors. Passive fingerprinting makes use of any information the browser
961 1141
 provides automatically to a website without any specific action on the part of
962 1142
 the website. Active fingerprinting makes use of any information that can be
963 1143
 extracted from the browser by some specific website action, usually involving
964
-Javascript.  Some definitions of browser fingerprinting also include
1144
+JavaScript. Some definitions of browser fingerprinting also include
965 1145
 supercookies and cookie-like identifier storage, but we deal with those issues
966 1146
 separately in the <a class="link" href="#identifier-linkability" title="4.5. Cross-Origin Identifier Unlinkability">preceding section on
967 1147
 identifier linkability</a>.
... ...
@@ -1022,7 +1204,7 @@ features behind site permissions, or disable them entirely.
1022 1204
 On the other hand, because statistical inference of system performance
1023 1205
 requires many iterations to achieve accuracy in the face of noise and
1024 1206
 concurrent activity, we are less concerned with this mechanism of extracting
1025
-this information. We also expect that reducing the resolution of Javascript's
1207
+this information. We also expect that reducing the resolution of JavaScript's
1026 1208
 time sources will significantly increase the duration of execution required to
1027 1209
 extract accurate results, and thus make statistical approaches both
1028 1210
 unattractive and highly noticeable due to excessive resource consumption.
... ...
@@ -1046,22 +1228,22 @@ it is important to mention that users themselves theoretically might be
1046 1228
 fingerprinted through their behavior while interacting with a website. This
1047 1229
 behavior includes e.g. keystrokes, mouse movements, click speed, and writing
1048 1230
 style. Basic vectors such as keystroke and mouse usage fingerprinting can be
1049
-mitigated by altering Javascript's notion of time. More advanced issues like
1231
+mitigated by altering JavaScript's notion of time. More advanced issues like
1050 1232
 writing style fingerprinting are the domain of <a class="ulink" href="https://github.com/psal/anonymouth/blob/master/README.md" target="_top">other tools</a>.
1051 1233
 
1052 1234
       </p></li><li class="listitem"><span class="command"><strong>Browser Vendor and Version Differences</strong></span><p>
1053 1235
 
1054 1236
 Due to vast differences in feature set and implementation behavior even
1055
-between different versions of the same browser, browser vendor and version
1056
-differences are simply not possible to conceal in any realistic way. It
1057
-is only possible to minimize the differences among different installations of
1058
-the same browser vendor and version. We make no effort to mimic any other
1059
-major browser vendor, and in fact most of our fingerprinting defenses serve to
1060
-differentiate Tor Browser users from normal Firefox users. Because of this,
1061
-any study that lumps browser vendor and version differences into its analysis
1062
-of the fingerprintability of a population is largely useless for evaluating
1063
-either attacks or defenses. Unfortunately, this includes popular large-scale
1064
-studies such as <a class="ulink" href="https://panopticlick.eff.org/" target="_top">Panopticlick</a> and <a class="ulink" href="https://amiunique.org/" target="_top">Am I Unique</a>.
1237
+between different (<a class="ulink" href="https://tsyrklevich.net/2014/10/28/abusing-strict-transport-security/" target="_top">minor</a>)
1238
+versions of the same browser, browser vendor and version differences are simply
1239
+not possible to conceal in any realistic way. It is only possible to minimize
1240
+the differences among different installations of the same browser vendor and
1241
+version. We make no effort to mimic any other major browser vendor, and in fact
1242
+most of our fingerprinting defenses serve to differentiate Tor Browser users
1243
+from normal Firefox users. Because of this, any study that lumps browser vendor
1244
+and version differences into its analysis of the fingerprintability of a
1245
+population is largely useless for evaluating either attacks or defenses.
1246
+Unfortunately, this includes popular large-scale studies such as <a class="ulink" href="https://panopticlick.eff.org/" target="_top">Panopticlick</a> and <a class="ulink" href="https://amiunique.org/" target="_top">Am I Unique</a>.
1065 1247
 
1066 1248
       </p></li></ol></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="fingerprinting-defenses-general"></a>General Fingerprinting Defenses</h4></div></div></div><p>
1067 1249
 
... ...
@@ -1077,11 +1259,11 @@ work best with.
1077 1259
 
1078 1260
     </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><span class="command"><strong>Value Spoofing</strong></span><p>
1079 1261
 
1080
-Value spoofing can be used for simple cases where the browser directly
1081
-provides some aspect of the user's configuration details, devices, hardware,
1082
-or operating system directly to a website. It becomes less useful when the
1083
-fingerprinting method relies on behavior to infer aspects of the hardware or
1084
-operating system, rather than obtain them directly.
1262
+Value spoofing can be used for simple cases where the browser provides some
1263
+aspect of the user's configuration details, devices, hardware, or operating
1264
+system directly to a website. It becomes less useful when the fingerprinting
1265
+method relies on behavior to infer aspects of the hardware or operating system,
1266
+rather than obtain them directly.
1085 1267
 
1086 1268
      </p></li><li class="listitem"><span class="command"><strong>Subsystem Modification or Reimplementation</strong></span><p>
1087 1269
 
... ...
@@ -1124,7 +1306,7 @@ narrow domain or use case, or when there are alternate ways of accomplishing
1124 1306
 the same task, these features and/or certain aspects of their functionality
1125 1307
 may be simply removed.
1126 1308
 
1127
-   </p></li></ol></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55149888"></a>Strategies for Defense: Randomization versus Uniformity</h4></div></div></div><p>
1309
+   </p></li></ol></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm608"></a>Strategies for Defense: Randomization versus Uniformity</h4></div></div></div><p>
1128 1310
 
1129 1311
 When applying a form of defense to a specific fingerprinting vector or source,
1130 1312
 there are two general strategies available: either the implementation for all
... ...
@@ -1230,10 +1412,10 @@ third party software), as well as their internal functionality.
1230 1412
      </p><p><span class="command"><strong>Design Goal:</strong></span>
1231 1413
 
1232 1414
 All plugins that have not been specifically audited or sandboxed MUST be
1233
-disabled. To reduce linkability potential, even sandboxed plugins should not
1415
+disabled. To reduce linkability potential, even sandboxed plugins SHOULD NOT
1234 1416
 be allowed to load objects until the user has clicked through a click-to-play
1235
-barrier.  Additionally, version information should be reduced or obfuscated
1236
-until the plugin object is loaded. For flash, we wish to <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/3974" target="_top">provide a
1417
+barrier. Additionally, version information SHOULD be reduced or obfuscated
1418
+until the plugin object is loaded. For Flash, we wish to <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/3974" target="_top">provide a
1237 1419
 settings.sol file</a> to disable Flash cookies, and to restrict P2P
1238 1420
 features that are likely to bypass proxy settings. We'd also like to restrict
1239 1421
 access to fonts and other system information (such as IP address and MAC
... ...
@@ -1255,8 +1437,8 @@ leaking plugin installation information.
1255 1437
 
1256 1438
 After plugins and plugin-provided information, we believe that the <a class="ulink" href="https://developer.mozilla.org/en-US/docs/HTML/Canvas" target="_top">HTML5
1257 1439
 Canvas</a> is the single largest fingerprinting threat browsers face
1258
-today. <a class="ulink" href="http://www.w2spconf.com/2012/papers/w2sp12-final4.pdf" target="_top">Initial
1259
-studies</a> show that the Canvas can provide an easy-access fingerprinting
1440
+today. <a class="ulink" href="https://cseweb.ucsd.edu/~hovav/dist/canvas.pdf" target="_top">
1441
+Studies</a> <a class="ulink" href="https://securehomes.esat.kuleuven.be/~gacar/persistent/the_web_never_forgets.pdf" target="_top">show</a> that the Canvas can provide an easy-access fingerprinting
1260 1442
 target: The adversary simply renders WebGL, font, and named color data to a
1261 1443
 Canvas element, extracts the image buffer, and computes a hash of that image
1262 1444
 data. Subtle differences in the video card, font packs, and even font and
... ...
@@ -1271,10 +1453,12 @@ fingerprinting vectors. If WebGL is normalized through software rendering,
1271 1453
 system colors were standardized, and the browser shipped a fixed collection of
1272 1454
 fonts (see later points in this list), it might not be necessary to create a
1273 1455
 canvas permission. However, until then, to reduce the threat from this vector,
1274
-we have patched Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=6a169ef0166b268b1a27546a17b3d7470330917d" target="_top">prompt before returning valid image data</a> to the Canvas APIs,
1275
-and for <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=7d51acca6383732480b49ccdb5506ad6fb92e651" target="_top">access to isPointInPath and related functions</a>.
1456
+we have patched Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=526e6d0bc5c68d8c409cbaefc231c71973d949cc" target="_top">prompt before returning valid image data</a> to the Canvas APIs,
1457
+and for access to isPointInPath and related functions. Moreover, we put media
1458
+streams on a canvas behind the site permission in that patch as well.
1276 1459
 If the user hasn't previously allowed the site in the URL bar to access Canvas
1277
-image data, pure white image data is returned to the Javascript APIs.
1460
+image data, pure white image data is returned to the JavaScript APIs.
1461
+Extracting canvas image data by third parties is not allowed, though.
1278 1462
 
1279 1463
      </p><p>
1280 1464
      </p></li><li class="listitem"><span class="command"><strong>Open TCP Port and Local Network Fingerprinting</strong></span><p>
... ...
@@ -1336,49 +1520,51 @@ it via the pref <span class="command"><strong>dom.gamepad.enabled</strong></span
1336 1520
 According to the Panopticlick study, fonts provide the most linkability when
1337 1521
 they are provided as an enumerable list in file system order, via either the
1338 1522
 Flash or Java plugins. However, it is still possible to use CSS and/or
1339
-Javascript to query for the existence of specific fonts. With a large enough
1523
+JavaScript to query for the existence of specific fonts. With a large enough
1340 1524
 pre-built list to query, a large amount of fingerprintable information may
1341 1525
 still be available, especially given that additional fonts often end up
1342 1526
 installed by third party software and for multilingual support.
1343 1527
 
1344
-     </p><p><span class="command"><strong>Design Goal:</strong></span> The sure-fire way to address font
1345
-linkability is to ship the browser with a font for every language, typeface,
1346
-and style, and to only use those fonts at the exclusion of system fonts. We are
1347
-<a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/13313" target="_top">currently
1348
-investigating</a> this approach, and our current favorite font sets for
1349
-this purpose are the <a class="ulink" href="http://www.droidfonts.com/droidfonts/" target="_top">Droid
1350
-fonts</a>, the <a class="ulink" href="http://hangeul.naver.com/" target="_top">Nanum fonts</a>,
1351
-and <a class="ulink" href="https://fedorahosted.org/lohit/" target="_top">Lohit fonts</a>. The Droid
1352
-font set is fairly complete by itself, but Nanum and Lohit have smaller
1353
-versions of many South Asian languages. When combined in a way that chooses the
1354
-smallest font implementations for each locale, these three font sets provide
1355
-coverage for the all languages used on Wikipedia with more than
1356
-10,000 articles, and several others as well, in approximately 3MB of compressed
1357
-overhead. The <a class="ulink" href="https://www.google.com/get/noto/" target="_top">Noto font
1358
-set</a> is another font set that aims for complete coverage, but is
1359
-considerably larger than the combination of the Droid, Nanum, and Lohit fonts.
1528
+     </p><p><span class="command"><strong>Design Goal:</strong></span>Font-based fingerprinting MUST be rendered ineffective</p><p><span class="command"><strong>Implementation Status:</strong></span>
1360 1529
 
1361
-     </p><p><span class="command"><strong>Implementation Status:</strong></span>
1530
+We <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/13313" target="_top">investigated
1531
+</a>shipping a predefined set of fonts to all of our users allowing only
1532
+those fonts to be used by websites at the exclusion of system fonts. We are
1533
+currently following this approach, which has been <a class="ulink" href="https://www.bamsoftware.com/papers/fontfp.pdf" target="_top">
1534
+suggested</a> <a class="ulink" href="https://cseweb.ucsd.edu/~hovav/dist/canvas.pdf" target="_top">by
1535
+researchers</a> previously. This defense is available for all three
1536
+supported platforms: Windows, macOS, and Linux, although the implementations
1537
+vary in detail.
1538
+
1539
+     </p><p>
1362 1540
 
1363
-In the meantime while we investigate shipping our own fonts, we disable
1364
-plugins, which prevents font name enumeration. Additionally, we limit both the
1365
-number of font queries from CSS, as well as the total number of fonts that can
1366
-be used in a document <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=e78bc05159a79c1358fa9c64e565af9d98c141ee" target="_top">with
1367
-a Firefox patch</a>. We create two prefs,
1368
-<span class="command"><strong>browser.display.max_font_attempts</strong></span> and
1369
-<span class="command"><strong>browser.display.max_font_count</strong></span> for this purpose. Once these
1370
-limits are reached, the browser behaves as if
1371
-<span class="command"><strong>browser.display.use_document_fonts</strong></span> was set.
1541
+For Windows and macOS we use a preference, <span class="command"><strong>font.system.whitelist</strong></span>,
1542
+to restrict fonts being used to those in the whitelist. This functionality is
1543
+provided <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=80d233db514a556d7255034ae057b138527cb2ea" target="_top">by a Firefox patch</a>.
1544
+The whitelist for Windows and macOS contains both a set of
1545
+<a class="ulink" href="https://www.google.com/get/noto" target="_top">Noto fonts</a> which we bundle
1546
+and fonts provided by the operating system. For Linux systems we only bundle
1547
+fonts and <a class="ulink" href="https://gitweb.torproject.org/builders/tor-browser-bundle.git/commit/?id=b88443f6d8af62f763b069eb15e008a46d9b468a" target="_top">
1548
+deploy </a> a <span class="command"><strong>fonts.conf</strong></span> file to restrict the browser to
1549
+use those fonts exclusively. In addition to that we set the <span class="command"><strong>font.name*
1550
+</strong></span> preferences for macOS and Linux to make sure that a given code point
1551
+is always displayed with the same font. This is not guaranteed even if we bundle
1552
+all the fonts Tor Browser uses as it can happen that fonts are loaded in a
1553
+different order on different systems. Setting the above mentioned preferences
1554
+works around this issue by specifying the font to use explicitely.
1372 1555
 
1373 1556
      </p><p>
1374 1557
 
1375
-To improve rendering, we exempt remote <a class="ulink" href="https://developer.mozilla.org/en-US/docs/CSS/@font-face" target="_top">@font-face
1376
-fonts</a> from these counts, and if a font-family CSS rule lists a remote
1377
-font (in any order), we use that font instead of any of the named local fonts.
1558
+Allowing fonts provided by the operating system for Windows and macOS users is
1559
+currently a compromise between fingerprintability resistance and usability
1560
+concerns. We are still investigating the right balance between them and have
1561
+created a <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/18097" target="_top">
1562
+ticket in our bug tracker</a> to summarize the current state of our defense
1563
+and future work that remains to be done.
1378 1564
 
1379 1565
      </p></li><li class="listitem"><span class="command"><strong>Monitor, Widget, and OS Desktop Resolution</strong></span><p>
1380 1566
 
1381
-Both CSS and Javascript have access to a lot of information about the screen
1567
+Both CSS and JavaScript have access to a lot of information about the screen
1382 1568
 resolution, usable desktop size, OS widget size, toolbar size, title bar size,
1383 1569
 and OS desktop widget sizing information that are not at all relevant to
1384 1570
 rendering and serve only to provide information for fingerprinting. Since many
... ...
@@ -1399,20 +1585,24 @@ resolution. In addition, to further reduce resolution-based fingerprinting, we
1399 1585
 are <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/7256" target="_top">investigating
1400 1586
 zoom/viewport-based mechanisms</a> that might allow us to always report the
1401 1587
 same desktop resolution regardless of the actual size of the content window,
1402
-and simply scale to make up the difference.  Until then, the user should also
1403
-be informed that maximizing their windows can lead to fingerprintability under
1404
-this scheme.
1588
+and simply scale to make up the difference. As an alternative to zoom-based
1589
+solutions we are testing a
1590
+<a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/14429" target="_top">different
1591
+approach</a> in our alpha series that tries to round the browser window at
1592
+all times to a multiple 200x100 pixels. Regardless which solution we finally
1593
+pick, until it will be available the user should also be informed that
1594
+maximizing their windows can lead to fingerprintability under the current scheme.
1405 1595
 
1406 1596
      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1407 1597
 
1408
-We automatically resize new browser windows to a 200x100 pixel multiple using
1409
-a window observer <a class="ulink" href="https://gitweb.torproject.org/torbutton.git/tree/src/chrome/content/torbutton.js#n3361" target="_top">based
1410
-on desktop resolution</a>. To minimize the effect of the long tail of large
1411
-monitor sizes, we also cap the window size at 1000 pixels in each direction.
1412
-Additionally, we patch Firefox to use the client content window size <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=bd3b1ed32a9c21fdc92fc35f2ec0a41badc378d5" target="_top">for
1413
-window.screen</a>, and to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=a5648c8d80f396caf294d761cc4a9a76c0b33a9d" target="_top">report
1414
-a window.devicePixelRatio of 1.0</a>. Similarly, we <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=3c02858027634ffcfbd97047dfdf170c19ca29ec" target="_top">patch
1415
-DOM events to return content window relative points</a>.
1598
+We automatically resize new browser windows to a 200x100 pixel multiple <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=7b3e68bd7172d4f3feac11e74c65b06729a502b2" target="_top">based
1599
+on desktop resolution</a> which is provided by a Firefox patch. To minimize
1600
+the effect of the long tail of large monitor sizes, we also cap the window size
1601
+at 1000 pixels in each direction. In addition to that we set
1602
+<span class="command"><strong>privacy.resistFingerprinting</strong></span>
1603
+to <span class="command"><strong>true</strong></span> to use the client content window size for
1604
+window.screen, and to report a window.devicePixelRatio of 1.0. Similarly,
1605
+we use that preference to return content window relative points for DOM events.
1416 1606
 
1417 1607
 We also force popups to open in new tabs (via
1418 1608
 <span class="command"><strong>browser.link.open_newwindow.restriction</strong></span>), to avoid
... ...
@@ -1423,7 +1613,7 @@ maximized windows are detrimental to privacy in this mode.
1423 1613
      </p></li><li class="listitem"><span class="command"><strong>Display Media information</strong></span><p>
1424 1614
 
1425 1615
 Beyond simple resolution information, a large amount of so-called "Media"
1426
-information is also exported to content. Even without Javascript, CSS has
1616
+information is also exported to content. Even without JavaScript, CSS has
1427 1617
 access to a lot of information about the device orientation, system theme
1428 1618
 colors, and other desktop and display features that are not at all relevant to
1429 1619
 rendering and also user configurable. Most of this
... ...
@@ -1433,18 +1623,19 @@ user and OS theme defined color values</a> to CSS as well.
1433 1623
 
1434 1624
      </p><p><span class="command"><strong>Design Goal:</strong></span>
1435 1625
 
1436
-CSS should not be able infer anything that the user has configured about their
1437
-computer. Additionally, it should not be able to infer machine-specific
1626
+A website MUST NOT be able infer anything that the user has configured about
1627
+their computer. Additionally, it SHOULD NOT be able to infer machine-specific
1438 1628
 details such as screen orientation or type.
1439 1629
 
1440 1630
      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1441 1631
 
1442
-We patch
1443
-Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=cf8956b4460107c5b0053c8fc574e34b0a30ec1e" target="_top">report
1444
-a fixed set of system colors to content window CSS</a>, and <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=bbc138486e0489b0d559343fa0522df4ee3b3533" target="_top">prevent
1445
-detection of font smoothing on OSX</a>. We also always
1446
-<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=e17d60442ab0db92664ff68d90fe7bf737374912" target="_top">report
1447
-landscape-primary</a> for the screen orientation.
1632
+We set <span class="command"><strong>ui.use_standins_for_native_colors</strong></span> to <span class="command"><strong>true
1633
+</strong></span> and provide a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=c6be9ba561a69250c7d5926d90e0112091453643" target="_top">Firefox patch</a>
1634
+to report a fixed set of system colors to content window CSS, and prevent
1635
+detection of font smoothing on macOS with the help of
1636
+<span class="command"><strong>privacy.resistFingerprinting</strong></span>. We also always
1637
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=5a159c6bfa310b4339555de389ac16cf8e13b3f5" target="_top">
1638
+report landscape-primary</a> for the <a class="ulink" href="https://w3c.github.io/screen-orientation/" target="_top">screen orientation</a>.
1448 1639
 
1449 1640
      </p></li><li class="listitem"><span class="command"><strong>WebGL</strong></span><p>
1450 1641
 
... ...
@@ -1459,11 +1650,14 @@ vulnerability surface</a>, we deploy a similar strategy against WebGL as
1459 1650
 for plugins. First, WebGL Canvases have click-to-play placeholders (provided
1460 1651
 by NoScript), and do not run until authorized by the user. Second, we
1461 1652
 obfuscate driver information by setting the Firefox preferences
1462
-<span class="command"><strong>webgl.disable-extensions</strong></span> and
1463
-<span class="command"><strong>webgl.min_capability_mode</strong></span>, which reduce the information
1464
-provided by the following WebGL API calls: <span class="command"><strong>getParameter()</strong></span>,
1465
-<span class="command"><strong>getSupportedExtensions()</strong></span>, and
1466
-<span class="command"><strong>getExtension()</strong></span>.
1653
+<span class="command"><strong>webgl.disable-extensions</strong></span>,
1654
+<span class="command"><strong>webgl.min_capability_mode</strong></span>, and
1655
+<span class="command"><strong>webgl.disable-fail-if-major-performance-caveat</strong></span> which reduce
1656
+the information provided by the following WebGL API calls:
1657
+<span class="command"><strong>getParameter()</strong></span>, <span class="command"><strong>getSupportedExtensions()</strong></span>,
1658
+and <span class="command"><strong>getExtension()</strong></span>. To make the minimal WebGL mode usable we
1659
+additionally <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=7b0caa1224c3417754d688344eacc97fbbabf7d5" target="_top">
1660
+normalize its properties with a Firefox patch</a>.
1467 1661
 
1468 1662
      </p><p>
1469 1663
 
... ...
@@ -1471,6 +1665,59 @@ Another option for WebGL might be to use software-only rendering, using a
1471 1665
 library such as <a class="ulink" href="http://www.mesa3d.org/" target="_top">Mesa</a>. The use of
1472 1666
 such a library would avoid hardware-specific rendering differences.
1473 1667
 
1668
+     </p></li><li class="listitem"><span class="command"><strong>MediaDevices API</strong></span><p>
1669
+The <a class="ulink" href="https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices" target="_top">
1670
+MediaDevices API</a> provides access to connected media input devices like
1671
+cameras and microphones, as well as screen sharing. In particular, it allows web
1672
+content to easily enumerate those devices with <span class="command"><strong>
1673
+MediaDevices.enumerateDevices()</strong></span>. This relies on WebRTC being compiled
1674
+in which we currently don't do. Nevertheless, we disable this feature for now as
1675
+a defense-in-depth by setting <span class="command"><strong>media.peerconnection.enabled</strong></span> and
1676
+<span class="command"><strong>media.navigator.enabled</strong></span> to <span class="command"><strong>false</strong></span>.
1677
+    </p></li><li class="listitem"><span class="command"><strong>MIME Types</strong></span><p>
1678
+
1679
+Which MIME Types are registered with an operating system depends to a great deal
1680
+on the application software and/or drivers a user chose to install. Web pages
1681
+can not only estimate the amount of MIME types registered by checking
1682
+<span class="command"><strong>navigator.mimetypes.length</strong></span>. Rather, they are even able to
1683
+test whether particular MIME types are available which can have a non-negligible
1684
+impact on a user's fingerprint. We prevent both of these information leaks with
1685
+a direct <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=38999857761196b0b7f59f49ee93ae13f73c6149" target="_top">Firefox patch</a>.
1686
+
1687
+    </p></li><li class="listitem"><span class="command"><strong>System Uptime</strong></span><p>
1688
+
1689
+It is possible to get the system uptime of a Tor Browser user by querying the
1690
+<span class="command"><strong>Event.timestamp</strong></span> property. We avoid this by setting <span class="command"><strong>
1691
+dom.event.highrestimestamp.enabled</strong></span> to <span class="command"><strong>true</strong></span>.
1692
+
1693
+      </p></li><li class="listitem"><span class="command"><strong>Keyboard Layout Fingerprinting</strong></span><p>
1694
+
1695
+<span class="command"><strong>KeyboardEvent</strong></span>s provide a way for a website to find out
1696
+information about the keyboard layout of its visitors. In fact there are <a class="ulink" href="https://developers.google.com/web/updates/2016/04/keyboardevent-keys-codes" target="_top">
1697
+several dimensions</a> to this fingerprinting vector. The <span class="command"><strong>
1698
+KeyboardEvent.code</strong></span> property represents a physical key that can't be
1699
+changed by the keyboard layout nor by the modifier state. On the other hand the
1700
+<span class="command"><strong>KeyboardEvent.key</strong></span> property contains the character that is
1701
+generated by that key. This is dependent on things like keyboard layout, locale
1702
+and modifier keys.
1703
+
1704
+      </p><p><span class="command"><strong>Design Goal:</strong></span>
1705
+
1706
+Websites MUST NOT be able to infer any information about the keyboard of a Tor
1707
+Browser user.
1708
+
1709
+      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1710
+
1711
+We provide <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=a65b5269ff04e4fbbb3689e2adf853543804ffbf" target="_top">two</a>
1712
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=383b8e7e073ea79e70f19858efe1c5fde64b99cf" target="_top">Firefox patches</a> that
1713
+take care of spoofing <span class="command"><strong>KeyboardEvent.code</strong></span> and <span class="command"><strong>
1714
+KeyboardEvent.keyCode</strong></span> by providing consensus (US-English-style) fake
1715
+properties. This is achieved by hiding the user's use of the numpad, and any
1716
+non-QWERTY US English keyboard. Characters from non-en-US languages
1717
+are currently returning an empty <span class="command"><strong>KeyboardEvent.code</strong></span> and a
1718
+<span class="command"><strong>KeyboardEvent.keyCode</strong></span> of <span class="command"><strong>0</strong></span>. Moreover,
1719
+neither <span class="command"><strong>Alt</strong></span> or <span class="command"><strong>Shift</strong></span>, or
1720
+<span class="command"><strong>AltGr</strong></span> keyboard events are reported to content.
1474 1721
       </p></li><li class="listitem"><span class="command"><strong>User Agent and HTTP Headers</strong></span><p><span class="command"><strong>Design Goal:</strong></span>
1475 1722
 
1476 1723
 All Tor Browser users MUST provide websites with an identical user agent and
... ...
@@ -1483,23 +1730,93 @@ these headers should remain identical across the population even when updated.
1483 1730
 Firefox provides several options for controlling the browser user agent string
1484 1731
 which we leverage. We also set similar prefs for controlling the
1485 1732
 Accept-Language and Accept-Charset headers, which we spoof to English by default. Additionally, we
1486
-<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=e9841ee41e7f3f1535be2d605084c41ee9faf6c2" target="_top">remove
1733
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=848da9cdb2b7c09dc8ec335d687f535fc5c87a67" target="_top">remove
1487 1734
 content script access</a> to Components.interfaces, which <a class="ulink" href="http://pseudo-flaw.net/tor/torbutton/fingerprint-firefox.html" target="_top">can be
1488
-used</a> to fingerprint OS, platform, and Firefox minor version.  </p></li><li class="listitem"><span class="command"><strong>Locale Fingerprinting</strong></span><p>
1735
+used</a> to fingerprint OS, platform, and Firefox minor version.  </p></li><li class="listitem"><span class="command"><strong>Timing-based Side Channels</strong></span><p>
1736
+Attacks based on timing side channels are nothing new in the browser context.
1737
+<a class="ulink" href="http://sip.cs.princeton.edu/pub/webtiming.pdf" target="_top">Cache-based</a>,
1738
+<a class="ulink" href="https://www.abortz.net/papers/timingweb.pdf" target="_top">cross-site timing</a>,
1739
+and <a class="ulink" href="https://www.contextis.com/documents/2/Browser_Timing_Attacks.pdf" target="_top">
1740
+pixel stealing</a>, to name just a few, got investigated in the past.
1741
+While their fingerprinting potential varies all timing-based attacks have in
1742
+common that they need sufficiently fine-grained clocks.
1743
+      </p><p><span class="command"><strong>Design Goal:</strong></span>
1744
+
1745
+Websites MUST NOT be able to fingerprint a Tor Browser user by exploiting
1746
+timing-based side channels.
1747
+
1748
+      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1749
+
1750
+The cleanest solution to timing-based side channels would be to get rid of them.
1751
+However, this does not seem to be trivial even considering just a
1752
+<a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=711043" target="_top">single</a>
1753
+<a class="ulink" href="https://cseweb.ucsd.edu/~dkohlbre/papers/subnormal.pdf" target="_top">side channel</a>.
1754
+Thus, we rely on disabling all possible timing sources or making them
1755
+coarse-grained enough in order to render timing side channels unsuitable as a
1756
+means for fingerprinting browser users.
1757
+
1758
+      </p><p>
1759
+
1760
+We set <span class="command"><strong>dom.enable_user_timing</strong></span> and
1761
+<span class="command"><strong>dom.enable_resource_timing</strong></span> to <span class="command"><strong>false</strong></span> to
1762
+disable these explicit timing sources. Furthermore, we clamp the resolution of
1763
+explicit clocks to 100ms <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=1febc98f7ae5dbec845567415bd5b703ee45d774" target="_top">with a Firefox patch</a>.
1764
+
1765
+This includes <span class="command"><strong>performance.now()</strong></span>, <span class="command"><strong>new Date().getTime()
1766
+</strong></span>, <span class="command"><strong>audioContext.currentTime</strong></span>, <span class="command"><strong>
1767
+canvasStream.currentTime</strong></span>, <span class="command"><strong>video.currentTime</strong></span>,
1768
+<span class="command"><strong>audio.currentTime</strong></span>, <span class="command"><strong>new File([], "").lastModified
1769
+</strong></span>, and <span class="command"><strong>new File([], "").lastModifiedDate.getTime()</strong></span>.
1770
+
1771
+      </p><p>
1772
+
1773
+While clamping the clock resolution to 100ms is a step towards neutering the
1774
+timing-based side channel fingerprinting, it is by no means sufficient. It turns
1775
+out that it is possible to subvert our clamping of explicit clocks by using
1776
+<a class="ulink" href="https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_kohlbrenner.pdf" target="_top">
1777
+implicit ones</a>, e.g. extrapolating the true time by running a busy loop
1778
+with a predictable operation in it. We are tracking
1779
+ <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/16110" target="_top">this problem
1780
+</a> in our bug tracker and are working with the research community and
1781
+Mozilla to develop and test a proper solution to this part of our defense
1782
+against timing-based side channel fingerprinting risks.
1783
+
1784
+      </p></li><li class="listitem"><span class="command"><strong>resource:// and chrome:// URIs Leaks</strong></span><p>
1785
+Due to <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=863246" target="_top">bugs
1786
+</a> <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1120398" target="_top">
1787
+in Firefox</a> it is possible to detect the locale and the platform of a
1788
+Tor Browser user. Moreover, it is possible to find out the extensions a user has
1789
+installed. This is done by including resource:// and/or chrome:// URIs into
1790
+web content which point to resources included in Tor Browser itself or in
1791
+installed extensions.
1792
+      </p><p>
1793
+
1794
+We believe that it should be impossible for web content to extract information
1795
+out of a Tor Browser user by deploying resource:// and/or chrome:// URIs. Until
1796
+this is fixed in Firefox <a class="ulink" href="https://gitweb.torproject.org/torbutton.git/tree/src/components/content-policy.js" target="_top">
1797
+we filter</a> resource:// and chrome:// requests done
1798
+by web content denying them by default. We need a whitelist of resource:// and
1799
+chrome:// URIs, though, to avoid breaking parts of Firefox. Those nearly a
1800
+dozen Firefox resources do not aid in fingerprinting Tor Browser users as they
1801
+are not different on the platforms and in the locales we support.
1802
+
1803
+      </p></li><li class="listitem"><span class="command"><strong>Locale Fingerprinting</strong></span><p>
1489 1804
 
1490 1805
 In Tor Browser, we provide non-English users the option of concealing their OS
1491 1806
 and browser locale from websites. It is debatable if this should be as high of
1492
-a priority as information specific to the user's computer, but for
1493
-completeness, we attempt to maintain this property.
1807
+a priority as information specific to the user's computer, but for completeness,
1808
+we attempt to maintain this property.
1494 1809
 
1495 1810
      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1496 1811
 
1497 1812
 We set the fallback character set to set to windows-1252 for all locales, via
1498
-<span class="command"><strong>intl.charset.default</strong></span>.  We also patch Firefox to allow us to
1499
-<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=4545ecd6dc2ca7d10aefe36b81658547ea97b800" target="_top">instruct
1500
-the JS engine</a> to use en-US as its internal C locale for all Date, Math,
1501
-and exception handling.
1502
-
1813
+<span class="command"><strong>intl.charset.default</strong></span>. We also set
1814
+<span class="command"><strong>javascript.use_us_english_locale</strong></span> to <span class="command"><strong>true</strong></span>
1815
+to instruct the JS engine to use en-US as its internal C locale for all Date,
1816
+Math, and exception handling. Additionally, we provide a patch to use an
1817
+<a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=0080b2d6bafcbfb8a57f54a26e53d7f74d239389" target="_top">
1818
+en-US label for the <span class="command"><strong>isindex</strong></span> HTML element</a> instead of
1819
+letting the label leak the browser's UI locale.
1503 1820
      </p></li><li class="listitem"><span class="command"><strong>Timezone and Clock Offset</strong></span><p>
1504 1821
 
1505 1822
 While the latency in Tor connections varies anywhere from milliseconds to
... ...
@@ -1520,23 +1837,27 @@ the browser can obtain this clock skew via a mechanism similar to that used in
1520 1837
 
1521 1838
      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1522 1839
 
1523
-We set the timezone using the TZ environment variable, which is supported on
1524
-all platforms.
1840
+We <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=0ee3aa4cbeb1be3301d8960d0cf3a64831ea6d1b" target="_top">
1841
+set the timezone to UTC</a> with a Firefox patch using the TZ environment
1842
+variable, which is supported on all platforms. Moreover, with an additional
1843
+patch just needed for the Windows platform, <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=bdd0303a78347d17250950a4cf858de556afb1c7" target="_top">
1844
+we make sure</a> the TZ environment variable is respected by the
1845
+<a class="ulink" href="http://site.icu-project.org/" target="_top">ICU library</a> as well.
1525 1846
 
1526
-     </p></li><li class="listitem"><span class="command"><strong>Javascript Performance Fingerprinting</strong></span><p>
1847
+     </p></li><li class="listitem"><span class="command"><strong>JavaScript Performance Fingerprinting</strong></span><p>
1527 1848
 
1528
-<a class="ulink" href="http://w2spconf.com/2011/papers/jspriv.pdf" target="_top">Javascript performance
1849
+<a class="ulink" href="http://w2spconf.com/2011/papers/jspriv.pdf" target="_top">JavaScript performance
1529 1850
 fingerprinting</a> is the act of profiling the performance
1530
-of various Javascript functions for the purpose of fingerprinting the
1531
-Javascript engine and the CPU.
1851
+of various JavaScript functions for the purpose of fingerprinting the
1852
+JavaScript engine and the CPU.
1532 1853
 
1533 1854
      </p><p><span class="command"><strong>Design Goal:</strong></span>
1534 1855
 
1535 1856
 We have <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/3059" target="_top">several potential
1536 1857
 mitigation approaches</a> to reduce the accuracy of performance
1537 1858
 fingerprinting without risking too much damage to functionality. Our current
1538
-favorite is to reduce the resolution of the Event.timeStamp and the Javascript
1539
-Date() object, while also introducing jitter. We believe that Javascript time
1859
+favorite is to reduce the resolution of the Event.timeStamp and the JavaScript
1860
+Date() object, while also introducing jitter. We believe that JavaScript time
1540 1861
 resolution may be reduced all the way up to the second before it seriously
1541 1862
 impacts site operation. Our goal with this quantization is to increase the
1542 1863
 amount of time it takes to mount a successful attack. <a class="ulink" href="http://w2spconf.com/2011/papers/jspriv.pdf" target="_top">Mowery et al</a> found
... ...
@@ -1544,7 +1865,7 @@ that even with the default precision in most browsers, they required up to 120
1544 1865
 seconds of amortization and repeated trials to get stable results from their
1545 1866
 feature set. We intend to work with the research community to establish the
1546 1867
 optimum trade-off between quantization+jitter and amortization time, as well
1547
-as identify highly variable Javascript operations. As long as these attacks
1868
+as identify highly variable JavaScript operations. As long as these attacks
1548 1869
 take several seconds or more to execute, they are unlikely to be appealing to
1549 1870
 advertisers, and are also very likely to be noticed if deployed against a
1550 1871
 large number of people.
... ...
@@ -1565,11 +1886,58 @@ flight time. It is seeing increasing use as a biometric.
1565 1886
 
1566 1887
      </p><p><span class="command"><strong>Design Goal:</strong></span>
1567 1888
 
1568
-We intend to rely on the same mechanisms for defeating Javascript performance
1889
+We intend to rely on the same mechanisms for defeating JavaScript performance
1569 1890
 fingerprinting: timestamp quantization and jitter.
1570 1891
 
1571 1892
      </p><p><span class="command"><strong>Implementation Status:</strong></span>
1572
-We have no implementation as of yet.
1893
+
1894
+We clamp keyboard event resolution to 100ms with a <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=1febc98f7ae5dbec845567415bd5b703ee45d774" target="_top">Firefox patch</a>.
1895
+
1896
+     </p></li><li class="listitem"><span class="command"><strong>Connection State</strong></span><p>
1897
+
1898
+It is possible to monitor the connection state of a browser over time with
1899
+<a class="ulink" href="https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine" target="_top">
1900
+navigator.onLine</a>. We prevent this by setting <span class="command"><strong>
1901
+network.manage-offline-status</strong></span> to <span class="command"><strong>false</strong></span>.
1902
+
1903
+     </p></li><li class="listitem"><span class="command"><strong>Reader View</strong></span><p>
1904
+
1905
+<a class="ulink" href="https://support.mozilla.org/t5/Basic-Browsing/Firefox-Reader-View-for-clutter-free-web-pages/ta-p/38466" target="_top">Reader View</a>
1906
+is a Firefox feature to view web pages clutter-free and easily adjusted to
1907
+own needs and preferences. To avoid fingerprintability risks we make Tor Browser
1908
+users uniform by setting <span class="command"><strong>reader.parse-on-load.enabled</strong></span> to
1909
+<span class="command"><strong>false</strong></span> and <span class="command"><strong>browser.reader.detectedFirstArticle</strong></span>
1910
+to <span class="command"><strong>true</strong></span>.
1911
+
1912
+     </p></li><li class="listitem"><span class="command"><strong>Contacting Mozilla Services</strong></span><p>
1913
+
1914
+Tor Browser is based on Firefox which is a Mozilla product. Quite naturally,
1915
+Mozilla is interested in making users aware of new features and in gathering
1916
+information to learn about the most pressing needs Firefox users are facing.
1917
+This is often implemented by contacting Mozilla services, be it for displaying
1918
+further information about a new feature or by
1919
+<a class="ulink" href="https://wiki.mozilla.org/Telemetry" target="_top">sending (aggregated) data back
1920
+for analysis</a>. While some of those mechanisms are disabled by default on
1921
+release channels (gathering telemetry data comes to mind) others are not. We
1922
+make sure that non of those Mozilla services is contacted to avoid possible
1923
+fingerprinting risks.
1924
+
1925
+      </p><p>
1926
+
1927
+In particular, we disable GeoIP-based search results by setting <span class="command"><strong>
1928
+browser.search.countryCode</strong></span> and <span class="command"><strong>browser.search.region
1929
+</strong></span> to <span class="command"><strong>US</strong></span> and <span class="command"><strong>browser.search.geoip.url
1930
+</strong></span> to the empty string. Furthermore, we disable Selfsupport and Unified
1931
+Telemetry by setting <span class="command"><strong>browser.selfsupport.enabled</strong></span> and <span class="command"><strong>
1932
+toolkit.telemetry.unified</strong></span> to <span class="command"><strong>false</strong></span> and we make
1933
+sure no related ping is reaching Mozilla by setting <span class="command"><strong>
1934
+datareporting.healthreport.about.reportUrlUnified</strong></span> to <span class="command"><strong>
1935
+data:text/plain,</strong></span>. The same is done with <span class="command"><strong>
1936
+datareporting.healthreport.about.reportUrl</strong></span> and the new tiles feature
1937
+related <span class="command"><strong>browser.newtabpage.directory.ping</strong></span> and <span class="command"><strong>
1938
+browser.newtabpage.directory.source</strong></span> preferences. Additionally, we
1939
+disable the UITour backend by setting <span class="command"><strong>browser.uitour.enabled</strong></span>
1940
+to <span class="command"><strong>false</strong></span>.
1573 1941
       </p></li><li class="listitem"><span class="command"><strong>Operating System Type Fingerprinting</strong></span><p>
1574 1942
 
1575 1943
 As we mentioned in the introduction of this section, OS type fingerprinting is
... ...
@@ -1609,31 +1977,33 @@ In order to avoid long-term linkability, we provide a "New Identity" context
1609 1977
 menu option in Torbutton. This context menu option is active if Torbutton can
1610 1978
 read the environment variables $TOR_CONTROL_PASSWD and $TOR_CONTROL_PORT.
1611 1979
 
1612
-   </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55268352"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
1980
+   </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm914"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote">
1613 1981
 
1614 1982
 All linkable identifiers and browser state MUST be cleared by this feature.
1615 1983
 
1616
-    </blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55269600"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
1984
+    </blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm917"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
1617 1985
 
1618
-First, Torbutton disables Javascript in all open tabs and windows by using
1619
-both the <a class="ulink" href="https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIDocShell#Attributes" target="_top">browser.docShell.allowJavascript</a>
1986
+First, Torbutton disables JavaScript in all open tabs and windows by using
1987
+both the <a class="ulink" href="https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIDocShell#Attributes" target="_top">browser.docShell.allowJavaScript</a>
1620 1988
 attribute as well as <a class="ulink" href="https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIDOMWindowUtils#suppressEventHandling%28%29" target="_top">nsIDOMWindowUtil.suppressEventHandling()</a>.
1621 1989
 We then stop all page activity for each tab using <a class="ulink" href="https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIWebNavigation#stop%28%29" target="_top">browser.webNavigation.stop(nsIWebNavigation.STOP_ALL)</a>.
1622 1990
 We then clear the site-specific Zoom by temporarily disabling the preference
1623 1991
 <span class="command"><strong>browser.zoom.siteSpecific</strong></span>, and clear the GeoIP wifi token URL
1624
-<span class="command"><strong>geo.wifi.access_token</strong></span> and the last opened URL prefs (if
1625
-they exist). Each tab is then closed.
1992
+<span class="command"><strong>geo.wifi.access_token</strong></span> and the last opened URL preference (if
1993
+it exists). Each tab is then closed.
1626 1994
 
1627 1995
      </p><p>
1628 1996
 
1629
-After closing all tabs, we then emit "<a class="ulink" href="https://developer.mozilla.org/en-US/docs/Supporting_private_browsing_mode#Private_browsing_notifications" target="_top">browser:purge-session-history</a>"
1997
+After closing all tabs, we then clear the searchbox and findbox text and emit
1998
+"<a class="ulink" href="https://developer.mozilla.org/en-US/docs/Supporting_private_browsing_mode#Private_browsing_notifications" target="_top">browser:purge-session-history</a>"
1630 1999
 (which instructs addons and various Firefox components to clear their session
1631
-state), and then manually clear the following state: searchbox and findbox
1632
-text, HTTP auth, SSL state, OCSP state, site-specific content preferences
1633
-(including HSTS state), content and image cache, offline cache, offline
1634
-storage, Cookies, crypto tokens, DOM storage, the safe browsing key, and the
1635
-Google wifi geolocation token (if it exists). We also clear NoScript's site
1636
-and temporary permissions, and all other browser site permissions.
2000
+state). Then we manually clear the following state: HTTP auth, SSL state,
2001
+crypto tokens, OCSP state, site-specific content preferences (including HSTS
2002
+state), the undo tab history, content and image cache, offline and memory cache,
2003
+offline storage, cookies, DOM storage, the safe browsing key, the
2004
+Google wifi geolocation token (if it exists), and the domain isolator state. We
2005
+also clear NoScript's site and temporary permissions, and all other browser site
2006
+permissions.
1637 2007
 
1638 2008
      </p><p>
1639 2009
 
... ...
@@ -1648,10 +2018,7 @@ the close of the final window, an unload handler is fired to invoke the <a class
1648 2018
 collector</a>, which has the effect of immediately purging any blob:UUID
1649 2019
 URLs that were created by website content via <a class="ulink" href="https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL" target="_top">URL.createObjectURL</a>.
1650 2020
 
1651
-     </p></blockquote></div><div class="blockquote"><blockquote class="blockquote">
1652
-If the user chose to "protect" any cookies by using the Torbutton Cookie
1653
-Protections UI, those cookies are not cleared as part of the above.
1654
-    </blockquote></div></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="other-security"></a>4.8. Other Security Measures</h3></div></div></div><p>
2021
+     </p></blockquote></div></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="other-security"></a>4.8. Other Security Measures</h3></div></div></div><p>
1655 2022
 
1656 2023
 In addition to the above mechanisms that are devoted to preserving privacy
1657 2024
 while browsing, we also have a number of technical mechanisms to address other
... ...
@@ -1670,39 +2036,45 @@ features should be disabled at which security levels.
1670 2036
 
1671 2037
      </p><p>
1672 2038
 
1673
-The Security Slider consists of four positions:
2039
+The Security Slider consists of three positions:
1674 2040
 
1675
-     </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><span class="command"><strong>Low</strong></span><p>
2041
+     </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><span class="command"><strong>Low (default)</strong></span><p>
1676 2042
 
1677
-At this security level, the preferences are the Tor Browser defaults.
2043
+At this security level, the preferences are the Tor Browser defaults. This
2044
+includes three features that were formerly governed by the slider at
2045
+higher security levels: <span class="command"><strong>gfx.font_rendering.graphite.enabled</strong></span>
2046
+is set to <span class="command"><strong>false</strong></span> now after Mozilla got convinced that
2047
+<a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1255731" target="_top">leaving
2048
+it enabled is too risky</a>. <span class="command"><strong>network.jar.block-remote-files</strong></span>
2049
+is set to <span class="command"><strong>true</strong></span>. Mozilla tried to block remote JAR files in
2050
+Firefox 45 but needed to revert that decision due to breaking IBM's iNotes.
2051
+While Mozilla <a class="ulink" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1329336" target="_top">
2052
+is working on getting this disabled again</a> we take the protective stance
2053
+already now and block remote JAR files even on the low security level. Finally,
2054
+we exempt asm.js from the security slider and block it on all levels. See the
2055
+<a class="link" href="#disk-avoidance" title="4.3. Disk Avoidance">Disk Avoidance</a> and the cache linkability
2056
+concerns in the <a class="link" href="#identifier-linkability" title="4.5. Cross-Origin Identifier Unlinkability">Cross-Origin Identifier
2057
+Unlinkability</a> sections for further details.
1678 2058
 
1679
-      </p></li><li class="listitem"><span class="command"><strong>Medium-Low</strong></span><p>
2059
+      </p></li><li class="listitem"><span class="command"><strong>Medium</strong></span><p>
1680 2060
 
1681 2061
 At this security level, we disable the ION JIT
1682 2062
 (<span class="command"><strong>javascript.options.ion.content</strong></span>), TypeInference JIT
1683
-(<span class="command"><strong>javascript.options.typeinference</strong></span>), ASM.JS
1684
-(<span class="command"><strong>javascript.options.asmjs</strong></span>), WebAudio
2063
+(<span class="command"><strong>javascript.options.typeinference</strong></span>), Baseline JIT
2064
+(<span class="command"><strong>javascript.options.baselinejit.content</strong></span>), WebAudio
1685 2065
 (<span class="command"><strong>media.webaudio.enabled</strong></span>), MathML
1686
-(<span class="command"><strong>mathml.disabled</strong></span>), block remote JAR files
1687
-(<span class="command"><strong>network.jar.block-remote-files</strong></span>), and make HTML5 audio and
1688
-video click-to-play via NoScript (<span class="command"><strong>noscript.forbidMedia</strong></span>).
1689
-
1690
-       </p></li><li class="listitem"><span class="command"><strong>Medium-High</strong></span><p>
1691
-
1692
-This security level inherits the preferences from the Medium-Low level, and
1693
-additionally disables the baseline JIT
1694
-(<span class="command"><strong>javascript.options.baselinejit.content</strong></span>), disables Graphite
1695
-(<span class="command"><strong>gfx.font_rendering.graphite.enabled</strong></span>) and SVG OpenType font
1696
-rendering (<span class="command"><strong>gfx.font_rendering.opentype_svg.enabled</strong></span>) and only
1697
-allows Javascript to run if it is loaded over HTTPS and the URL bar is HTTPS
1698
-(by setting <span class="command"><strong>noscript.global</strong></span> to false and
2066
+(<span class="command"><strong>mathml.disabled</strong></span>), SVG Opentype font rendering
2067
+(<span class="command"><strong>gfx.font_rendering.opentype_svg.enabled</strong></span>), and make HTML5 audio
2068
+and video click-to-play via NoScript (<span class="command"><strong>noscript.forbidMedia</strong></span>).
2069
+Furthermore, we only allow JavaScript to run if it is loaded over HTTPS and the
2070
+URL bar is HTTPS (by setting <span class="command"><strong>noscript.global</strong></span> to false and
1699 2071
 <span class="command"><strong>noscript.globalHttpsWhitelist</strong></span> to true).
1700 2072
 
1701 2073
        </p></li><li class="listitem"><span class="command"><strong>High</strong></span><p>
1702 2074
 
1703
-This security level inherits the preferences from the Medium-Low and
1704
-Medium-High levels, and additionally disables remote fonts
1705
-(<span class="command"><strong>noscript.forbidFonts</strong></span>), completely disables Javascript (by
2075
+This security level inherits the preferences from the Medium level, and
2076
+additionally disables remote fonts (<span class="command"><strong>noscript.forbidFonts</strong></span>),
2077
+completely disables JavaScript (by
1706 2078
 unsetting <span class="command"><strong>noscript.globalHttpsWhitelist</strong></span>), and disables SVG
1707 2079
 images (<span class="command"><strong>svg.in-content.enabled</strong></span>).
1708 2080
 
... ...
@@ -1712,7 +2084,7 @@ images (<span class="command"><strong>svg.in-content.enabled</strong></span>).
1712 2084
 Fingerprinting</a> is a statistical attack to attempt to recognize specific
1713 2085
 encrypted website activity.
1714 2086
 
1715
-     </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55303936"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2087
+     </p><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm975"></a>Design Goal:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
1716 2088
 
1717 2089
 We want to deploy a mechanism that reduces the accuracy of <a class="ulink" href="https://en.wikipedia.org/wiki/Feature_selection" target="_top">useful features</a> available
1718 2090
 for classification. This mechanism would either impact the true and false
... ...
@@ -1728,14 +2100,14 @@ network overhead. In the no-overhead category, we have <a class="ulink" href="ht
1728 2100
 <a class="ulink" href="https://blog.torproject.org/blog/experimental-defense-website-traffic-fingerprinting" target="_top">better
1729 2101
 use of HTTP pipelining and/or SPDY</a>.
1730 2102
 In the tunable/low-overhead
1731
-category, we have <a class="ulink" href="http://freehaven.net/anonbib/cache/ShWa-Timing06.pdf" target="_top">Adaptive
2103
+category, we have <a class="ulink" href="https://arxiv.org/abs/1512.00524" target="_top">Adaptive
1732 2104
 Padding</a> and <a class="ulink" href="http://www.cs.sunysb.edu/~xcai/fp.pdf" target="_top">
1733 2105
 Congestion-Sensitive BUFLO</a>. It may be also possible to <a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/7028" target="_top">tune such
1734 2106
 defenses</a> such that they only use existing spare Guard bandwidth capacity in the Tor
1735 2107
 network, making them also effectively no-overhead.
1736 2108
 
1737
-     </p></blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idp55310832"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
1738
-Currently, we patch Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=20a59cec9886cf2575b1fd8e92b43e31ba053fbd" target="_top">randomize
2109
+     </p></blockquote></div></div><div class="sect3"><div class="titlepage"><div><div><h4 class="title"><a id="idm987"></a>Implementation Status:</h4></div></div></div><div class="blockquote"><blockquote class="blockquote"><p>
2110
+Currently, we patch Firefox to <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=60f9e7f73f3dba5542f7fbe882f7c804cb8ecc18" target="_top">randomize
1739 2111
 pipeline order and depth</a>. Unfortunately, pipelining is very fragile.
1740 2112
 Many sites do not support it, and even sites that advertise support for
1741 2113
 pipelining may simply return error codes for successive requests, effectively
... ...
@@ -1786,7 +2158,7 @@ date.
1786 2158
 
1787 2159
      </p><p>
1788 2160
 
1789
-We also make use of the in-browser Mozilla updater, and have <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-31.6.0esr-4.5-1&amp;id=bcf51aae541fc28de251924ce9394224bd2b814c" target="_top">patched
2161
+We also make use of the in-browser Mozilla updater, and have <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=a5a23f5d316a850f11063ead15353d677c9153fd" target="_top">patched
1790 2162
 the updater</a> to avoid sending OS and Kernel version information as part
1791 2163
 of its update pings.
1792 2164
 
... ...
@@ -1799,7 +2171,7 @@ contend with. For this reason, we have deployed a build system
1799 2171
 that allows anyone to use our source code to reproduce byte-for-byte identical
1800 2172
 binary packages to the ones that we distribute.
1801 2173
 
1802
-  </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idp55327360"></a>5.1. Achieving Binary Reproducibility</h3></div></div></div><p>
2174
+  </p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1010"></a>5.1. Achieving Binary Reproducibility</h3></div></div></div><p>
1803 2175
 
1804 2176
 The GNU toolchain has been working on providing reproducible builds for some
1805 2177
 time, however a large software project such as Firefox typically ends up
... ...
@@ -1809,10 +2181,10 @@ machine configuration can accumulate over time and are difficult for others to
1809 2181
 replicate externally, which leads to difficulties with binary reproducibility.
1810 2182
 
1811 2183
    </p><p>
1812
-For this reason, we decided to leverage the work done by the <a class="ulink" href="http://gitian.org/" target="_top">Gitian Project</a> from the Bitcoin community.
2184
+For this reason, we decided to leverage the work done by the <a class="ulink" href="https://gitian.org/" target="_top">Gitian Project</a> from the Bitcoin community.
1813 2185
 Gitian is a wrapper around Ubuntu's virtualization tools that allows you to
1814
-specify an Ubuntu version, architecture, a set of additional packages, a set
1815
-of input files, and a bash build scriptlet in an YAML document called a
2186
+specify an Ubuntu or Debian version, architecture, a set of additional packages,
2187
+a set of input files, and a bash build scriptlet in an YAML document called a
1816 2188
 "Gitian Descriptor". This document is used to install a qemu-kvm image, and
1817 2189
 execute your build scriptlet inside it.
1818 2190
    </p><p>
... ...
@@ -1820,11 +2192,10 @@ execute your build scriptlet inside it.
1820 2192
 We have created a <a class="ulink" href="https://gitweb.torproject.org/builders/tor-browser-bundle.git/tree/refs/heads/master" target="_top">set
1821 2193
 of wrapper scripts</a> around Gitian to automate dependency download and
1822 2194
 authentication, as well as transfer intermediate build outputs between the
1823
-stages of the build process. Because Gitian creates an Ubuntu build
1824
-environment, we must use cross-compilation to create packages for Windows and
1825
-Mac OS. For Windows, we use mingw-w64 as our cross compiler. For Mac OS, we
1826
-use crosstools-ng in combination with a binary redistribution of the Mac OS 10.6
1827
-SDK.
2195
+stages of the build process. Because Gitian creates a Linux build environment,
2196
+we must use cross-compilation to create packages for Windows and macOS. For
2197
+Windows, we use mingw-w64 as our cross compiler. For macOS, we use cctools and
2198
+clang and a binary redistribution of the Mac OS 10.7 SDK.
1828 2199
 
1829 2200
    </p><p>
1830 2201
 
... ...
@@ -1906,35 +2277,33 @@ directly patching the aspects of the Firefox build process that included this
1906 2277
 information into the build. It also turns out that some libraries (in
1907 2278
 particular: libgmp) attempt to detect the current CPU to determine which
1908 2279
 optimizations to compile in. This CPU type is uniform on our KVM instances,
1909
-but differs under LXC. We are also investigating currently
1910
-<a class="ulink" href="https://trac.torproject.org/projects/tor/ticket/12240" target="_top">oddities related to
1911
-time-based dependency tracking</a> that only appear in LXC containers.
2280
+but differs under LXC.
1912 2281
 
1913
-   </p></li></ol></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idp55349120"></a>5.2. Package Signatures and Verification</h3></div></div></div><p>
2282
+   </p></li></ol></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1042"></a>5.2. Package Signatures and Verification</h3></div></div></div><p>
1914 2283
 
1915
-The build process generates a single sha256sums.txt file that contains a sorted
1916
-list of the SHA-256 hashes of every package produced for that build version. Each
1917
-official builder uploads this file and a GPG signature of it to a directory
1918
-on a Tor Project's web server. The build scripts have an optional matching
1919
-step that downloads these signatures, verifies them, and ensures that the
1920
-local builds match this file.
2284
+The build process generates a single sha256sums-unsigned-build.txt file that
2285
+contains a sorted list of the SHA-256 hashes of every package produced for that
2286
+build version. Each official builder uploads this file and a GPG signature of it
2287
+to a directory on a Tor Project's web server. The build scripts have an optional
2288
+matching step that downloads these signatures, verifies them, and ensures that
2289
+the local builds match this file.
1921 2290
 
1922 2291
     </p><p>
1923 2292
 
1924
-When builds are published officially, the single sha256sums.txt file is
1925
-accompanied by a detached GPG signature from each official builder that
2293
+When builds are published officially, the single sha256sums-unsigned-build.txt
2294
+file is accompanied by a detached GPG signature from each official builder that
1926 2295
 produced a matching build. The packages are additionally signed with detached
1927 2296
 GPG signatures from an official signing key.
1928 2297
 
1929 2298
     </p><p>
1930 2299
 
1931 2300
 The fact that the entire set of packages for a given version can be
1932
-authenticated by a single hash of the sha256sums.txt file will also allow us
1933
-to create a number of auxiliary authentication mechanisms for our packages,
1934
-beyond just trusting a single offline build machine and a single cryptographic
1935
-key's integrity. Interesting examples include providing multiple independent
1936
-cryptographic signatures for packages, listing the package hashes in the Tor
1937
-consensus, and encoding the package hashes in the Bitcoin blockchain.
2301
+authenticated by a single hash of the sha256sums-unsigned-build.txt file will
2302
+also allow us to create a number of auxiliary authentication mechanisms for our
2303
+packages, beyond just trusting a single offline build machine and a single
2304
+cryptographic key's integrity. Interesting examples include providing multiple
2305
+independent cryptographic signatures for packages, listing the package hashes in
2306
+the Tor consensus, and encoding the package hashes in the Bitcoin blockchain.
1938 2307
 
1939 2308
      </p><p>
1940 2309
 
... ...
@@ -1943,7 +2312,7 @@ In order to verify package integrity, the signature must be stripped off using
1943 2312
 the osslsigncode tool, as described on the <a class="ulink" href="https://www.torproject.org/docs/verifying-signatures.html.en#BuildVerification" target="_top">Signature
1944 2313
 Verification</a> page.
1945 2314
 
1946
-    </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idp55353648"></a>5.3. Anonymous Verification</h3></div></div></div><p>
2315
+    </p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a id="idm1049"></a>5.3. Anonymous Verification</h3></div></div></div><p>
1947 2316
 
1948 2317
 Due to the fact that bit-identical packages can be produced by anyone, the
1949 2318
 security of this build system extends beyond the security of the official
... ...
@@ -1955,7 +2324,7 @@ achieved even if all official build machines are compromised.
1955 2324
 By default, all tor-specific dependencies and inputs to the build process are
1956 2325
 downloaded over Tor, which allows build verifiers to remain anonymous and
1957 2326
 hidden. Because of this, any individual can use our anonymity network to
1958
-privately download our source code, verify it against public signed, audited,
2327
+privately download our source code, verify it against public, signed, audited,
1959 2328
 and mirrored git repositories, and reproduce our builds exactly, without being
1960 2329
 subject to targeted attacks. If they notice any differences, they can alert
1961 2330
 the public builders/signers, hopefully using a pseudonym or our anonymous
... ...
@@ -1966,8 +2335,9 @@ verifier.
1966 2335
 
1967 2336
 We make use of the Firefox updater in order to provide automatic updates to
1968 2337
 users. We make use of certificate pinning to ensure that update checks cannot
1969
-be tampered with, and we sign the individual MAR update files with an offline
1970
-signing key.
2338
+be tampered with by setting <span class="command"><strong>security.cert_pinning.enforcement_level
2339
+</strong></span> to <span class="command"><strong>2</strong></span>, and we sign the individual MAR update files
2340
+with keys that get rotated every year.
1971 2341
 
1972 2342
    </p><p>
1973 2343
 
... ...
@@ -2012,13 +2382,17 @@ occurring.
2012 2382
 
2013 2383
 </p><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="deprecate"></a>A.1. Deprecation Wishlist</h2></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><span class="command"><strong>The Referer Header</strong></span><p>
2014 2384
 
2015
-We haven't disabled or restricted the Referer ourselves because of the
2016
-non-trivial number of sites that rely on the Referer header to "authenticate"
2017
-image requests and deep-link navigation on their sites. Furthermore, there
2018
-seems to be no real privacy benefit to taking this action by itself in a
2019
-vacuum, because many sites have begun encoding Referer URL information into
2020
-GET parameters when they need it to cross HTTP to HTTPS scheme transitions.
2021
-Google's +1 buttons are the best example of this activity.
2385
+When leaving a .onion domain we <a class="ulink" href="https://gitweb.torproject.org/tor-browser.git/commit/?h=tor-browser-45.8.0esr-6.5-2&amp;id=09188cb14dfaa8ac22f687c978166c7bd171b576" target="_top">
2386
+set the Referer header to the destination</a> to avoid leaking information
2387
+which might be especially problematic in the case of transitioning from a .onion
2388
+domain to one reached over clearnet. Apart from that we haven't disabled or
2389
+restricted the Referer ourselves because of the non-trivial number of sites
2390
+that rely on the Referer header to "authenticate" image requests and deep-link
2391
+navigation on their sites. Furthermore, there seems to be no real privacy
2392
+benefit to taking this action by itself in a vacuum, because many sites have
2393
+begun encoding Referer URL information into GET parameters when they need it to
2394
+cross HTTP to HTTPS scheme transitions. Google's +1 buttons are the best
2395
+example of this activity.
2022 2396
 
2023 2397
   </p><p>
2024 2398
 
... ...
@@ -2030,16 +2404,17 @@ source URL parameters.
2030 2404
 
2031 2405
   </p><p>
2032 2406
 
2033
-We believe the Referer header should be made explicit, and believe that CSP
2034
-2.0 provides a <a class="ulink" href="http://www.w3.org/TR/CSP11/#directive-referrer" target="_top">decent step in this
2035
-direction</a>. If a site wishes to transmit its URL to third party content
2036
-elements during load or during link-click, it should have to specify this as a
2037
-property of the associated HTML tag or CSP policy. With an explicit property
2038
-or policy, it would then be possible for the user agent to inform the user if
2039
-they are about to click on a link that will transmit Referer information
2407
+We believe the Referer header should be made explicit, and believe that Referrer
2408
+Policy provides a <a class="ulink" href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header" target="_top">
2409
+decent step in this direction</a>. If a site wishes to transmit its URL to
2410
+third party content elements during load or during link-click, it should have
2411
+to specify this as a property of the associated <a class="ulink" href="https://blog.mozilla.org/security/2015/01/21/meta-referrer/" target="_top">
2412
+HTML tag</a> or in an HTTP response header. With an explicit property or
2413
+response header, it would then be possible for the user agent to inform the user
2414
+if they are about to click on a link that will transmit Referer information
2040 2415
 (perhaps through something as subtle as a different color in the lower toolbar
2041 2416
 for the destination URL). This same UI notification can also be used for links
2042
-with the <a class="ulink" href="https://developer.mozilla.org/en-US/docs/HTML/Element/a#Attributes" target="_top">"ping"</a>
2417
+with the <a class="ulink" href="https://developers.whatwg.org/links.html#ping" target="_top">"ping"</a>
2043 2418
 attribute.
2044 2419
 
2045 2420
   </p></li><li class="listitem"><span class="command"><strong>window.name</strong></span><p>
... ...
@@ -2048,13 +2423,13 @@ a DOM property that for some reason is allowed to retain a persistent value
2048 2423
 for the lifespan of a browser tab. It is possible to utilize this property for
2049 2424
 <a class="ulink" href="http://www.thomasfrank.se/sessionvars.html" target="_top">identifier
2050 2425
 storage</a> during click navigation. This is sometimes used for additional
2051
-XSRF protection and federated login.
2426
+CSRF protection and federated login.
2052 2427
    </p><p>
2053 2428
 
2054 2429
 It's our opinion that the contents of window.name should not be preserved for
2055 2430
 cross-origin navigation, but doing so may break federated login for some sites.
2056 2431
 
2057
-   </p></li><li class="listitem"><span class="command"><strong>Javascript link rewriting</strong></span><p>
2432
+   </p></li><li class="listitem"><span class="command"><strong>JavaScript link rewriting</strong></span><p>
2058 2433
 
2059 2434
 In general, it should not be possible for onclick handlers to alter the
2060 2435
 navigation destination of 'a' tags, silently transform them into POST
... ...
@@ -2072,7 +2447,7 @@ possible for us to <a class="ulink" href="https://trac.torproject.org/projects/t
2072 2447
 ourselves</a>, as they are comparatively rare and can be handled with site
2073 2448
 permissions.
2074 2449
 
2075
-   </p></li></ol></div></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idp55389664"></a>A.2. Promising Standards</h2></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><a class="ulink" href="http://web-send.org" target="_top">Web-Send Introducer</a><p>
2450
+   </p></li></ol></div></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="idm1090"></a>A.2. Promising Standards</h2></div></div></div><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><a class="ulink" href="http://web-send.org" target="_top">Web-Send Introducer</a><p>
2076 2451
 
2077 2452
 Web-Send is a browser-based link sharing and federated login widget that is
2078 2453
 designed to operate without relying on third-party tracking or abusing other
2079 2454