This is an iframe, see the proof of concept original at https://polar-hollows-5826.herokuapp.com/
Refresh the page a few times
Look ma, no cookies!
If you look at your browser’s developer tools (Chrome or FireBug, etc.) you can see that the site aspartame.poc.ochronus.com doesn’t set any cookies.
No localstorage, etc. either.
This tracking method works fine without using any of the usual:
- Flash, Java or other plugins
- Your IP address / user agent string
- Any method used by Panopticlick
Can you think of any other information that is persistent between browser restarts?
How about caching?
This technique is not new at all. See the relevant wikipedia entry
Second: it’s a quite nasty tracking method.
An ETag or entity tag, is part of HTTP, the protocol for the World Wide Web. It is one of several mechanisms that HTTP provides for web cache validation, and which allows a client to make conditional requests. This allows caches to be more efficient, and saves bandwidth, as a web server does not need to send a full response if the content has not changed. ETags can also be used for optimistic concurrency control, as a way to help prevent simultaneous updates of a resource from overwriting each other.
An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL. If the resource content at that URL ever changes, a new and different ETag is assigned. Used in this manner ETags are similar to fingerprints, and they can be quickly compared to determine if two versions of a resource are the same or not. Comparing ETags only makes sense with respect to one URL—ETags for resources obtained from different URLs may or may not be equal, so no meaning can be inferred from their comparison.
So basically what happens is: The server sends an ETag HTTP header with the response, containing an arbitrary string (in the normal case a checksum of the resource). Compliant browsers (IE5.5+, Safari, Chrome, Opera, Firefox, etc.) send the If-None-Match HTTP header with subsequent requests containing the same string the ETag header contained. The server could make an intelligent decision to serve the content from cache or say 304 Not Modified if the checksum didn’t change.
However, this mechanism can be exploited. What if the server uses the ETag/If-None-Match headers as session Ids, for example? We could then implement some basci ‘session’ store keyed by this Id and use it for tracking. Of course, emptying the browser cache also deletes this Id, as deleting cookies deletes traditional sessions.
I’ve written a very basic Django app as a proof of concept demo (the one you saw in the iframe at the beginning of the article), see here: Aspartame on GitHub (Aspartame is a sugar substitute as this technique is a cookie substitute)
from django.http import HttpResponse
How can we stop this?
Well, you could use an incognito window for each request, or disable caching, but that would make your browsing experience quite painful. Cache tracking is undetectable in most of the cases and caching itself is useful (think about traffic costs on your mobile phone for example) and this is what makes this tracking technique quite hard to fight.