Preserving Privacy in Belgium

In March 2015, the Belgian Privacy Commission asked COSIC and iMinds researchers to provide a technical analysis of how Facebook uses its “Like Button” to track individuals online. Since we completed our technical findings, Facebook has made several interesting statements about its use of cookies and tracking: “Facebook does receive standard ‘web impressions,’ but doesn’t ‘track you,” or, that Belgium “would become a cradle for cyber terrorism” if Facebook were to modify its cookie practices there.

In a recent blog post entitled Preserving Security in Belgium, Facebook’s Chief Security Officer Alex Stamos explains how the company uses cookies for security purposes. Leaving the legal issues aside, this blog post shows why we believe that Facebook’s technical security claims are unfounded.

Security through surveillance?

The Facebook blog post states:

For example, if the datr cookie demonstrates that a browser has been visiting hundreds of sites in the last five minutes, that’s a pretty good indication we are dealing with a computer-controlled device (a bot). On the flip side, consistent use over several days usually indicates that a browser is legitimate and should be able to access Facebook normally.

Facebook’s main security argument for tracking non-users on third party websites is the mantra of mass surveillance: we have to monitor your activities across websites to be sure that you are not a bad actor. Leaving aside the question of proportionality, the security argument is not compelling: an attacker powerful enough to take over computers and make them visit hundreds of sites in a matter of minutes, would simply remove or block cookies to circumvent all the protections offered by the datr cookie. This can be done, for example, by installing an ad-blocker, switching to private browsing mode, changing browser cookie settings, using a separate browsing profile, or modifying the cookie database in the file system.

For detecting legitimate browsers, Facebook could limit its analysis to Facebook pages, using datr as a first-party cookie. We believe authentic users spend more than enough time on Facebook to demonstrate their legitimacy.

Facebook is certainly able to secure its systems against attackers who can circumvent fragile, cookie based security measures, implying that more robust lines of defense are already deployed. This raises questions concerning the effects of cookie-based third-party tracking for security purposes: the tracking primarily affects regular Internet users who are not involved in any malicious activity.

Cookie isolation
The blog post writes:

The Belgium Privacy Commission recently filed against Facebook in a Belgian court to prevent us from using a cookie called datr that plays a fundamental role in our efforts to keep people safe.

Cookies can be used to secure login forms, protect against DOS attacks and authenticate users. Preventing Facebook from using cookies in certain scenarios could indeed weaken Facebook’s security measures. However, the Commission’s recommendation seems to welcome the use of security cookies within Facebook; including the login page and other Facebook pages:

The transmission of cookies used by Facebook in the context of security (such as the “datr” cookie) is limited to logging in to Facebook or to pages that are part of the facebook.com domain (but not on web pages of third parties with social plug-ins)

Could Facebook limit the collection of datr cookie to Facebook pages and keep the security benefits? Indeed, this is possible. One solution would be to narrow down the scope of the datr cookie to a subdomain such as login.facebook.com and include this subdomain only on Facebook pages. That would allow Facebook to collect the datr cookie as first-party on its own pages and use it to detect suspect behavior without tracking non-users on third-party sites across the web.

Less intrusive social plug-ins

When a user visits a site that includes a social plugin, Facebook receives information about the visited website, even if the person never interacts with the plugin. Until March 2015, Facebook offered a privacy-friendly plugin integration option that does not trigger the default collection of the datr cookie or any other information (“URL” option), unless the user interacts with the plugin. Facebook then removed this option and only retained an implementation that does automatically trigger the transmission of cookies as well as the URL of the visited page. To the best of our knowledge, Facebook has not made any public statement about removing the other three previously available integration options.

198 million Ad-blockers and 11 million Belgians
The blog post states:

In practice, that means we would have to treat any visit to our service from Belgium as an untrusted login and deploy a range of other verification methods for people to prove that they are the legitimate owners of their accounts.

According to a 2015 report, there are 198 million Internet users who employ ad-blockers. Facebook cannot track these users because ad-blockers commonly block Facebook social plugins. From a technical point of view, there is no difference between what these 198 million users already achieve and what Facebook is asked to do in Belgium: in both cases, Facebook will not receive information about the web browsing activities of individuals on non-Facebook pages. To the best of our knowledge, neither ad-blocking users pose a critical threat to Facebook, nor do users who install them need to go through burdensome security checks when they log in to Facebook.

To conclude
Our space is limited for a more thorough technical analysis. In short, we believe that Facebook does not need to track individuals on third-party websites to secure their service. Thousands of other security critical services who don’t have the luxury and power of monitoring users all around the Web show that this should be possible.

We would like to thank Brendan van Alsenoy, Claudia Diaz and Bart Preneel for their helpful feedback. We welcome any criticism and feedback from Facebook or other parties. Comments can be sent to gunes.acar [AT] esat.kuleuven.be (PGP key).