Another Twitch Anti Adblock Plus measure

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Virante

Re: Another Twitch Anti Adblock Plus measure

Post by Virante »

I guess this is just a temporary fix, but by putting in pubads.g.doubleclick.net as a custom filter and then running Twitch, I wasn't experiencing any ads.

Moreover, when an ad WOULD show up, people in the chat would complain, but nothing popped up for me.

Don't take this as an end-all, be-all fix. I just think Fiddler did its job in finding the source of the weird Twitch ads -- for now.
Virante

Re: Another Twitch Anti Adblock Plus measure

Post by Virante »

Well, I was right. It isn't an end-all, be-all fix.

Checked other channels. In a couple, I got the "could not load this ad for you" ad and in others I didn't get anything (I could tell 'cause the channel's chat would explode with "ADDDDDDDD").

So I guess it depends on what ad loads and what channel you're in?

I don't know. Could anyone else test this out more?
atkdef
Posts: 4
Joined: Sun May 18, 2014 6:07 am

Re: Another Twitch Anti Adblock Plus measure

Post by atkdef »

Sorry about the mention on fiddler; fiddler may not work.

The transfer may not be in http.

It's likely that pcap (wireshark) will work, although i haven't tested it.


Virante, I will pm you if you register here or leave something for contact.
Virante

Re: Another Twitch Anti Adblock Plus measure

Post by Virante »

Eh, I'm not entirely savvy when it comes to testing with these programs. I just went ahead with your comment about Fiddler because I could follow what it was capturing.

I would just like to figure out how to stop that pain-in-the-ass "we could not load this ad for you" warning, even though you can easily close out of it.
atkdef
Posts: 4
Joined: Sun May 18, 2014 6:07 am

Re: Another Twitch Anti Adblock Plus measure

Post by atkdef »

you will know what's happening if you decompile the swf file, but this may not be legit.

yesterday my friend confirmed that fiddler wont work; again, sorry about the incorrect mention on fiddler.

i can send you some more detailed information / solution if you leave something for contact.
jOOOEY

Re: Another Twitch Anti Adblock Plus measure

Post by jOOOEY »

God, this is annoying now because it fills up the entire screen not just a little box.. and i cant cross it out?`any fix?
BlackSorrow

Re: Another Twitch Anti Adblock Plus measure

Post by BlackSorrow »

Now Twich gets even more annoying by muting the channel during the 30seconds popup that is not closable.
But there is a solution!
Just watch Twitch via the VLC Media Player. I've tried this and no add will pop up at all.
I've watched one stream in two windows, one my browser, the other the VLC, in the Browser popup, in VLC, no popup :D
So just google VLC Twitch or look on youtube for tutorials, its pretty simple do install.
It would also be nice if you would let the stream run in your browser muted in the back so the streamers get some money to support them
fpe
Posts: 2
Joined: Wed Jun 11, 2014 3:11 pm

Re: Another Twitch Anti Adblock Plus measure

Post by fpe »

Virante wrote:Well, I was right. It isn't an end-all, be-all fix.

Checked other channels. In a couple, I got the "could not load this ad for you" ad and in others I didn't get anything (I could tell 'cause the channel's chat would explode with "ADDDDDDDD").

So I guess it depends on what ad loads and what channel you're in?

I don't know. Could anyone else test this out more?
In my observation with fiddler, always when msg pop up ""could not load this ad for you" it loads link like this one:
http://mp.twitch.tv/track/?data=eyJwcm9 ... 99615&ip=1
so now i blocked this to adblock filter like this:
||mp.twitch.tv/track/?*
my others adblock filters on twitch:
||twitch.tv/ads/*
||fan.twitch.tv/ad?*
||fan.twitch.tv/adcompleted?*
||spade.twitch.tv^
||doubleclick.net^
||scorecardresearch.com^
So I'm testing now if any ad/msg will pop up.
Virante

Re: Another Twitch Anti Adblock Plus measure

Post by Virante »

Got the sub begging ad with those filters.
neooxygen
Posts: 3
Joined: Sun Jun 22, 2014 4:01 am

Re: Another Twitch Anti Adblock Plus measure

Post by neooxygen »

atkdef wrote:** Indenting is destroyed.. I tried but I'm unable to fix it.. **

Finally I blocked twitch ads yesterday.

Sorry for not releasing the details of the methods here because:

- I cannot find a way to selectively unblock ads on specific channels; some broadcaster deserve to get the money.

- It is not so legit during the research.

- Not really have a good idea on dealing with possible future patches

Anyway, i can share some useful information to you guys.

If there's any mistakes in my post, please point it out, thanks :)

========

1. I'm unable to reproduce ads

- There are three types of ads: preroll, midroll and postroll. Let's ignore the other two and focus on the most annoying midroll ads.

Actually, when I finished the research on midroll, I can block all these three types of ads.

- Midroll ads can be triggered by the broadcaster, so don't sit in front of the computer and wait for the global midroll broadcast...

For example, one correct way to reproduce midroll ads is to find those who are deemed to broadcast ads at the end of the match in League of Legends category, estimate when the game will be finished and enter the channel in advance.

- Bear in mind that the ads broadcast instruction is approximately 30s PRIOR to showing the ads, so don't enter one channel at the last moment.

- One more reason to focus on broadcaster-trigger ads is that the triggering of ads is complex; only the broadcaster-trigger ads is relatively stable. Stable means the ads are unlikely to be cancelled by previous ads-related behaviours.

2. I cannot find any suspicious network activity

- This should be the most important point which makes twitch ads "undefeatable".

- Yes, the debugger tools in web browsers CANNOT show all the network activities.

- One possible solution is to use fiddler, but I haven't tested it yet. Actually I used another way to do the research.

I cannot think of any more questions now...

Here's some tips on disabling twitch ads.

- I have tested two methods of disabling twitch ads. Although both of them work perfectly at the moment, but not perfect in other aspects.

- At first, I modified the swf file to bypass the ads-related actions, and used the modified one to replace the origin one.

- Advantage:

- Theoretically this method can be updated to deal with future twitch updates.

- Disadvantages:

- Need reversing. Hmm, you know it's not so legit right?

- Will be painful if the swf file is obfuscated, although it's not obfuscated at the moment.

- Need to deal with the same origin policy (currently the biggest cons among these three).

- Later, I find out that blocking a specific domain solves everything.. This domain should be able to be discovered by fiddler.

- Advantage:

- Simple. This can even be done in router.

- Disadvantage:

- May not be able to deal with future twitch patches.

Let's go back to abp.

It is possible to use Adblock Plus to block twitch ads?

At the moment, the answer is, no.

Adblock Plus, or I should say, the web browsers, does NOT support blocking twitch ads individually.

How to block something that cannot be captured by the browser? Simple at this.

Hopefully information above can help you guys :)


If you have any ideas on making ads available while not affecting the normal watching, please let me know :)
These ads are getting worse and worse. I took a good look at what you said:

In twitchplayer.<x>.swf, there appears to be two main sections which govern this behavior:

com.google.ads.ima
tv.twitch.ads.internal

The only external references I can see offhand are in:

tv.twich.ads.internal.Twitch_IMARequestURLBuilder (1 external)
com.google.ads.ima.api.AdsLoader (3 external)

I have tried blocking those 4 external references in the Windows hosts file, but I still get some failed to load anti-adblock measures.

Any further advice would be greatly appreciated, atkdef.

I don't want to try and strip out parts of the swf and force the new version of the swf to load, that would be too far.

edit: There was a bunch more references to LiveRail in there, along with Google's IMA.
Last edited by neooxygen on Sun Jun 22, 2014 5:03 am, edited 1 time in total.
neooxygen
Posts: 3
Joined: Sun Jun 22, 2014 4:01 am

Re: Another Twitch Anti Adblock Plus measure

Post by neooxygen »

I am no expert on this, but I can sum up the situation for others as I understand it:

Adblock Plus can act on HTML only.

Twitch has designed a scheme that the during-stream ads (not preroll) are all governed by the Adobe Flash player client.

The Flash player makes the external request to a content server for the ads.
The Flash player detects itself "adLoadError and "adPlayError" should an ad fail to run.
The Flash player decides how this should be handled via varying anti-adblock overlays.

There appears to me to be several lines of attack.

1) Determine the external content server (either via packet capture or flash player decompilation), and block that. The downside are that a) The server could be changed, trivially; b) the player could easily have an additional anti-adblock overlay added for when the player can't reach the content server (does this exist already)?

2) Modifiying the flash player file. This may be legally questionable depending on country, I can't advise on this. This would need to be redone every time there were major changes to the twitch flash player or to their CDN.

3) Using another player. VLC etc, or should there eventually be a HTML5 player that Adblock Plus would be able to control directly?

4) Modifying Adblock Plus to be able to control flash applets. Is this even possible? I can't imagine it would be easy.

This is important though. What Twitch has created could easily be implemented by any other website able to encapsulate their content in flash, including the likes of Youtube.
asdf

Re: Another Twitch Anti Adblock Plus measure

Post by asdf »

What about building our own ad server, redirecting the requests to it, and serving a blank, zero second ad?
Dragonheart91

Re: Another Twitch Anti Adblock Plus measure

Post by Dragonheart91 »

Since the ad notifications are now covering the whole window and muting the streamer, I'm looking for a solution. I don't know much about the ad servers or coding exceptions, but would any of you be willing to explain to me how to disable the ad notification in layman's terms?
atkdef
Posts: 4
Joined: Sun May 18, 2014 6:07 am

Re: Another Twitch Anti Adblock Plus measure

Post by atkdef »

very sorry, but i did not have time to edit my post.

for weeks i was preparing for the exams and have little time on this.

====

my posts above may be misleading, but i will try to make it clear here.

however, what i say below is out of my memory; it may not be 100% accurate, but you can get it.

====

if you decompile the swf file, advertisement-related codes are in adsoverlay.

block the function (return directly) can disable advertisements.

however, this method requires someone (or yourself) to build up httpd and host the modified swf file.

also, because of the same origin policy, reverse proxy is needed.

for test purpose, you can use hosts to add one entry for a not-really-exist twitch domain to bypass that policy.

====

if you want to be lazy, block one domain can finish everything.

i decide not to post that domain here (as i may not have time to do follow-up research on this, i dont want this method to be patched)

anyway, i can pm whoever really want to do research on this.

you can get this domain by reverse back to the most original caller of the midroll advertisement.

====

in the end, one tip for you guys.

to enable the twitch player debug output, add player_debug to the url

e.g.

twitch.tv/xxxxxx?player_debug

not sure whether twitch records such access...

if you dislike sending player_debug as param to twitch server, you can also find the entry of the swf file, and modify the debug bit set there.

the debug output may help you find some clue.

====

@swagz

i cannot pm you. you account is deleted/banned?
neooxygen
Posts: 3
Joined: Sun Jun 22, 2014 4:01 am

Re: Another Twitch Anti Adblock Plus measure

Post by neooxygen »

For anyone else trying to find it, AdsOverlay is in tv.twitch.ads. I am more than somewhat hampered by my lack of understanding of actionscript.

atkdef has PM'd me his solution, and I have to say I think he's a genius.

He (from as far as I can see) has found the way in which the twitch server sends the flash client basic data (not video/ads), including the triggers for the client to begin playing ads. If you then block that, the client will not receive the instructions to run ads in the beginning.

This information is not in any previously mentioned sections of the flash actionscript, it is in tv.twitch.video.internal. atkdev clearly has a very very strong understanding of what he's doing to have found it :D

If this was released publically though, twitch could easily change their client communication / obscure the client from decompilation, or worse simply just change the flash player that if it is unable to receive basic data from their server to display a permanent full page anti-adblock overlay. This, sadly, isn't a solution that would work for public release imo.

atkdef, good luck with your exams, and thank you for your work so far on this. Any further ideas you can come up with would be greatly appreciated by all.
Locked