115 points · by spenvo · 5y ago · 82 comments
But as the title hits upon, there is one countermeasure that uBlock Origin has implemented for its Firefox extension. But unlike Firefox, Chrome does not provide robust enough extension APIs for the countermeasure to work there. Chrome users are currently completely susceptible to having private cookie data stolen on thousands of high-traffic sites. Even in the case of this countermeasure though, it does seem insufficient as it's essentially a whack-a-mole game. Browsers must prioritize shutting this down in a more foolproof way, and I can't imagine an easy way to do that.
"Please use the original title, unless it is misleading or linkbait; don't editorialize."
Seems like one more nail in the coffin for Chrome versus alternatives which have a higher degree of people's true best interests at heart.
As a side note, this really deserves a blog post or singular site/page that explains the issue in a simple enough way so the word can spread.
At this point, the only way an ad network can tell that the same user is on Website A and Website B is if both site owners tell the ad network the current user's email address or other common identifier.
If both sites are opting into this, CNAME protections won't do anything.
- extras.example.net --> tracking company IP behind a huge CDN
- awesone.example.org --> tracking company IP behind a huge CDN
The sites are different, but when you visit them you're hitting the tracking servers who get to see you hit both sites. Even worse, they can set cookies on the the domain, which is why someone else said there are security implications.
I've been saying it for years. Eventually everything will appear to be first party and hitting huge CDN IPs. It's easy to do right now already. Go read the Cloudflare blog article on proxying Google Fonts via Workers. Then think about the Cloudflare Apps and how easy it would be to build an app that rotated first party CNAMES and used Workers to dynamically rewrite HTML to proxy the tracking to ad companies.
TLDR; We're super screwed.
„On Safari 14 (requires Big Sur) and on all major iOS and iPadOS 14.2+ browser apps, expiration of cookies set with Set-Cookie HTTP response headers is 7 days at most, if the response originates from a subdomain that has a CNAME alias to a cross-site origin“
extras.example.net is still third-party to awesome.example.org.
The tracking company has no way of knowing that an HTTP request to extras.example.net is from the same user as an HTTP request to awesome.example.org.
If you were operating the tracking company, how would you try to determine the same user is behind both requests? Happy to be proven wrong, but I don't believe it's possible with third-party cookie protections in place.
The rules for "block third-party cookies" features are different than these, and are browser-specific rather than bound by a standard.
I believe that both Chrome and Firefox will not block cookies from a subdomain of the same base domain as "third-party". Although I'm not totally sure where to find this documented. I think if they did, it would break many more sites than "block third-party cookies" do now.
1. UserA visits foo.com which embeds a script from evil.com. When the script is requested, evil.com sees there's no tracking cookie for this user yet, so it drops one.
2. When evil.com was loaded, the Referer header showed the request was coming from foo.com. EvilCo adds an entry that UserA visited foo.com.
3. UserA now visits bar.com which also embeds a script from evil.com. Now, the tracking cookie from Step 1 already exists, so it's sent with the request to load the script from evil.com.
4. evil.com looks at the Cookie and Referer header, and adds an entry that UserA has visited bar.com.
---
Now, what Firefox and Safari have done, is they've made it impossible for ANY third party to access their cookies while a user is visiting a different site.
I completely understand that evil.com is promoting itself to first-party by routing under evil.foo.com and evil.bar.com, and that allows it to set and receive cookies on those hosts, but that alone isn't enough to break out of the new browser protections.
In this new world, evil.foo.com and evil.bar.com are still third party to each other, and so there's no way to sync identifiers between them, even though they're both operated by evil.com.
To sync identities across evil.foo.com and evil.bar.com, EvilCo is forced to do some kind of browser fingerprinting, or to rely on the operators of foo.com and bar.com to manually share additional data about the user.
---
Source - I've tried it! Run two separate domains and see if you can get the same unique identifier in cookies on both domains. The only workarounds are OAuth2 and the Storage Access API - both of which require explicit user permission.
Efforts would be much better spent trying to stop fingerprinting, trying to convince Chrome to add third party cookie protection, or lobbying for regulation.
Not true, sure it's a workaround solution but with frogeye's block list [0] and uBO you're pretty much covered on Chrome regarding CNAME-tracking
[0]:Geoffrey Frogeye's block list of first-party trackers https://hostfiles.frogeye.fr/
AdGuard publishes a list of 6K+ trackers abusing the CNAME cloaking technique - https://news.ycombinator.com/item?id=26349857 - March 2021 (49 comments)
Cname / DNS based third party tracking - https://news.ycombinator.com/item?id=26297984 - Feb 2021 (46 comments)
Plausible Analytics Isn't GDPR Compliant - https://news.ycombinator.com/item?id=24868012 - Oct 2020 (75 comments)
uBlock Origin 1.25.0 uncloaks CNAME-masked network requests in Firefox - https://news.ycombinator.com/item?id=22404808 - Feb 2020 (4 comments)
NextDNS first to block ALL third-party trackers disguised as first-party - https://news.ycombinator.com/item?id=21610386 - Nov 2019 (4 comments)
Cname cloaking, a disguise of third-party trackers - https://news.ycombinator.com/item?id=21604825 - Nov 2019 (196 comments)
In this case, me means my household and customer base. I setup everyone on Firefox for their protection. Most stick with it.
Some vendors request FF. Lightspeed is one.
This means, tracking libs can now also access everything of the website they are hosted in, attach any event handlers etc. It is essentially the same as hosting the tracking library from the content server, except that the tracking provider can change the source code anytime without requiring any consent.
This is a security nightmare imo.
At least that's the vision, to make the web "smaller" again like it was before Eternal September, and to create some protocol implementing a vision like that to take over and wrest things from giant oligarchs controlling all social media. I have no idea if making that is even feasible, though I've seen some attempts vaguely similar to that. I see tons of practical challenges with actually implementing such a thing, though, but the idea would be to make all the communication opaque and explicitly take it away from harvesters.
Granted, there's no way that could end things... I'm sure clients might get subverted via various methods to re-enable harvesting but at least it would limit their scope and you could remove such folks as connections if you knew.
I'm surprised they even setup another domain, you could do path rewriting at load balancer level to route the /extras path to the ad tech software / provider.
I think the main point is just to make it harder to block using pi-hole like solutions.
Gorhill told the Chrome team that this would effectively kill ad blocking. He was ignored (are you surprised?).
Session tokens should be stored in an httpOnly cookie, so they're not accessible to a third party script.
CNAMEs could absolutely lead to leaked session tokens, but website owners should already be somewhat accustomed to hiding cookies away from third party subdomains. These days, lots of third party services run on subdomains... blogs, status pages, email click trackers, support desks, etc.
You can't steal cookies, but you can perform actions as the user, eg.
$.post("/api/transfer_funds", {"recipient": "attacker", "amount": 999999})> visits to different websites cannot be attributed to the same user using standard web development features.
This was stated in a section about the limitations of CNAME tracking.
Maybe the article mentions this later, but wouldn't a single call from the web server to the ad server negate this limitation? That is cross-site tracking is simply a matter of running a little more ad tracker code in your server.
The domain server could -- on the backend, without you having any idea or way to intervene -- notify TrackerCompany that "I now see user xyz who registered with email abc@def.com first name "john" last name "smith" claiming to be 43; he is coming from ip i.j.k.l and is browsing /blah/widget/plan.html, a page about widgets"
But the site owners don't trust the TrackerCompany with this much information. And the TrackerCompany doesn't trust site owners to be honest (they have an incentive to provide false/inflated data).
They started eith 3rd party scripts and cookies, which was a middle ground (site owners have to work harder to lie and must leave some trail if they do; trackercompany must introduce malicious javascript if they want more than was agreed upon). Browsers are making this unusable, so it's shifting to CNAME - website owners have to do a little more work, and have to trust trackercompany more; In the trust/power balance, the sites lose power and give trust (both of which go to trackercompany). But they haven't noticed yet.
So, you are absolutely right, it's just a matter of trust and convenience, which is being shifted - but ultimately, all it takes is just one call from the backend server to undo all privacy protections.
As long as tracker.ad_tech_company.com is smart enough not to give away that it's not part of example.com, there's no way for one's browser to notice this. tracker.example.com is not a cname, and it will almost certainly refer to an IP that is within your corporation's or host's IP space.
This is minimal complexity. It's not a ton of bandwidth if it's mainly cookies.
Similar is to use use the engagement tools inside your own web content management system. The majors (Adobe AEM, Sitecore, etc.) are already offering it.
The next step is to get a CDN to proxy both www.example.com and tracker.example.com and promise to be independent, or for the ad company to operate the proxy themselves.
Yes sites could switch to A records or proxies but that's way more of a PITA on the tracker side.
Make the key (original domain ^ final CNAME).
Which probably would still have issues, but I think it's worth looking into.
BTW, why do browsers not treat subdomains as separate entities for the purposes of figuring out what is a third party? Why don't they restrict things on the basis of IP addresses and skip all this complexity? One connection, one IP address...
https://brave.com/privacy-updates-6/
Edit: not exactly bringing the feature to extension but people usually use Brave Shield + uBlock.
I know Adguard published a list. Kudos to them, but can this be used in an extensive host file?
In next release, the option is moved from advanced settings to normal user settings, i.e. it will become visible in the Settings pane of uBO's dashboard.[2]
---
[1] https://github.com/gorhill/uBlock/wiki/Advanced-settings#cna...
[2] https://github.com/gorhill/uBlock/wiki/Dashboard:-Settings#u...
See here: https://github.com/gorhill/uBlock/releases/tag/1.25.0