News for hackers. Stuff that matters.
Re:YouTube ads in Safari: you see them now, will you see the... by yliu on Wednesday May 19, 2021 @03:27PM (#27213260)
Despite the title being about YouTube, this is fundamentally about Safari's declarative Content Blocker API being totally inadequate in the face of modern ad delivery technologies. Yes, it's fast and relatively more secure compared to old ad blocking techniques (which requires granting full access to effectively arbitrary JS), but ad tech has evolved since 2015 and Safari's Content Blocking API has not evolved with it.

With other browsers showing varying degrees of interest in declarative content blocking, it's worth looking at Safari as a warning of what declarative content blocking, if unmaintained, will do to cripple ad blocking for users.

Re:YouTube ads in Safari: you see them now, will you see the... by shawnz on Wednesday May 19, 2021 @05:02PM (#27214413)
This is basically the exact fear which was being expressed by users when Google announced that they would require Chrome extensions to only use declarative content blocking starting with Manifest v3 (which anecdotally convinced me to switch to Firefox).
Re:YouTube ads in Safari: you see them now, will you see the... by defaultname on Wednesday May 19, 2021 @06:04PM (#27215124)
If we go down that road, however, sites can make ads completely indistinguishable from desired content. Same domain, same stream, no easily marked container. All of the imperative adblocking tech in the world, short of queuing everything through a neural engine post render, can block what is possible.

So there has always been a detente between adblockers and publishers, presuming the former hit a small enough set of users that it was just ignored. It seems that is no longer the case.

Re:YouTube ads in Safari: you see them now, will you see the... by _Algernon_ on Wednesday May 19, 2021 @06:15PM (#27215227)
That would require delivering ads from first-party servers, right? So third-party ad and tracking networks would die a painful death.
Re:YouTube ads in Safari: you see them now, will you see the... by sangnoir on Wednesday May 19, 2021 @06:55PM (#27215543)
More likely, they'd get upgraded to "first-party" tracking by acting as a CDN-layer where the ad networks do the proxying/caching to get the actual content upstream before merging it with the ads and serving whole thing in a single request. How would you block ads from Cloudflare if it became an ad network?
Re:YouTube ads in Safari: you see them now, will you see the... by 411111111111111 on Thursday May 20, 2021 @08:41AM (#27220362)
The same way you do now with ublock origin. By removing specific elements which match a rule.

The networks will still be able to track you, but ads will be blockable until pages discard the DOM and switch to canvas rendering the whole page

Re:YouTube ads in Safari: you see them now, will you see the... by antris on Thursday May 20, 2021 @01:00PM (#27223790)
Then you serve the ads on the same set of elements that also contain critical content to the user. You can't block ads from Twitch / YouTube with a rule if the ads are baked into the stream itself. Same goes for any other kind of "element" that doesn't explicitly set itself apart from the actual content.

The ads have long ago started evolving away from a simple "here's an ad neatly placed into its own semantic container so that blockers can target it".

Re:YouTube ads in Safari: you see them now, will you see the... by 411111111111111 on Sunday May 23, 2021 @02:22PM (#27257265)
> You can't block ads from Twitch / YouTube with a rule if the ads are baked into the stream itself

you probably wont ever read this, but you actually can.

the pre/post video ads have always been blockable with ublock origin, and the mid-stream adverts, inserted by the content creators themselves can be skipped using SponsorBlock.

Re:YouTube ads in Safari: you see them now, will you see the... by qlm on Wednesday May 19, 2021 @06:24PM (#27215301)
Couldn't they just be proxied through a first party server?
Re:YouTube ads in Safari: you see them now, will you see the... by MarkSweep on Wednesday May 19, 2021 @07:06PM (#27215598)
Some trackers are having people setup CNAME records on their domains, so the tracker cookies appear to be first party:

https://arxiv.org/abs/2102.09301

Re:YouTube ads in Safari: you see them now, will you see the... by FridgeSeal on Wednesday May 19, 2021 @08:59PM (#27216234)
uBlock Origin already performs CNAME decloaking and blocks this approach, it’s pretty cool.
Re:YouTube ads in Safari: you see them now, will you see the... by Qub3d on Wednesday May 19, 2021 @10:43PM (#27216780)
For anyone else who wanted to know more like me, here's a good rundown: https://www.reddit.com/r/uBlockOrigin/comments/f8qnpc/ublock...

Note that CNAME uncloaking only works on Firefox; chromium-based browsers do not support the required API.

Re:YouTube ads in Safari: you see them now, will you see the... by gbil on Thursday May 20, 2021 @04:59AM (#27218948)
And for me this is one of the reasons - probably the biggest - that I don't want to buy an ipad. Because it doesn't allow to run the full blown firefox

I've spent hours debating moving to ipad instead of android tablet and it ends to 1. lightning instead of usb-c (can't afford the ipad pro) but ok I can live with it and 2. firefox which is just a blocker

Re:YouTube ads in Safari: you see them now, will you see the... by cookiengineer on Thursday May 20, 2021 @12:34AM (#27217406)
> uBlock Origin already performs CNAME decloaking and blocks this approach, it’s pretty cool.

... which in return is a static list of domains which needs to be regularly updated, and therefore is not really failsafe. uBlock0 uses Adguard's scraped dataset [1] as a fallback source to do this, as Chrome Extensions cannot make DNS requests without a DNS-via-HTTPS endpoint.

Firefox, however, has provided the `dns` API [2] to do requests via the native OS resolver (which in return is also not failsafe due to being unencrypted plain-old-manipulateable DNS UDP requests)

[1] https://github.com/AdguardTeam/cname-trackers

[2] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

Re:YouTube ads in Safari: you see them now, will you see the... by neurostimulant on Wednesday May 19, 2021 @08:44PM (#27216147)
uBlock Origin on Firefox is able to perform CNAME uncloaking to block this shenanigan.
Re:YouTube ads in Safari: you see them now, will you see the... by dudus on Wednesday May 19, 2021 @08:03PM (#27215923)
TBH that is the future. tracking won't die will just evolve to become harder to block.
Re:YouTube ads in Safari: you see them now, will you see the... by amluto on Wednesday May 19, 2021 @09:49PM (#27216481)
That would partially defeat the purpose. First party adds see first party cookies, so they have no inherent cross site tracking ability.
Re:YouTube ads in Safari: you see them now, will you see the... by asiachick on Wednesday May 19, 2021 @10:13PM (#27216586)
And yet facebook is already do something along the same lines by adding fbcid=<trackingnumber> to every outbound link and then the site that receives the link can report back "I saw fbcid=<trackingnumber>". Sure it makes 3rd party tracking require more trust but wouldn't some analysis tell you if your client is trying to game your ads for revenue etc...?
Re:YouTube ads in Safari: you see them now, will you see the... by manigandham on Thursday May 20, 2021 @03:13AM (#27218298)
Cross-site tracking via cookies (and 3rd-party cookies in general) has already been dead for years.
Re:YouTube ads in Safari: you see them now, will you see the... by _Algernon_ on Wednesday May 19, 2021 @06:31PM (#27215367)
That would be more effort than including a single html-script tag to import google analytics. I have hope that most parties would decide that the extra server load and difficulties would make it not worth it.
Re:YouTube ads in Safari: you see them now, will you see the... by nimish on Wednesday May 19, 2021 @06:55PM (#27215541)
You underestimate the desire for precision tracking, unfortunately. Hiding behind custom subdomains is common. Stepping up to cloaking it to be delivered from the application is more effort but it'll happen.
Re:YouTube ads in Safari: you see them now, will you see the... by earthboundkid on Wednesday May 19, 2021 @10:13PM (#27216587)
You overestimate the technical ability of publishers. Frankly, it’s pathetic to rely on a third party’s hot linked JavaScript, but no one can be arsed to understand how it works, so they just add the tags to GTM instead of realizing that they could trivially implement A/B testing or whatever themselves.
Re:YouTube ads in Safari: you see them now, will you see the... by blibble on Wednesday May 19, 2021 @08:39PM (#27216120)
if you as the ad network don't connect to the end user directly: how can you be sure you're not being defrauded by the site owner?
Re:YouTube ads in Safari: you see them now, will you see the... by cultofmetatron on Wednesday May 19, 2021 @09:24PM (#27216356)
still more effort than before. twiddling with server configs requires more work than inserting a js snippit.
Re:YouTube ads in Safari: you see them now, will you see the... by senkora on Wednesday May 19, 2021 @07:15PM (#27215652)
I wonder if Google’s Web Packaging standard was intended to eventually make it possible to deliver both the page and the ads from the same server without enabling one party to tamper with the other.
Re:YouTube ads in Safari: you see them now, will you see the... by gsnedders on Wednesday May 19, 2021 @08:05PM (#27215932)
While this is an obvious route you could take, this is a significant jump from the current behaviour where the content has to be signed by the owner of the domain that packaged it and is treated as if it was served by that domain (on a given scheme/port), and the same-origin policy applies like normal, and thus the ads would continue to be treated as third-party.

It _does_ potentially allow performance gains, insofar as you're then able to send a single bundle containing both first and third party content, but it isn't a gain from the point-of-view of avoiding adblockers (aside from the most primitive DNS/IP level ones).

Re:YouTube ads in Safari: you see them now, will you see the... by exikyut on Thursday May 20, 2021 @12:21AM (#27217349)
...That's what YouTube does. Ad video content comes from redirector.gvt.com -> xxx.googlevideo.com just like solicited video content.

(Yes, I classify advertising as spam.)

Re:YouTube ads in Safari: you see them now, will you see the... by koolhaas on Thursday May 20, 2021 @03:58AM (#27218578)
But somehow it’s still blockable. I don’t see any ads in YT on Firefox + Ublock.
Re:YouTube ads in Safari: you see them now, will you see the... by alert0 on Thursday May 20, 2021 @04:00AM (#27218597)
You can also reverse proxy it through your server. I did that once for Google analytics on a demo site.
Re:YouTube ads in Safari: you see them now, will you see the... by cookiengineer on Thursday May 20, 2021 @12:31AM (#27217397)
> If we go down that road, however, sites can make ads completely indistinguishable from desired content.

This is exactly the reason why I'm building a web browser with a statistical representation of both the DOM/CSS Layout _and_ the network traffic, so that neural networks can be trained on classifying ads and malicious actors.

There's a lot of requirements in regards of networking for such a peer-to-peer system to work, like a consensus on DNS/CNAME/PTR or consensus on TLS cert validity.

But I honestly believe that this is inavoidable in the near future, given that most Browsers these days are just a Chrome/Chromium shim where obviously Google's business model conflicts with the idea of blocking ads.

Re:YouTube ads in Safari: you see them now, will you see the... by kenniskrag on Wednesday May 19, 2021 @06:31PM (#27215370)
I think by law, ads have to be declared as such for users.
Re:YouTube ads in Safari: you see them now, will you see the... by spartanatreyu on Wednesday May 19, 2021 @07:24PM (#27215700)
That works in theory but fails in practice. Most ads will just have an "Opinion" tag stapled on them.
Re:YouTube ads in Safari: you see them now, will you see the... by vbezhenar on Thursday May 20, 2021 @01:21AM (#27217688)
Blocking YouTube ads requires injecting JS, it had nothing to do with Manifest.
Re:YouTube ads in Safari: you see them now, will you see the... by shawnz on Friday May 21, 2021 @01:12AM (#27230728)
A major justification for removing the previous content blocking API was that it could be used to do things like inject JS. So clearly the intention is to have content blocking extensions not do that at all. Although in this specific case, it might still be possible.

AdGuard and uBO for example use the content blocking API to inject blocking "scriptlets" on sites where this kind of thing is required. That kind of usage is made much more inconvenient with Manifest v3.

Re:YouTube ads in Safari: you see them now, will you see the... by vbezhenar on Saturday May 22, 2021 @05:15PM (#27250334)
I don't think so. Injecting JS is a valid use-case and will work forever, probably a huge majority of extensions do that. An intention is to make content blocking extensions more performant.

It's very easy to inject JS. I don't know whether you're talking from your own experience, but I wrote my little extension to replace uBlock (with my own list of rules and blocks) and to inject JS or CSS you just have to add a line in manifest.json which have nothing to do with blocking API.

Re:YouTube ads in Safari: you see them now, will you see the... by shawnz on Saturday May 22, 2021 @09:24PM (#27251705)
See here where Justin Schuh says the sole motivation is for privacy reasons: https://twitter.com/justinschuh/status/1134092257190064128

I know it is easy to inject JS and that you can do it with the manifest file. But without the old content blocking API you can't dynamically inject different snippets on different pages based on filter lists for example (unless you inject something on every page).

I wouldn't be surprised if in the future, content blocking extensions won't be allowed in the store if they use such broad permissions for example.

Re:YouTube ads in Safari: you see them now, will you see the... by ameshkov on Friday May 21, 2021 @04:43AM (#27231781)
Well, to be fair, not really. Scriptlets will continue to work just okay.

To be completely honest, Manifest V3 technically is not THAT bad and it's capabilities at the current moment are really close to what major ad blockers can do.

There're still some things that bother me:

1. Debugging a content blocker is really inconvenient (not as bad as Safari though) 2. The future. What if its development stalls after it's released? 3. Google's goal (probably, for Manifest V4) is to make content blocking completely declarative, i.e. get rid of any host permissions and content scripts.

Re:YouTube ads in Safari: you see them now, will you see the... by Flow on Wednesday May 19, 2021 @03:47PM (#27213550)
I use Wipr as a content blocker on both macOS and iOS. I never see ads on YouTube. But I've always felt that it might not be enough some day. Perhaps that day is nearly here.
Re:YouTube ads in Safari: you see them now, will you see the... by js2 on Wednesday May 19, 2021 @03:51PM (#27213604)
This is a recent change by YouTube. Wipr uses the same content blocking API as Adguard and has the same limitations:

https://giorgiocalderolla.com/wipr-faq.html#youtube

Re:YouTube ads in Safari: you see them now, will you see the... by guacaswole on Wednesday May 19, 2021 @05:57PM (#27215053)
I use Wipr, I’m in Australia and on Catalina. Now see Ads on YouTube, even when I update. Now I understand why.
Re:YouTube ads in Safari: you see them now, will you see the... by raydev on Thursday May 20, 2021 @01:48PM (#27224509)
Interesting. I tried Wipr on macOS Safari for a couple weeks about a year ago, and there was effectively no ad blocking on YouTube, Twitch, or Twitter, which is coincidentally where I spend the bulk of my time.

It was a frustrating experience, I've tried Safari multiple times over the years since it is so much better on battery life, but Chrome always wins in usability and adblocking.

I switched back to Chrome + uBlock Origin and could use those sites ad-free again. Well, except for Twitch, since they found a workaround for adblockers last year.

Re:YouTube ads in Safari: you see them now, will you see the... by freediver on Wednesday May 26, 2021 @09:18PM (#27298242)
Sounds like you would be interested in Orion. https://browser.kagi.com
Re:YouTube ads in Safari: you see them now, will you see the... by lotsofpulp on Wednesday May 19, 2021 @06:30PM (#27215366)
I use Wipr and I just saw an ad today for the first time on YouTube in Safari. Usually, it throws up an error and you refresh and the video plays, but today’s it was error, then a skippable ad.
Re:YouTube ads in Safari: you see them now, will you see the... by cuddlybacon on Wednesday May 19, 2021 @04:07PM (#27213794)
I've been using Wipr. I've been getting the white placeholder screen for just about a year now. Every one in a while I get actual ads getting thru, before a new update fixes it.
Re:YouTube ads in Safari: you see them now, will you see the... by cuddlybacon on Wednesday May 19, 2021 @05:11PM (#27214496)
In response to this article, I've disabled it in place of using the standalone Adguard app. So far I haven't gotten either symptom.
Re:YouTube ads in Safari: you see them now, will you see the... by ameshkov on Wednesday May 19, 2021 @03:53PM (#27213624)
Note that YT changes aren’t yet rolled out everywhere. Also, if you’re not authorized there’ll be no issues, but it won’t stay like that forever.
Re:YouTube ads in Safari: you see them now, will you see the... by Ballas on Thursday May 20, 2021 @01:30AM (#27217766)
I'm not authorized and started getting the new ads about a week ago (with wipr).
Re:YouTube ads in Safari: you see them now, will you see the... by Scarbutt on Wednesday May 19, 2021 @07:43PM (#27215815)
Adguard requires an electron app(wut?) to run in the background to provide much of its functionality, is Wipr like this too?
Re:YouTube ads in Safari: you see them now, will you see the... by contriban on Wednesday May 19, 2021 @10:46PM (#27216806)
No. Wipr is a clean content blocker. I don’t know how it handles auto-updates of the blocklist, but I definitely don’t need to keep the app open nor does it add buttons to the interface like AdGuard does.
Re:YouTube ads in Safari: you see them now, will you see the... by ameshkov on Thursday May 20, 2021 @01:37AM (#27217804)
Running the app is not mandatory and neither is adding buttons to the interface. If you just need content blockers, you can simply enable just them, close the app and forget about it until you feel the need to check filters updates.
Re:YouTube ads in Safari: you see them now, will you see the... by saagarjha on Thursday May 20, 2021 @05:23AM (#27219105)
Last I checked, selecting elements to block also required running the Electron app, which is somewhat annoying and unnecessary.
Re:YouTube ads in Safari: you see them now, will you see the... by acdha on Wednesday May 19, 2021 @08:41PM (#27216134)
I think you’re right from the short-term perspective but largely irrelevant long-term. If Safari allowed arbitrary code execution, it’d be a little better for as long as it took publishers to deploy first-party ad injection. We’d still get the security problems, though.

You can already see what that’s like with podcasts where local ads are spliced right into the audio file. You’re not stopping that short of doing something like buffering the content and running it through an AI, and if that became widespread we’d just see more embedded placement (“Hey, protagonist, why are you so irresistibly sexy?” “It’s these new briefs from My Undies”).

Adtech is a multi billion dollar industry and the people making the content you want are enthusiastically supporting them. This is not a problem which technical tricks can solve – as soon as you do something effective, Google can deploy hundreds of engineers with huge resource budgets to foil you. That won’t change without something like regulatory changes to lower the financial pressure.

Re:YouTube ads in Safari: you see them now, will you see the... by kibwen on Wednesday May 19, 2021 @09:23PM (#27216349)
> if that became widespread we’d just see more embedded placement

Which is completely desirable. The problem isn't "ads", it's "targeted, personalized ads that rely on thoroughly destroying the the privacy of everyone on the internet in order to function". If a show/podcast wants to vet its own advertisers and endorse a specific product, that's great; it establishes a concrete relationship with the advertisers that has more value to both users and content creators than the anonymous, unvettable system of opaque middlemen currently peddled by targeted ad networks.

Re:YouTube ads in Safari: you see them now, will you see the... by acdha on Wednesday May 19, 2021 @10:14PM (#27216594)
That’s one option but it’s not what’s happening. Historically ads were easily blocked because they came from different domains; as we’re seeing now increased deployment of blockers has lead to things like CNAME cloaking or even first-party hosting. The amount of money at play is enough that they’re going to keep trying more invasive approaches as the old ones become less profitable.

The podcasts I mentioned aren’t running their own ad network, they’re using a service which injects audio segments into your download. I’d expect things like that to become more common as ad revenues decline, with an endgame something like CDNs inserting tailored content directly to avoid any other hostnames or paths which easy to block.

Re:YouTube ads in Safari: you see them now, will you see the... by yc12340 on Thursday May 20, 2021 @01:31AM (#27217773)
> Historically ads were easily blocked

Historically ads were served by the site owner at their own discretion. Prior to that ads were served by TV and radio channels. None of those approaches were easy to block.

Dedicated ad networks on separate domains are relatively recent fad (since ~15 years ago). A lot websites still ship first-party ads, many have never stopped to.

Re:YouTube ads in Safari: you see them now, will you see the... by ajsnigrutin on Thursday May 20, 2021 @03:09AM (#27218272)
First party ads are also a part of many content creators (eg. "this video is sponsored by NordShadowraid Wallet"), and currently, the only way to block them is via crowdsourcing (eg. sponsorblock addon).
Re:YouTube ads in Safari: you see them now, will you see the... by lern_too_spel on Wednesday May 19, 2021 @08:49PM (#27216169)
If I can recognize an ad, I can construct JavaScript that can recognize that ad too. The current extension APIs let me inject that JavaScript, while the declarative ad blocking APIs do not.
Re:YouTube ads in Safari: you see them now, will you see the... by acdha on Wednesday May 19, 2021 @10:07PM (#27216555)
This is a constant arms race, as anyone who’s looked at Facebook’s DOM knows, and if you’re successful it pushes to the end state I mentioned of ads becoming very similar to the content. The companies which depend on ad revenue aren’t going to go out of business voluntarily and many of them will find alternative paths to those ad dollars.
Re:YouTube ads in Safari: you see them now, will you see the... by benhurmarcel on Thursday May 20, 2021 @05:16AM (#27219047)
> where local ads are spliced right into the audio file. You’re not stopping that short of doing something like buffering the content and running it through an AI

This can be solved by crowdsourcing it: https://sponsor.ajay.app/

Re:YouTube ads in Safari: you see them now, will you see the... by acdha on Thursday May 20, 2021 @09:25AM (#27220803)
Currently, to some extent. Again, my point is that there’s a ton of money at stake and it’s not like companies are going to say “welp, someone blocked our ads, time to close up shop”. Each time blockers have gotten better, all that’s happened has been the ad delivery systems getting more sophisticated — and since the providers can run the same tools I don’t think that’s going to change. Containing some of the damage by, for example, continuing to restrict JavaScript at least has some benefits but things like YouTube ads are the same format and delivery path.
Re:YouTube ads in Safari: you see them now, will you see the... by fomine3 on Wednesday May 19, 2021 @09:03PM (#27216251)
It's cat and mouse game, but currently ad blockers win all battles.