Page 1 of 1

cz sites - Filtering domain cookies by their names

Posted: Thu Dec 08, 2016 12:18 pm
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.

Re: Filtering domain cookies by their names

Posted: Thu Dec 08, 2016 6:07 pm
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.

Re: Filtering domain cookies by their names

Posted: Thu Dec 08, 2016 7:11 pm
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

Re: Filtering domain cookies by their names

Posted: Thu Dec 08, 2016 7:44 pm
by smed79
or

Code: Select all

/\.zive\.cz/.*?\w{45,}/$script
zive.cz##.bx-leaderboard

Re: Filtering domain cookies by their names

Posted: Fri Dec 09, 2016 3:23 pm
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.

Re: Filtering domain cookies by their names

Posted: Thu Dec 15, 2016 4:06 am
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 :-(

Re: Filtering domain cookies by their names

Posted: Thu Dec 15, 2016 8:25 am
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

Re: cz sites - Filtering domain cookies by their names

Posted: Wed Dec 21, 2016 10:51 am
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.

Re: cz sites - Filtering domain cookies by their names

Posted: Wed Dec 21, 2016 10:57 am
by mapx
you should post your filter issues here:
https://github.com/tomasko126/easylistc ... vak/issues

Re: cz sites - Filtering domain cookies by their names

Posted: Wed Dec 21, 2016 6:05 pm
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.

Re: cz sites - Filtering domain cookies by their names

Posted: Wed Dec 21, 2016 6:09 pm
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.