TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

HSTS Super Cookies

197 pointsby Thomashuetover 10 years ago

20 comments

schoenover 10 years ago
This privacy risk is actually documented in the official HSTS specification, section 16.9 of<p><a href="https://www.rfc-editor.org/rfc/rfc6797.txt" rel="nofollow">https:&#x2F;&#x2F;www.rfc-editor.org&#x2F;rfc&#x2F;rfc6797.txt</a><p>However, the spec doesn&#x27;t propose a mitigation for it. I&#x27;m afraid many new security policy mechanisms can actually be used to track users or devices this way, because you can experiment to see whether the browser has heard about a particular security policy by observing its behavior when you ask it to violate the policy. If you tell different devices about different policies, their behavior will be different (as if you told different kids who were going to visit a park about different rules for how to behave in the park, and then observed who obeyed and who violated which rules as a way of identifying individual kids).<p>For example, you can also get tracking out of public key pinning, by selectively pinning certs for some subdomains and not others, and then seeing which subresources are successfully loaded when you present a huge number of pin violations. (I think that&#x27;s also documented in the HPKP spec.)
评论 #8831012 未加载
agwaover 10 years ago
Firefox stores HSTS entries in a SQLite database, which you can query by running:<p><pre><code> echo &quot;SELECT * FROM moz_hosts WHERE type=&#x27;sts&#x2F;use&#x27;;&quot; | sqlite3 permissions.sqlite </code></pre> from inside your profile directory.<p>To clear HSTS entries (which the &quot;Clear recent history&quot; UI does <i>not</i> delete), you can do:<p><pre><code> echo &quot;DELETE FROM moz_hosts WHERE type=&#x27;sts&#x2F;use&#x27;;&quot; | sqlite3 permissions.sqlite </code></pre> I&#x27;ve been periodically monitoring this database for HSTS supercookies over the last couple years and have yet to see any in the wild.
评论 #8832685 未加载
评论 #8832724 未加载
评论 #8831780 未加载
JadeNBover 10 years ago
&gt; The impact is that it&#x27;s possible for a site to track you even if you choose to use &quot;incognito&quot; or &quot;private&quot; browsing features in an effort to avoid such tracking.<p>I&#x27;ve always thought that (despite user hopes) the point of &#x27;private&#x27; browsing was explicitly and only to avoid leaving traces on the <i>user&#x27;s</i> computer anyway. (For example, I used it when shopping for Christmas presents.) The Firefox new private window has a warning to this effect:<p>&gt; While this computer won&#x27;t have a record of your browsing history, your employer or internet service provider can still track the pages you visit.
评论 #8831483 未加载
评论 #8831357 未加载
Groxxover 10 years ago
&gt;However, unlike cookies, existing HSTS flags are still shared with sites when using &quot;incognito&quot; or &quot;private&quot; windows.<p>fwiw, though Firefox is listed in there as &quot;leaks across private mode&quot;, I get an entirely new ID when I open a private window. v34.0.5
评论 #8831747 未加载
评论 #8832570 未加载
ryan-cover 10 years ago
This has been known for quite a while. I managed to find a case where HSTS allowed information leakage between private&#x2F;non-private frames within the same browser in Firefox, but I think that&#x27;s been fixed.<p>In general, the browser vendors seem to think that HSTS is worth the potential privacy leak. I&#x27;ve also heard some people say they&#x27;re monitoring to see if anyone does it and will respond if it becomes a problem.
jcrawfordorover 10 years ago
I&#x27;m actually pretty irritated that this researcher makes it out as an iOS thing only, it feels like he&#x2F;she just didn&#x27;t care to try on anything other than the device they had in front of them.<p>Chrome on Android behaves the same way the researcher described (fingerprinting works in Incognito tabs), but Chrome, Opera, Firefox, and IE on Windows all get different IDs.
评论 #8831873 未加载
评论 #8832139 未加载
fortmeadeitover 10 years ago
There&#x27;s a nice survey paper from 2012 that lists dozens of supercookie vectors, including HSTS.<p><a href="https://cyberlaw.stanford.edu/files/publication/files/trackingsurvey12.pdf" rel="nofollow">https:&#x2F;&#x2F;cyberlaw.stanford.edu&#x2F;files&#x2F;publication&#x2F;files&#x2F;tracki...</a><p>FTA: &quot;A website can encode a globally unique pseudonymous device identifier into any stateful web technology so long as it persists at least log2 n bits, where n is the number of Internet-connected devices (presently roughly 5 billion, requiring 33 bits).&quot;
xybyover 10 years ago
I have Chromium set to delete browsing data on close. The HSTS Cookie survives that. Manually deleting browsing data kills it.
评论 #8831031 未加载
Tomdarknessover 10 years ago
Seems Chrome has addressed the issue with incognito mode - if you open the page in incognito mode you get a different code.
评论 #8831210 未加载
评论 #8831308 未加载
评论 #8831054 未加载
评论 #8831100 未加载
评论 #8832335 未加载
评论 #8831058 未加载
darklajidover 10 years ago
I&#x27;m not quite sure if I wouldn&#x27;t _expect_ the incognito mode to respect HSTS. I&#x27;d think that you would use incognito mode for ~sensitive~ tasks.<p>Defaulting to https due to a known HSTS flag seems good in this case, otherwise every incognito session would start out blank, right? (I&#x27;m ignoring the white list from the browser vendor)
jzelinskieover 10 years ago
It sounds like HTTPS Everywhere is overlapping functionality with HSTS. Is there some way that HTTPS Everywhere could just inject HSTS rules rather than looking up every URL and rewriting it before sending a request?
评论 #8831608 未加载
phlogisticfuguover 10 years ago
It seems like the main use case for HSTS is with the site being requested by the user in the URI bar, for protecting cookies and login credentials associated with that domain.<p>It does not seem like there&#x27;s a major use-case for secondary resources: images, css, javascript, etc loaded on the page itself, and which serve as the vector in this attack. Such resources must be requested via https on a https site itself anyways.<p>So, wouldn&#x27;t it be better to just restrict the usage of HSTS protocol overrides to just the main domain being requested by the user in the URI bar?
lambdaover 10 years ago
In Firefox 34.0 on OS X, both Incognito Mode and clearing history from the past hour appeared to defeat this attack.
falcolasover 10 years ago
Worked a charm on my iPad between regular and incognito mode. Fascinating, and a bit unfortunate.
cm2187over 10 years ago
Am I right to understand that this can even be a server side cookie, i.e. that it can&#x27;t even be killed by disabling javascript (since the server can tell if there was a redirect)?
jjmasonover 10 years ago
Wow, can&#x27;t get it to go away on Firefox 33.0 Ubuntu. I was able to clear it by manually deleting the info from the permissions.sqlite3 database as described by agwa.<p>Very clever!
评论 #8831351 未加载
harsh1618over 10 years ago
Using Firefox 34.0 on Ubuntu, I get a different code in the private browsing window. No add-ons are enabled.
评论 #8831408 未加载
marsover 10 years ago
imho it&#x27;s not reasonable to perform dozens of http requests in order to create a device fingerprint. especially on mobile networks this will require a lot of time until all requests are through.
评论 #8831000 未加载
microcolonelover 10 years ago
Poses no problem to Firefox 34 on GNU.
ck2over 10 years ago
firefox private browsing breaks it