Live data from Hacker News

Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

ericdraken.com

11–20 of 659 posts

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#11
post #10

The real tragedy: > In fact, the YouTube app is zippier because fewer connections are made to ad URLs in the first place. I swear on LG TV that webOS runs at a smooth 60 FPS when it's not connected to Wi-Fi and slows down as soon as it phones home for whatever telemetry and ads LG intend to serve me...

This shows how little they care, or poor engineering, or both. Failing all engineering effort, they could have use a beefer CPU...

So they can run more ads, negating the performance boost. The answer isn’t simply throw more cpu at the problem.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#12
I've been MITM'ing my traffic to, among other things, strip ads and rewrite pages with things like custom CSS, ever since I discovered The Proxomitron over 2 decades ago. It does tend to get me profiled as a "bot" by CloudFlare and such, but there are not-so-trivial ways around that too. It also shows why things like remote attestation are hazardous for user freedom.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#14
post #7

The real tragedy: > In fact, the YouTube app is zippier because fewer connections are made to ad URLs in the first place. I swear on LG TV that webOS runs at a smooth 60 FPS when it's not connected to Wi-Fi and slows down as soon as it phones home for whatever telemetry and ads LG intend to serve me...

In a previous role I was tasked with increasing the lighthouse/pagespeed score across some web properties. After some iterations and very little improvements we would be asked what else we could do. Did we need to speed up the backend? Could we lower latency, etc… The solution: I set up a query param that would disable google tag manager. All of the crazy tracking and telemetry stuff we didn't control was the biggest…

Those analystic spend most of its time trying to tell bots apart from real browsers. This is basically an arm race.

I am not sure who is to blame, but I guess there is no way we can get the simple web we loved back.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#15
post #8

Very nice writeup. I was kinda hoping to find a way to MITM devices that don't allow the installation of custom CA's. I have some IoT devices that do not expose a local API and only exposes the data through the cloud, and would like to capture the device to cloud traffic... I guess the only way to do that would be to dump the flash memory, replace the CA and reupload the dump to the device?

It’s called certificate-pinning if they “hard coded” a certificate, yes then you have to replace/remove it and move the same certificate to your MITM proxy to decrypt traffic.

A good write up here for ways to try to intercept IoT devices without any hardware/firmware job: https://robertheaton.com/2019/11/21/how-to-man-in-the-middle...

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#16
post #6

that's not really a "flaw" in protobuf; the protobuf is Working As Intended by decoding the field in a different place when you modify it. i am not sure how one could possibly characterize that as a "flaw," since protobuf is a field-numeric length-prefixed protocol in the first place. it makes a (reasonable) assumption that bytes won't be messed with over the wire, leaving integrity to the reader, so even if this _wa…

It says January 2022. So likely if they wanted to harden the protocol after the blog post, they would already have.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#17

I've been MITM'ing my traffic to, among other things, strip ads and rewrite pages with things like custom CSS, ever since I discovered The Proxomitron over 2 decades ago. It does tend to get me profiled as a "bot" by CloudFlare and such, but there are not-so-trivial ways around that too. It also shows why things like remote attestation are hazardous for user freedom.

> It does tend to get me profiled as a "bot" by CloudFlare

Since Cloudflare employees are known to lurk here, I'd like to know: is this considered a false positive, or working as intended?

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#18
>I propose heuristically scanning for query and path parameters of ad URLs with high entropy and using those as keys (fingerprints).

>https://xn--rr6sn-uxa0n-t8gz-vg6i.googlevideo.com/initplayba... &orc=1&oeis=1&c=IOS&oss=1&oda=1&oad=5500&ovd=5500&oaad=11000&oavd=11000 &ocs=700&oputc=1&oses=1&ofpcc=1&osbr=1&osnz=1&msp=1&odeak=1&odepv=1 &osfc=1&id=58cc678216d6aaca&ip=121.35.98.26&initcwndbps=2125000 &mt=1640373902

This is one of the many things that make it _exactly_ like malware. Ads are delivered the same way malicious code or artifacts would be delivered to your device.

Weird-ass random subdomains, obfuscated query params -- no legitimate service that works for the user's benefit should behave like this.

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#19

Why is toggling `has_premium_lite_entitlement` cheating compared to anything else? What would it do?

I am assuming it would completely prevent ads (so no need to figure out how to filter/block them) as the name of this field suggests that it might be used by YouTube to figure out if someone has a premium subscription or not. Toggling this field would not have led the author to the later protobuf rabbit hole as there would have been no need for it.

From personal experience, we programmers/hackers sometimes like to make things more complicated than they need to be just for the fun of it (and learning experience too!).

Re: Block YouTube ads on AppleTV by decrypting and stripping ads from Profobuf

#20
post #18

>I propose heuristically scanning for query and path parameters of ad URLs with high entropy and using those as keys (fingerprints). > https://xn--rr6sn-uxa0n-t8gz-vg6i.googlevideo.com/initplayba... &orc=1&oeis=1&c=IOS&oss=1&oda=1&oad=5500&ovd=5500&oaad=11000&oavd=11000 &ocs=700&oputc=1&oses=1&ofpcc=1&osbr=1&osnz=1&msp=1&odeak=1&odepv=1 &osfc=1&id=58cc678216d6aaca&ip=121.35.98.26&initcwndbps=2125000 &mt=1640373902 Th…

>_exactly_ like malware

But it's googlevideo.com. I know this is Google/YouTube's domain so the rest doesn't matter.

Post reply on HN