What's CNAME of your game? This DNS-based tracking defies your browser privacy defenses
- Reference: 1614147070
- News link: https://www.theregister.co.uk/2021/02/24/dns_cname_tracking/
- Source link:
In [1]a research paper to be presented in July at the 21st Privacy Enhancing Technologies Symposium (PETS 2021), KU Leuven-affiliated researchers Yana Dimova, Gunes Acar, Lukasz Olejnik, Wouter Joosen, and Tom Van Goethem delve into increasing adoption of CNAME-based tracking, which abuse DNS records to erase the distinction between first-party and third-party contexts.
[2]
"This tracking scheme takes advantage of a CNAME record on a subdomain such that it is same-site to the including web site," the paper explains. "As such, defenses that block third-party cookies are rendered ineffective."
The web security model is based on what's known as the same-origin policy. Resources that have the same origin, or domain, are afforded a higher level of trust than resources available elsewhere, at a different origin or domain. That's why websites can set and access their own (first-party) cookies in a visitor's browser, for example, and shouldn't be able to access cookies associated with a different domain (third-party).
[3]
While online publishers have been happy to allow advertisers to run third-party tracking code on their websites to collect data and follow people as they visit different websites, internet users and privacy-focused web browsers have ramped up privacy defenses over the past few years to limit the application of web-based tracking.
We will track you
Advertising technology companies have a history of figuring out ways around such barriers, however. Recall Google's efforts to override Safari's third-party cookie settings, which elicited an [4]inconsequential $22.5m fine from the FTC in 2012.
Now, with the increasingly effective cookie cordons being erected in privacy-focused browsers like Brave, Firefox, and Safari, marketers have stepped up efforts to evade anti-tracking measures.
A technique known as DNS delegation or DNS aliasing has been known since at least [5]2007 and showed up in privacy-focused research papers in 2010
[6]PDF
and 2014[7]PDF
. Based on the use of CNAME DNS records, the counter anti-tracking mechanism drew attention two years ago when open source developer Raymond Hill [8]implemented a defense in the Firefox version of his uBlock Origin content blocking extension.Brave browser leaks visited Tor .onion addresses in DNS traffic, fix released after bug hunter raises alarm [9]READ MORE
CNAME cloaking involves having a web publisher put a subdomain – e.g. trackyou.example.com – under the control of a third-party through the use of a CNAME DNS record. This makes a third-party tracker associated with the subdomain look like it belongs to the first-party domain, example.com.
The boffins from Belgium studied the CNAME-based tracking ecosystem and found 13 different companies using the technique. They claim that the usage of such trackers is growing, up 21 per cent over the past 22 months, and that CNAME trackers can be found on almost 10 per cent of the top 10,000 websites.
What's more, sites with CNAME trackers have an average of about 28 other tracking scripts. They also leak data due to the way web architecture works. The researchers found cookie data leaks on 7,377 sites (95%) out of the 7,797 sites that used CNAME tracking. Most of these were the result of third-party analytics scripts setting cookies on the first-party domain.
Not all of these leaks exposed sensitive data but some did. Out of 103 websites with login functionality tested, the researchers found 13 that leaked sensitive info, including the user's full name, location, email address, and authentication cookie.
"This suggests that this scheme is actively dangerous," wrote Dr Lukasz Olejnik, one of the paper's co-authors, an independent privacy researcher, and consultant, in a [10]blog post . "It is harmful to web security and privacy."
Advertising war's collateral damage
CNAME tracking was found to introduce two security vulnerabilities in undisclosed vendors' implementations by making websites vulnerable to session fixation and cross-site scripting attacks. One of the vendors responded to mitigate the issue; the other did not, the paper says.
One unidentified vendor's tracker created a vulnerability through a function designed to extend the life of first-party advertising and analytics cookies, such as Facebook’s _fbp cookie and Google Analytics' _ga cookie. The vendor's mechanism for doing so failed to provide sufficient validation, enabling a session fixation attack, which is a way of hijacking a browsing session. It could allow, for example, an attacker to make purchases using the victim's credit card.
A different CNAME tracking vendor was found to provide a way to link a user's email to the user's browser fingerprint – a hash based on various measurable browser characteristics.
"This email address is later reflected in a dynamically generated script that is executed on every page load, allowing the website to retrieve it again, even if the user would clear their cookies," the paper explains. "However, because the value of the email address is not properly sanitized, it is possible to include an arbitrary JavaScript payload that will be executed on every page that includes the tracking script."
In addition, the researchers report that ad tech biz Criteo switches specifically to CNAME tracking – putting its cookies into a first-party context – when its trackers encountered users of Safari, which has strong third-party cookie defenses.
According to Olejnik, CNAME tracking can defeat most anti-tracking techniques and there are few defenses against it.
Firefox running the add-on uBlock Origin 1.25+ can see through CNAME deception. So too can [11]Brave , which recently had to [12]repair its CNAME defenses due to problems it created with Tor.
Chrome falls short because it does not have a suitable DNS-resolving API for uBlock Origin to hook into. Safari will [13]limit the lifespan of cookies set via CNAME cloaking but doesn't provide a way to undo the domain disguise to determine whether the subdomain should be blocked outright.
"Because today most anti-tracking works on the principle of filter lists (pattern matching of HTTP requests), the CNAME scheme effectively renders such defenses ineffective," Olejnik said in his blog.
[14]
"As a former member of the W3C Technical Architecture Group, I must also say that I’m particularly worried about how this technique is misusing the way that the web works, specifically in the part where the cookies are leaking. In a way, this is the new low."
Get our [15]Tech Resources
[1] https://arxiv.org/abs/2102.09301
[2] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YDYxzvR3VdQohJ4n2jrTHgAAAAA&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YDYxzvR3VdQohJ4n2jrTHgAAAAA&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[4] https://www.theregister.com/2012/08/09/google_to_pay_ftc_25m_dollars_over_safari_tracking_blunder/
[5] https://web.archive.org/web/20071015125931/http://www.webanalyticmatt.com/2007/08/01/first-party-cookie-confusion/
[6] https://ptolemy.berkeley.edu/projects/truststc/education/reu/10/Papers/GomezG,YalajuJ_paper.pdf
[7] https://lukaszolejnik.com/OpenX-hotpets14.pdf
[8] https://www.theregister.com/2019/11/21/ublock_origin_firefox_unblockable_tracker/
[9] https://www.theregister.com/2021/02/22/in_brief_security/
[10] https://blog.lukaszolejnik.com/large-scale-analysis-of-dns-based-tracking-evasion-broad-data-leaks-included/
[11] https://www.theregister.com/2020/10/28/brave_cname_block
[12] https://www.theregister.com/2021/02/22/in_brief_security/
[13] https://webkit.org/blog/11338/cname-cloaking-and-bounce-tracking-defense/
[14] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_security/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YDYxzvR3VdQohJ4n2jrTHgAAAAA&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[15] https://whitepapers.theregister.com/
Re: Name and shame
Technical steps to counter this are very welcome, of course, but we need national regulators to hit all the (adtech) companies providing this and all the (website owner) companies using this with massive fines.
In particular, setting up such a CNAME within your domain would be immediate evidence of your intent to bypass user decisions on control of cookies and should be all the evidence needed for a large fine.
In fact, even before regulators move on this, it would be good if a campaign group announced that if any of the top 10,000 websites are found to still be using this technique in 30 days time, they will be named and shamed, with maximum possible publicity in major newspapers in the countries in which they operate.
Use only legitimate cookies and honour user privacy settings or be named and shamed.
GDPR violation
This is tracking and so the user should be asked if they want this to happen, if they agree that their data is taken out of the EU.
Much worse is what google analytics does - tracks users from site to site, how forms are filled in, etc. I have never been asked if I want this to happen.
Non-agreed use should be banned.
Smug bastard is smug.
I only allow cookies from sites I trust. 1st party cookies are set to be prompted if to be set & I tend to say no. 3rd party ones never get set at all. So your attempts to set one are already given a giant fuck you. Then I've got a hosts file so large it probably slows my connection down but you can be damn sure your hostile site is already on it. Oh and I don't run javascript so I not only slammed that door in your face but welded it shut & used a plasma torch to slag it to the frame.
Now if you'll excuse me I shall taunt you mercilously from atop the castle walls like a Frenchman waggling his naughty bits at your auntie. HA!
Re: Smug bastard doesn't understand
They're tracking you when you do DNS lookups. You don't mention handling that yourself.
I think you saw the headline and rushed to explain how clever you are.
Read the article.
NoScript FTW.
Interesting approach
You have to admire the simplicity of the technical solution they came up with – CNAME.
I love a good hack like this
Re: Interesting approach
You have to admire the simplicity of the technical solution
Unfortunately, the simplicity of the solution simply reveals how broken the underlying security model is.
In retrospect, it was a terrible idea to allow individual web pages to interact with any other server than the one from which the page was retrieved. Even that wouldn't stop that server from passing information on to a third party, but at least the responsibility would be clear.
News?
I'm not really sure this is news, a number of large UK based companies have been doing it for over 10 years.
I set up and provided them with the DNS settings for my ex-employers tag collection servers.
Grr!
’tis evil.
I'd be surprised if Facebook & friends aren't doing this. Google doesn't need to due to the stupidity of websites using a plethora of Google resources. Why do Theme designers and websites generally think it's cool to have similar fonts to standard ones, but Google Hosted, Google Analytics instead of their own, Google hosted javascript instead of their own. Google APIs when there are no Google services like Maps on the page. I can't see how the use of any of that is legal in the EU and the quite a few other countries with similar laws.
Parasites.
Name and shame
What companies are doing this?
PS: FF rulz!