Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soft98.ir: detection #14296

Closed
6 tasks done
0x416c69 opened this issue Aug 7, 2022 · 14 comments
Closed
6 tasks done

soft98.ir: detection #14296

0x416c69 opened this issue Aug 7, 2022 · 14 comments

Comments

@0x416c69
Copy link

0x416c69 commented Aug 7, 2022

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

URL(s) where the issue occurs

https://soft98.ir/
https://soft98.ir/internet/web-browser/3545-microsoft-edge-2.html

Describe the issue

JavaScript gets rid of the whole content element and changes the hrefs of the download links when the uBO is detected.

Screenshot(s)

chrome_2022-08-07_08-55-40

Which roughly translates to disable ad blocker and refresh the page.

uBlock Origin version

1.43.0

Browser name and version

Chrome 103.0.5060.134

Settings

Notes

New anti ad block does some heuristics on elements containing the "c1e1y2*" classes.

List of the heuristics:
ss1

If the above function throws an exception, the following catch block will be executed:
2022-08-07_08-31-07-AM

Which is pretty explanatory for itself.

Specifically, this condition is the cause of the very first throw in my uBO:
chrome_2022-08-07_08-33-05

$panel here is the same as n in the first screenshot.

div.c1e1y2__inner is the cause of the exception when uBO built in filter (main one) is enabled, with PersianBlocker filter list alone the first element to cause this exception is: c1e1y2-li2nk c1e1y2

cc @MasterKia

@MasterKia
Copy link
Member

MasterKia commented Aug 7, 2022

I just pushed a fix.
For uBO, I decided thatsoft98 filters would no longer be in PersianBlocker and would only be in Quick-Fixes.

So force update PersianBlocker and Quick-Fixes.

Then you can manually force update the Quick-Fixes list to get the latest filters.

I have to push new fixes everyday because the site admin has so much respect for its users that he updates the site daily to circumvent the filters.

@0x416c69 If you have expertise in Javascript and you can defuse their anti-adblock using uBO's resources library, I'd be happy to incorporate your fixes.

@MasterKia
Copy link
Member

Can anyone defuse their anti-adblock?
To trigger it, disable Quick Fixes and use ||file.soft98.ir^.

@okiehsch
Copy link
Contributor

okiehsch commented Aug 7, 2022

soft98.ir##+js(nostif, , 3000)

It's the setTimeout function in the second screenshot of the OP.
3e+3 = 3000

@MasterKia
Copy link
Member

Should this issue get the "ongoing" label?
Similar to #13144

@okiehsch okiehsch added the ongoing ongoing issue label Aug 7, 2022
@0x416c69
Copy link
Author

0x416c69 commented Aug 7, 2022

soft98.ir##+js(nostif, , 3000)

I'm not familiar with the JS scriptlets but having read the resources library page a bit, this workaround is hit or miss. The reason that setTimeout prevention works sometimes is that the "df" function is getting called in the JS initialization while the page DOMs are not yet downloaded completely so the first iteration wouldn't throw an exception simply because the DOMs are not there. Considering that this website is primarily used by the locals, we have an extremely low latency so the first iteration is all it takes to remove the whole page content.

I suggest that for each of the elements that is modified, it should follow the checks done under the "tu" function. That would mean replacing those images, div blocks, etc. with a blank 16x16 image and/or set the DOM width/height property accordingly. I think the set.js scriptlet would do the job here, modifying the "style.width/height" property and offsetHeight/offsetWidth properties.

@MasterKia
Copy link
Member

MasterKia commented Aug 7, 2022

@gorhill What do you suggest to do when the site admin has been changing the site source manually every hour since almost a year now and also self-sabotages his site just to evade uBO's filters?

There's a userscript for this site that defuses the anti-adblock and also removes the ads and it's evasion-proof, maybe it could be added to URL-specific resources similar to twitch-videoad.js or outbrain-widget.js so we could have soft98.ir##+js(soft98-antiadb).

cc @JobcenterTycoon

@gorhill
Copy link
Member

gorhill commented Aug 7, 2022

What do you suggest to do when the site admin has been changing the site source manually every day #10883 and also self-sabotages his site just to evade uBO's filters?

If it's a burden, just stop trying to work around it -- you don't have to "win" against such sites, your personal time and quality of life are more important than trying to make content blockers perfect all the time everywhere for everybody.

@0x416c69
Copy link
Author

0x416c69 commented Aug 7, 2022

@gorhill I was wondering if you could take advantage of the extension API and counter measure some of the common anti ad block techniques, such as checking for the size property/opacity/existence/attribute manipulation so when the JS VM asks for such data you would just return the original (fake) value.

This would improve the overall quality of the entirety of uBlock Origin since these methods are very common in all of the detection scripts and should decrease the amount of detection issues posted here.

@MasterKia
Copy link
Member

MasterKia commented Aug 7, 2022

If it's a burden

Well I suspect there's a trend going on: "Bullying your way out of content blockers"

If no content blocker can defuse this site's anti-adb then it's a lucrative way for others to follow suit.

Aternos is one example.

@JobcenterTycoon
Copy link
Contributor

Many adblock detection scripts which gettting reported here using a try...catch block to detect adblocking. Unlike older common scripts redirecting a nooptext doesn’t work so every single site need to be fixed. More advanced scripts also checking the length of the response to be sure the real file has been served and not the empty one from the uBO no-fetch-if scriptlet.

advanced scripts which really deep checking elements with getComputedStyle are less common. I don’t know if such things like getComputedStyle can be fooled without a custom script for every site.

@gorhill
Copy link
Member

gorhill commented Aug 7, 2022

Ultimately, visitors have the last word, they can also choose to not visit the site anymore when it becomes too unpleasant to visit.

In any case, I don't see the anti-blocker being triggered with AdGuard, using the same list. I see only 3 network requests being blocked as per AdGuard's logger.

@MasterKia
Copy link
Member

MasterKia commented Aug 7, 2022

I don't see the anti-blocker being triggered with AdGuard, using the same list. I see only 3 network requests being blocked as per AdGuard's logger.

For trigger try blocking this amazon banner:
Screenshot_20220807_232021

Or the "آسیاتک" banner on the right sidebar.

@MasterKia
Copy link
Member

MasterKia commented Aug 7, 2022

Ultimately, visitors have the last word, they can also choose to not visit the site anymore when it becomes too unpleasant to visit.

True that, but this has gone beyond "unpleasant", the site is being actively hostile towards the users who chose to not see ads by installing a blocker.
IMO sites disrespecting the user freedom deserve to be strict-blocked.

@0x416c69
Copy link
Author

Closing this since after using this extension: https://addons.mozilla.org/addon/soft98-anti-adblock-bypass/ this problem is gone now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants