uBlockProtector icon indicating copy to clipboard operation
uBlockProtector copied to clipboard

Generic NoAdBlock defuser

Open jspenguin2017 opened this issue 9 years ago • 63 comments

A Cloudflare app, NoAdBlock, caught my attention, despite their claims, it is trivial to make it generic (for now), we already have a DOM watcher anyway, 2 more checks won't change the performance. https://noadblock.net/ https://www.cloudflare.com/apps/noadblock ~~They claim to update rules to bypass whitelists weekly, but hopefully removing their app block screen instead of dodging their detection will keep them occupied for longer.~~ Nope, they kept their promise...

jspenguin2017 avatar Jul 09 '17 01:07 jspenguin2017

Test links: https://www.cloudflare.com/apps/noadblock/install https://cmacapps.com/ http://itavisen.no/ https://www.hackintosh.zone/ http://www.clubedohardware.com.br/ http://who-called.co.uk/

jspenguin2017 avatar Jul 09 '17 01:07 jspenguin2017

No wonder it was being difficult to kill as it was loaded via the CF itself and since CF is used by every other website this will come in handy.

uBlock-user avatar Jul 09 '17 03:07 uBlock-user

Oh no, it's being featured... I guess the solution is going to be handy after all... image

jspenguin2017 avatar Jul 09 '17 04:07 jspenguin2017

Wait a second, Admiral is also a Cloudflare app??? https://www.cloudflare.com/apps/admiral

jspenguin2017 avatar Jul 09 '17 04:07 jspenguin2017

NVM, it works differently and loads the payload elsewhere. If a generic solution for Admiral can be found then that would help a lot. They have like 500 random domains...

jspenguin2017 avatar Jul 09 '17 04:07 jspenguin2017

It's not made by CF to be specific but CF offers it as a app for deployment.

uBlock-user avatar Jul 09 '17 06:07 uBlock-user

Seems to work for me. Admiral is way more complicated, I might have a look if I got time.

jspenguin2017 avatar Jul 09 '17 14:07 jspenguin2017

here is 1 page i encountered with Admiral link= http://www.africam.com/wildlife/ site ss: http://prntscr.com/fw2c0z

console: http://prntscr.com/fw2cc8

ghajini avatar Jul 15 '17 16:07 ghajini

Source dump: https://pastebin.com/nxCjwiWm

I have no generic solution yet, Admiral is pretty robust...

jspenguin2017 avatar Jul 15 '17 16:07 jspenguin2017

what does this code mean

africam.com#%#!function(a,c,b){a&&(Promise=function(e){if('function'!=typeof e)throw new TypeError(e+' is not a function');for(var f=c.call(e),d=0,g=b.length;d<g;d++)if(b[d][0].test(f))return b[d][1]?a.reject(b[d][2]):a.resolve(b[d][2]);return new a(e)},Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(Promise,b,Object.getOwnPropertyDescriptor(a,b))}),a.prototype.constructor=Promise)}(window.Promise,Function.prototype.toString,[[/\.MozBinding\.indexOf\(["']abp-/],[/\.parentNode\.removeChild\([\s\S]*?\.removeEventListener\("error"[\s\S]*?\.createElement\([\s\S]*?\.getElementsByTagName\("head"/,,1],[/\.createElement\("iframe"[\s\S]*?URL\.createObjectURL\(new Blob\(\[""/],[/\.getPropertyValue\("display"\)[\s\S]*?\/tpc\.googlesyndication[\s\S]*?\.addEventListener\(["']message["']/,1]]);

ghajini avatar Jul 15 '17 16:07 ghajini

It's a JS rule I guess, I can unminify it.

jspenguin2017 avatar Jul 15 '17 16:07 jspenguin2017

! function(a, c, b) {
    a && (Promise = function(e) {
        if ('function' != typeof e) throw new TypeError(e + ' is not a function');
        for (var f = c.call(e), d = 0, g = b.length; d < g; d++)
            if (b[d][0].test(f)) return b[d][1] ? a.reject(b[d][2]) : a.resolve(b[d][2]);
        return new a(e)
    }, Object.getOwnPropertyNames(a).forEach(function(b) {
        Object.defineProperty(Promise, b, Object.getOwnPropertyDescriptor(a, b))
    }), a.prototype.constructor = Promise)
}(window.Promise, Function.prototype.toString, [
    [/\.MozBinding\.indexOf\(["']abp-/],
    [/\.parentNode\.removeChild\([\s\S]*?\.removeEventListener\("error"[\s\S]*?\.createElement\([\s\S]*?\.getElementsByTagName\("head"/, , 1],
    [/\.createElement\("iframe"[\s\S]*?URL\.createObjectURL\(new Blob\(\[""/],
    [/\.getPropertyValue\("display"\)[\s\S]*?\/tpc\.googlesyndication[\s\S]*?\.addEventListener\(["']message["']/, 1]
]);

jspenguin2017 avatar Jul 15 '17 16:07 jspenguin2017

It filters some stuff out of Promise.

jspenguin2017 avatar Jul 15 '17 17:07 jspenguin2017

Is that what they use for generic Admiral defuser? Are they confident enough to apply it to all domains?

jspenguin2017 avatar Jul 15 '17 17:07 jspenguin2017

I mean Adguard is not patching Promise in all domains, right? It probably works but I just go block their payload serving domain. Let's see how many domains they can register.

jspenguin2017 avatar Jul 15 '17 17:07 jspenguin2017

They haven't committed yet

ghajini avatar Jul 15 '17 17:07 ghajini

Just block the payload servers is much faster, don't have to let Admiral to run and block it later.

jspenguin2017 avatar Jul 15 '17 17:07 jspenguin2017

@jspenguin2017 I think you got the attention of this Cloudflare app. I just updated a uBO-filter fix for hackintosh.zone https://github.com/uBlockOrigin/uAssets/commit/db88bcafe63f9c2942ffc5a46eb9d0ff1e9b5fa1. The updated fix works with uBO default settings. I never saw that anti-adblock script before, so I looked for some information and found this issue.

If I go to hackintosh.zone with uBO + UBProtector without the fix, this is the result. ubprot

My CPU load goes throgh the roof and I have to close the tab, reloading does not work. If I add the fix

hackintosh.zone##script:inject(abort-on-property-read.js, CloudflareApps.installs)

I can use hackintosh.zone without any problems.

okiehsch avatar Jul 16 '17 01:07 okiehsch

OK I guess it didn't took them long... Exactly 7 days, as promised XD

jspenguin2017 avatar Jul 16 '17 02:07 jspenguin2017

Let me patch this ;)

jspenguin2017 avatar Jul 16 '17 02:07 jspenguin2017