{"id":143,"date":"2009-07-27T17:17:54","date_gmt":"2009-07-28T00:17:54","guid":{"rendered":"http:\/\/blog.mozilla.org\/security\/?p=143"},"modified":"2016-09-30T02:56:28","modified_gmt":"2016-09-30T09:56:28","slug":"locking-up-the-valuables-opt-in-security-with-forcetls","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/","title":{"rendered":"Locking up the valuables: Opt-in security with ForceTLS"},"content":{"rendered":"<p>Computers are increasingly mobile and, to serve them, more and more public spaces (cafes, airports, libraries, etc.) offer their customers WiFi access. When a web browser on such a network requests a resource, it is implicitly trusting the hotspot not to interfere with the communication.\u00a0 A malicious computer hooked up to the network could alter the traffic, however, and this can have some unpleasant consequences.<\/p>\n<h3><strong>HTTP Man-In-The-Middle (MITM) attacks<\/strong><\/h3>\n<p>Consider your typical online banking session:\u00a0 you type &#8220;www.mybank.com&#8221; into the address bar, hit enter, and wait for the site to load.\u00a0 When it shows up, you enter your password, do your banking, then log out.\u00a0 This process is more-or-less automatic for many people, and the subtleties of the process disappear in the background.\u00a0 More specifically, these are the steps for logging into the bank&#8217;s site:<\/p>\n<ol>\n<li>\u00a0 You type &#8220;www.mybank.com&#8221; into the address bar and hit enter.<\/li>\n<li>\u00a0 The browser assumes &#8220;www.mybank.com&#8221; should be requested over HTTP by default, so the initial request is unencrypted.<\/li>\n<li>\u00a0 The server at &#8220;http:\/\/www.mybank.com&#8221; responds with an HTTP redirect to &#8220;https:\/\/www.mybank.com&#8221;<\/li>\n<li>\u00a0 The secure connection is established, and a login page is served via HTTPS.<\/li>\n<li>\u00a0 You enter your password and do your banking.<\/li>\n<\/ol>\n<p>It is only after the first few swift (and often unnoticed) steps that the user is presented with a secure connection.\u00a0 In a rogue hotspot, &#8220;www.mybank.com&#8221; might resolve to an attacker&#8217;s server (instead of the real thing) and the HTTPS connection may never happen.\u00a0 Many users might not notice this and end up logging into an attacker&#8217;s website.<\/p>\n<p>HTTPS is intended for both channel encryption, to thwart eavesdroppers, and for server authentication.\u00a0 In the hotspot banking MITM situation, you may simply assume that no errors indicates a safe connection but in all reality the server has not been authenticated!\u00a0\u00a0 After all, you&#8217;re not presented with any warnings or UI indicators saying the site is an attack site.\u00a0 If you&#8217;re a diligent user, you can always click Firefox&#8217;s site identity button to find out whether or not the site has authenticated itself and whether it&#8217;s encrypting to prevent eavesdropping, of course.\u00a0 It&#8217;s hard to remember (and time consuming) to do that every time, especially when you&#8217;re used to logging into certain trustworthy sites automatically.\u00a0 And in fact, a fake bank&#8217;s site may even have a little lock icon next to the login box that assures the user he is logging into a secure site &#8212;\u00a0 many legitimate banking sites unfortunately do the same thing.<\/p>\n<h3><strong>Asking the Browser to use HTTPS Only<\/strong><\/h3>\n<p>To stop this kind of man-in-the-middle attack, where an HTTPS site is mimicked over HTTP, Collin Jackson and Adam Barth proposed <a href=\"https:\/\/crypto.stanford.edu\/forcehttps\/\">something called ForceHTTPS<\/a> in 2008.\u00a0 This is a browser feature that allows web sites to tell a browser to always request it via HTTPS, and never unencrypted HTTP.\u00a0 It was intended to help eliminate the redirect from HTTP to HTTPS and minimize the chance of an insecure attack as described above.<\/p>\n<p>We like the idea of ForceHTTPS and are working on implementing it as &#8220;ForceTLS&#8221; in Firefox with hopes it will reduce occurrences of MITM attacks and generally improve user security.\u00a0 We built an add-on as a first step prototype of the feature that works in a similar fashion to the original design by Jackson and Barth.\u00a0 Instead of using cookies, however, we&#8217;re asking sites to send an HTTP header &#8220;X-Force-TLS&#8221; with any securely-transmitted response.\u00a0 The name of this header <em>will change in the future,<\/em> but for now we&#8217;re using &#8220;X-Force-TLS&#8221; as the experimental header that, when present, means:<\/p>\n<ol>\n<li>The browser should <em>only<\/em> attempt to access that domain via HTTPS<\/li>\n<li>How long this requirement should last. For example, a server can ask the HTTPS-only request to expire after three days.\u00a0 This expiration timer can be reset or changed every time data is served to the client by providing a new HTTP header.<\/li>\n<li>Whether or not subdomains of the requested site (images.mybank.com, or login.mybank.com for example) should also be forced into HTTPS<\/li>\n<\/ol>\n<p>ForceTLS can be used for more than just protection against evil hotspots; it can also be used to harden web applications against accidental unencrypted requests.\u00a0 Many popular web apps can be used over both secure HTTPS and insecure HTTP connections; while you&#8217;re given the choice to pick HTTPS instead of HTTP, it&#8217;s possible that a large web app might have a HTTP URI referenced from some subtle corner of its code (by accident of course), and with Force TLS employed, this would quietly get upgraded to HTTPS and prevent exposing any unencrypted data on the network.<\/p>\n<p>Check out our prototype, and tell us what you think!\u00a0 The browser extension and source code are available on AMO (<a href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/12714\">https:\/\/addons.mozilla.org\/en-US\/firefox\/addon\/12714<\/a>).<\/p>\n<p>Sid Stamm<br \/>\nSecurinator<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Computers are increasingly mobile and, to serve them, more and more public spaces (cafes, airports, libraries, etc.) offer their customers WiFi access. When a web browser on such a network &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/\">Read more<\/a><\/p>\n","protected":false},"author":1438,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,69,45499],"tags":[45513,651,650,45514],"coauthors":[45516],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Locking up the valuables: Opt-in security with ForceTLS - Mozilla Security Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"mozilla\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/\",\"url\":\"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/\",\"name\":\"Locking up the valuables: Opt-in security with ForceTLS - Mozilla Security Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/security\/#website\"},\"datePublished\":\"2009-07-28T00:17:54+00:00\",\"dateModified\":\"2016-09-30T09:56:28+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/security\/#\/schema\/person\/70ae25c16f09d053c6d8b5eac29dbda9\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/security\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Locking up the valuables: Opt-in security with ForceTLS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/security\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/security\/\",\"name\":\"Mozilla Security Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/security\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/security\/#\/schema\/person\/70ae25c16f09d053c6d8b5eac29dbda9\",\"name\":\"mozilla\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/security\/#\/schema\/person\/image\/98138a294cb6e19a68b02ef8ca9be2dc\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/75d2017e019c87560fe5d148a64659dc?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/75d2017e019c87560fe5d148a64659dc?s=96&d=identicon&r=g\",\"caption\":\"mozilla\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Locking up the valuables: Opt-in security with ForceTLS - Mozilla Security Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/","twitter_misc":{"Written by":"mozilla","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/","url":"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/","name":"Locking up the valuables: Opt-in security with ForceTLS - Mozilla Security Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/security\/#website"},"datePublished":"2009-07-28T00:17:54+00:00","dateModified":"2016-09-30T09:56:28+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/security\/#\/schema\/person\/70ae25c16f09d053c6d8b5eac29dbda9"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/security\/2009\/07\/27\/locking-up-the-valuables-opt-in-security-with-forcetls\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/security\/"},{"@type":"ListItem","position":2,"name":"Locking up the valuables: Opt-in security with ForceTLS"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/security\/#website","url":"https:\/\/blog.mozilla.org\/security\/","name":"Mozilla Security Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/security\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/security\/#\/schema\/person\/70ae25c16f09d053c6d8b5eac29dbda9","name":"mozilla","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/security\/#\/schema\/person\/image\/98138a294cb6e19a68b02ef8ca9be2dc","url":"https:\/\/secure.gravatar.com\/avatar\/75d2017e019c87560fe5d148a64659dc?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/75d2017e019c87560fe5d148a64659dc?s=96&d=identicon&r=g","caption":"mozilla"}}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/posts\/143"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/users\/1438"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/comments?post=143"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/tags?post=143"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blog.mozilla.org\/security\/wp-json\/wp\/v2\/coauthors?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}