cz sites - Filtering domain cookies by their names

Various discussions related to Adblock Plus development
Post Reply
AlesCZ
Posts: 5
Joined: Thu Dec 08, 2016 2:11 am

cz sites - Filtering domain cookies by their names

Post by AlesCZ »

Hi,
I think that filter file format (and adblocks) should support selective cookie blocking.

There is a huge antiadblock movement in our country and it's successful because of this missing cookie blocking feature. It works this way:
1. Javascript in the website tries to detect an adblocking addon via series of class/id tests and adserver pings at first visit.
2. If adblock is detected, cookie is set with very long expiration.
3. Subsequent http requests are sent with this cookie and server (knowing it's serving to an adblock user) responds with cleverly scrambled html with random classes/ids and with special ads embedded directly inside html with pseudorandom local image urls etc.

That first test is one weak spot but they can change it as quickly as we can change our antidetection whitelists and with every lost battle, eternal cookie is set to all our filter users.
Once this cookie is on, it's almost impossible to target ads in that mess. So it's essential to cancel that one specific cookie. Or at least force them to rename it with every filter update. Nowadays filter updates can't fight ads effectively when they can't delete that cookie.

Example of adblock-immune website:

Code: Select all

http://www.zive.cz/
(first visit is without ads, second visit not)
I suppose syntax should be something like

Code: Select all

||zive.cz$cookie=adb
or with regular expression matching cookie name and with option to block anything except whitelisted good cookies.

Thank you for consideration.
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Filtering domain cookies by their names

Post by lewisje »

I hope you realize there are perfectly capable cookie-managers for the platforms supported by ABP, including EditThisCookie for Chrome and CookieSafe for Firefox; they can keep certain cookies from being set on certain websites.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Filtering domain cookies by their names

Post by mapx »

try

Code: Select all

@@||zive.cz^$generichide
||$script,domain=zive.cz,third-party
@@||zive.cz/*adv$script
zive.cz##.ozn:first-child + DIV[style]:last-child
@@||code.jquery.com^$domain=zive.cz
|http://www.zive.cz/$script
@@||zive.cz/Client.Scripts/*
@@||zive.cz/*/js/
connect.zive.cz###content-lead
User avatar
smed79
Posts: 1224
Joined: Thu Jan 14, 2010 11:51 pm
Location: EasyList Forum
Contact:

Re: Filtering domain cookies by their names

Post by smed79 »

or

Code: Select all

/\.zive\.cz/.*?\w{45,}/$script
zive.cz##.bx-leaderboard
AlesCZ
Posts: 5
Joined: Thu Dec 08, 2016 2:11 am

Re: Filtering domain cookies by their names

Post by AlesCZ »

Thanks for filters on Zive.cz!

I know there are cookie managers but I believe this should be the part of adblock filters because it's integral part of adblock detection and advertisements in general. And those "bad" cookies are closely related to adblock activity therefore their list should be mantained together with other filters.

If server knows you are using adblock it can send you damaged content or no content at all. Not just content filled with somehow cunningly disguised ads but really damaged with missing parts that no filter can renew. My point is that server should never know about adblock in the first place - half of the battle is lost when it can tailor html specifically for adblock users.
AlesCZ
Posts: 5
Joined: Thu Dec 08, 2016 2:11 am

Re: Filtering domain cookies by their names

Post by AlesCZ »

Reflex.cz and Games.cz are using this cookie-locking of adblock users too. It's too complicated to distinguish ad scripts from ordinary scripts :-(
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Filtering domain cookies by their names

Post by mapx »

add

Code: Select all

@@||reflex.cz^$generichide
@@||img.blesk.cz/static/data/blesk/reklama/advertisment.js
@@||img.reflex.cz/js/base-cz/advert.js?*
reflex.cz###ads-lead
||reflex.cz^$script
@@||img.reflex.cz/js/*jquery
@@||img.reflex.cz/js/login/login.min.js?*
for games

Code: Select all

@@||tiscali.cz^$generichide
||games.tiscali.cz^$script
AlesCZ
Posts: 5
Joined: Thu Dec 08, 2016 2:11 am

Re: cz sites - Filtering domain cookies by their names

Post by AlesCZ »

Why is this thread moved to Firefox support? It's not related to any particular browser.

They are changing URL system several times a week. It seems they are all using this "solution":

Code: Select all

https://www.antiadblock.com/
Cookie filter would be much more effective in fighting this.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: cz sites - Filtering domain cookies by their names

Post by mapx »

you should post your filter issues here:
https://github.com/tomasko126/easylistc ... vak/issues
AlesCZ
Posts: 5
Joined: Thu Dec 08, 2016 2:11 am

Re: cz sites - Filtering domain cookies by their names

Post by AlesCZ »

I know about it and I've already contributed to their other forums at https://easylist-czech-and-slovak.tende ... iscussions. Half of all of current open issues there and on github are caused by this type of anti-adblock. Admins of easylist are fighting bravely but they are losing half the time.
It appears those anti-adblock sites are beginning breaking some parts (navigation popups, login form etc.) and I suppose that can't be fixed by adding more filters because filters are clientside and anti-adblock is serverside. If they remove login form from html for people with adb cookie, there is no way to return it, right?

Proposed solution of mine is to attack the detection and to not let the server know if a user does have an adblock or does not. I know that wouldn't stop the fight completely but it would remove currently the most exploited weakness of our filter army.

If you don't think this is a good idea, sorry for wasting your time and keep up good work making the web sites clean :)

Thank you for your patience.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: cz sites - Filtering domain cookies by their names

Post by mapx »

well, if you want to catch the devs opinions / attention, just file an issue ("change" type) on the bug tracker.
https://issues.adblockplus.org

However, in case of that cookie just delete it and add the right filters. You didn't provide any feedback on the filters above.
Post Reply