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 ads and detection #10883

Closed
6 tasks done
MasterKia opened this issue Dec 12, 2021 · 29 comments
Closed
6 tasks done

soft98.ir ads and detection #10883

MasterKia opened this issue Dec 12, 2021 · 29 comments

Comments

@MasterKia
Copy link
Member

MasterKia commented Dec 12, 2021

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.html

Describe the issue

Related to: #3011

Some of these filters from the uBlock filters aren't working anymore (similar filters can be found in the IRN: Adblock-Iran list from @farrokhi):

soft98.ir##+js(nostif, e(), 3000)
soft98.ir##+js(set, Object.prototype.checkAdBlocker, noopFunc)
@@||soft98.ir^$ghide

soft98.ir##.a1d2x
||redlini.ga^
  • The soft98.ir##.a1d2x doesn't work anymore because a1d2x is now called a7d8x in the website and it seems to be constantly changing, so we need something regex like soft98.ir##.a*x (Screenshot 1).

  • The ||redlini.ga^ doesn't work anymore because the URL has changed to orgiin.gq (orgiin.gq/padvish3.az) so a cosmetic filter to block the ads would work more efficiently instead. (because it seems that the website developer changes the URL on purpose to evade adblockers)

  • The soft98.ir##+js(nostif, e(), 3000) and soft98.ir##+js(set, Object.prototype.checkAdBlocker, noopFunc) doesn't defuse the anti-adblock function inside the soft98.ir's jquery.js because it can still detect cosmetic filters like soft98.ir##.a7d8x and disables all links (including download links) (Screenshot 2):

var T = {
    error_a7d8x: "جهت مشاهده لینک، ا�زونه حذ� تبلیغات را در مرورگر خود غیر�عال و دکمه F5 را بزنید",
}
var bK = ".a7d8x, .a7d8x *",
    on = "js-enable-",
    rn = D.get("error_a7d8x", {
        onclick: "location.reload();
        return false;
        "
    });

Screenshot(s)

  • Screenshot 1:
    Break25

  • Screenshot 2:
    Break26

  • Screenshot 3:
    Break27

Notes

Configuration

uBlock Origin: 1.39.2
Chromium: 96
filterset (summary): 
  network: 78477
  cosmetic: 40414
  scriptlet: 16273
  html: 0
listset (total-discarded, last updated): 
  added: 
    IRN-0: 1315-0, 1m
  default: 
    easylist: 61638-10, 3m
    easyprivacy: 26484-17, 3m
    plowe-0: 3687-810, 3m
    ublock-abuse: 72-0, 3m
    ublock-badware: 3565-61, 3m
    ublock-filters: 29884-130, 3m
    ublock-privacy: 189-2, 3m
    ublock-unbreak: 1712-39, 3m
    urlhaus-1: 7830-0, 2m
filterset (user): [empty]
modifiedUserSettings: [none]
modifiedHiddenSettings: [none]
supportStats: 
  launchToReadiness: 359
  launchFromSelfie: false
@uBlock-user
Copy link
Contributor

Can't repro anti-adblock, I only see ads.

@MasterKia
Copy link
Member Author

MasterKia commented Dec 12, 2021

Can't repro anti-adblock

Add soft98.ir##.a7d8x to my filters and refresh the page and try to click on the green "ادامــه مطلـب" button.

@MasterKia
Copy link
Member Author

MasterKia commented Dec 12, 2021

Please reopen the issue because the anti-adblock has been updated and it's back.

When I created the issue, the site used jquery.js v2 to v3

@MasterKia
Copy link
Member Author

Can we force the site to use a modified version of jquery.js without the anti-adblock function?

@uBlock-user
Copy link
Contributor

uBlock-user commented Dec 12, 2021

Please reopen the issue because the anti-adblock has been updated and it's back.

fixed, admin is watching, re-opening only attracts un-necessary attention.

--

When I created the issue, the site used jquery.js

Admin changed the detection method, versioning change is to reflect that.

Just avoid hotlinking any site resources/site itself here like v2, v3, that leaks referrer and that's how admin can see where the request is coming from.

DRSDavidSoft added a commit to DRSDavidSoft/additional-hosts that referenced this issue Dec 12, 2021
@DRSDavidSoft
Copy link

As @mapx- also stated in #3011, the Soft98 admins are tracking changes to many lists -- that especially focus on combatting the useless ads on Soft 98.

As previously discussed with him (I believe his name is Salar), he genuinely has the impression that hiding the useless Padvish ads (and kaprilla, etc) on the site directly results in lost revenue. (Personally, I disagree, since I never look at, let alone click on these scummy and flashing ads on the page).

In any case, as @MasterKia also mentions, it is indeed possible to replace the (in-aptly named) jquery.js file with a version that doesn't mess with the download links, but it's also possible that the admins/developers change the HTML in a way that would render this approach unsuitable.

Personally, the user script that I wrote can handle the changes to class names, and also removes the useless elements in a way that Soft98 can't easily detect; and additionally if they could detect it and disable the download links' functionality, my script attempts to restore the correct download links back to the initial state.

It would be nice if uBlockOrigin could support cases slightly more complex like this natively, but since I already use Tampermonkey to fix up a couple of other sites that pull stunts similar to this, I thought it'd be worth the attempt.

AdGuard is currently using a similar approach to diffuse Soft98's ad-detecting mechanisms, I believe.

Watching this issue and #3011 for possible future development. In the meantime, I invite people to give my user script a try, it could work both as a standalone script, or in tandem with uB0. Cheers! 😄

@MasterKia
Copy link
Member Author

The ads is now back again:
image

@detectbug
Copy link

Если UBLOCK активирован, поиск не работает и новости фотографии не отображаются.

@MasterKia
Copy link
Member Author

The ads is back again.

@uBlock-user
Copy link
Contributor

text ad, not clickable anymore.

@MasterKia
Copy link
Member Author

MasterKia commented Jan 5, 2022

text ad, not clickable anymore.

They are reinserting the text ads, when the website is loaded the text ads are gone for a few seconds then they reappear and now they're clickable.
Also the jguery.js is now on v6 v8 v9.

@MasterKia
Copy link
Member Author

MasterKia commented Jan 8, 2022

@mapx- Please reopen.

Edit:
This website is known of updating their anti-adblock/ads very often.

s0ft98-defuser.js: https://github.com/DRSDavidSoft/user-scripts/raw/master/soft98_ad-unblocker.user.js

Works with TamperMonkey.

@mapx- mapx- reopened this Jan 8, 2022
@uBlock-user
Copy link
Contributor

s0ft98-defuser.js: https://github.com/DRSDavidSoft/user-scripts/raw/master/soft98_ad-unblocker.user.js

If you're suggesting adding that only gorhill can add that. Then again, it can also be easily bypassed if the admin is willing to fight back.

@MasterKia
Copy link
Member Author

MasterKia commented Jan 9, 2022

if you're suggesting adding

I'm suggesting that maybe it could help to solve the issue without a userscript and with scriptlets instead, but adding it to uBO is a good solution too.

it can also be easily bypassed if the admin is willing to fight back.

Well so far admin's attempt to bypass uBO hasn't affected that userscript yet and it still works despite the ad-reinsertion, but that could change as you said.

if the admin is willing to fight back

I've talked to @DRSDavidSoft and he told me that he's willing to further maintain the userscript in the event that the admin applies a bypass.

@uBlock-user
Copy link
Contributor

@gorhill

@DRSDavidSoft
Copy link

DRSDavidSoft commented Jan 9, 2022

@uBlock-user @gorhill @MasterKia -- sorry before hand for the long comment, as I tend to usually write

Hey all, I've written this userscript since (to the best of my knowledge) uBlock Origin lacked the functionality to either:

  1. preserve the download links, before they get removed
  2. Block specific javascript running based on what it's doing

I'm willing to maintain my userscript to the best of my ability. I would very much rather to not rely on a userscript myself, but as long as the features I'm using (Sentinel to detect new insertions, ability to preserve original tag href, etc) is not present in the uB₀'s core, I think this is the way to go.

I'm pretty much an anti-ads freak, whenever I see any type of ads, I feel the need to nuke them from the orbit! 😅 So I'm pretty willing to maintain my userscript -- though, if it's going to be officially added to uB₀ (kind of like how AdGuard has a similar userscript), I would like to re-write it from scratch with better coding styles (and less swear words, lol)

As you can see from the commit history, it's been working for six months, after the latest changes I did (you can read the source code). The only commit after that was to fix links not being able to clicked on, which due to what @uBlock-user said:

text ad, not clickable anymore.

I figure out that's what disabled links with the target attribute, and caused me to release this path: DRSDavidSoft/user-scripts@190b464

BTW I've talked to the site owner (@soft98admin on Telegram) -- he's a nice and pretty cool guy, but he seems not to understand that we don't want to click on Kaprilla, Padvish, and other garbageware ads on the website. He refused to share an answer when I asked him if it affects the website not to display useless ads, when the user is not clicking on them anyway.

Instead, he (or the developers) are quite keen on making sure the ads are displayed on the website, possibly to satisfy the ad customers.

Any ways, I tried pushing some filters to the known iranian filters (https://github.com/farrokhi/adblock-iran/blob/master/filter.txt) and that didn't quite work (remnants are still present), so I went ahead and wrote my userscript.

If it's to be included officially in uB₀, I'll be happy to re-write it with uB₀ standards in mind.

@farrokhi
Copy link

farrokhi commented Jan 9, 2022

This is potentially a cat and mouse game, since they closely monitor blocklist updates and adjust accordingly.

@DRSDavidSoft
Copy link

DRSDavidSoft commented Jan 9, 2022

@farrokhi I'm positive that it surely is, that's why in my userscript, I've tried to outsmart them by not using a fixed class name altogether

@gorhill
Copy link
Member

gorhill commented Jan 9, 2022

I won't add a huge scriptlet which is to be used for one single site, and which could become quickly obsolete. For such cases, user scripts is the way to go.

@MasterKia
Copy link
Member Author

MasterKia commented Jan 9, 2022

So uBO is taking ABP's acceptable ads approach?
This site has a rank of 950 in the global ranking (according to alexa).

@gorhill
Copy link
Member

gorhill commented Jan 9, 2022

So uBO is taking ABP's acceptable ads approach?

Now you are just trolling.

This is no different than Twitch for which an external solution is advised.

@uBlock-user
Copy link
Contributor

Adguard themselves are not fixing this site in their own lists and rather moved it to AdGuard Extra for the same reason @farrokhi mentioned. It's not worth it.

@MasterKia
Copy link
Member Author

MasterKia commented Jan 9, 2022

Now you are just trolling.

Sorry.

This is no different than Twitch for which an external solution is advised.

Well that's true. AFAIK it's only Twitch and s0ft98, for now.

It's not worth it.

I'm afraid what would happen if more sites start to adapt the same (simple) solution where they put all of their site's functionality in a jquery.js (or other in-aptly named files) and implement ad-reinsertion as well.

@uBlock-user
Copy link
Contributor

where they put all of their site's functionality in a jquery.js (or other in-aptly named files) and implement ad-reinsertion as well.

You install AdGuard Extra, it specifically deals with such sites.

@gorhill
Copy link
Member

gorhill commented Jan 9, 2022

if more sites start to adapt the same (simple) solution where they put all of their site's functionality in a jquery.js

A reference library used by many sites would then make it worth to add scriptlet to counter it, just like we do have such code for blockadblock.

@uBlock-user
Copy link
Contributor

@gorhill Unfortunately it's their custom anti-adblock script detection, not used anywhere else.

@MasterKia
Copy link
Member Author

Unfortunately it's their custom anti-adblock script detection, not used anywhere else.

True.

https://soft98.ir/templates/soft98_default/js/jquery.js?v=12

The unpacked and formatted version for examination (Search for b7d9x):
https://raw.githubusercontent.com/MasterKia/PersianBlocker/main/soft98-antiadb.js

@gorhill
Copy link
Member

gorhill commented Jan 9, 2022

Unfortunately it's their custom anti-adblock script detection

I understand this. I was answering to "what would happen if more sites start to adapt the same (simple) solution".

@DRSDavidSoft
Copy link

DRSDavidSoft commented Jan 9, 2022

Personally, I don't mind using external solutions (e.g. Anti AdBlock Killer, FuckFuckAdBlock, AdsBypasser, etc) for situations like this. As @gorhill said, it's not a functionality suited well for uBO's, it doesn't make sense to start cooking up solutions for each and every site (e.g. Twitch). The extra or external packages are made just for dealing with this stuff.

It would be neat not to have to rely on Userscripts just to remove ads from various websites, but when I'm going to use Userscripts for these scenarios anyway, why would it matter

I'm still interested to achieve the functionality of my Userscript with pure filter lists, but currently, I think this is the way to go.

@gorhill Nice work BTW, huge fan, and hats off, sir. I really appreciate the work you do!

@MasterKia for now, I hope my Userscript continues to work. I'll look up ways to merge it with other more popular scripts, so at least its installation is more justified.

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

7 participants