Author Topic: Is this code malcode?  (Read 4794 times)

0 Members and 1 Guest are viewing this topic.

Offline polonus

  • Avast Überevangelist
  • Probably Bot
  • *****
  • Posts: 33916
  • malware fighter
Is this code malcode?
« on: May 26, 2009, 10:47:17 PM »
Hi malware fighters,

I found the following code attached on a web-page of my provider, is this suspicious. Nothing was flagged however by avast,

polonus
Cybersecurity is more of an attitude than anything else. Avast Evangelists.

Use NoScript, a limited user account and a virtual machine and be safe(r)!

Offline polonus

  • Avast Überevangelist
  • Probably Bot
  • *****
  • Posts: 33916
  • malware fighter
Re: Is this code malcode?
« Reply #1 on: May 26, 2009, 11:05:27 PM »
This are the virustotal results:
http://www.virustotal.com/nl/analisis/898cc70013f761380d37ef7de2cf74a6ac3b499bf57ae3ac9aa9bbcfffadc87b-1243371535

Comodo's scan: • File Info
Name   Value
Size   28515
MD5   41f46ddbfe907e377b0b916c60ef2376
SHA1   12be52e5dee4e719a855e869c95c46a022991c69
SHA256   898cc70013f761380d37ef7de2cf74a6ac3b499bf57ae3ac9aa9bbcfffadc87b
Process   Failed
• Verdict
Auto Analysis Verdict
Not Rated as Suspicious

pol
Cybersecurity is more of an attitude than anything else. Avast Evangelists.

Use NoScript, a limited user account and a virtual machine and be safe(r)!

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89129
  • No support PMs thanks
Re: Is this code malcode?
« Reply #2 on: May 26, 2009, 11:16:08 PM »
What is the URL, is it the on in the attached file ?

I tried to check this code out at gooby.ca and just got some divide by zero errors.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.4.6112 (build 24.4.9067.762) UI 1.0.803/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline polonus

  • Avast Überevangelist
  • Probably Bot
  • *****
  • Posts: 33916
  • malware fighter
Re: Is this code malcode?
« Reply #3 on: May 26, 2009, 11:36:26 PM »
Hi DavidR,

Code resides here: hXtp://www.online.nl/typo3conf/ext/rgmedialinks/res/mootools.js
I think it is wrong to obfuscate code that much for propriety reasons, it is giving real malcoders a head-start, don't you think,
Got this answer on the NoScript forum:
Quote
MooTools is a JavaScript extension library (similar to JQuery or Prototype).
In this case it's just packed with a standard packer, something you usually do to reduce bandwidth usage.
I actually prefer minification, which reduces sizes (slightly less efficiently) by stripping off redundant whitespaces but is still retains the code in an almost readable state.
Anyway most webserver today have built-in gzip resource compression, hence there's no compelling reason to keep stuff semi-obfuscated on the web.
legit reasons for obfuscation
Quote
There are many reasons why you would obfuscate the code that has nothing to do with hiding anything. The fact is that the author has a right to protect their work from being ripped off and if that makes it slightly harder, then so be it. Also to reduce code size and speed up execution. So on and so forth, many legit reasons.

pol
« Last Edit: May 27, 2009, 12:43:12 AM by polonus »
Cybersecurity is more of an attitude than anything else. Avast Evangelists.

Use NoScript, a limited user account and a virtual machine and be safe(r)!

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89129
  • No support PMs thanks
Re: Is this code malcode?
« Reply #4 on: May 27, 2009, 12:55:31 AM »
I have to say I don't like the lengths they go to to obfuscate javascript if they have nothing to hide, given that javascript is a plain language scripting language.

If the author wants to protect their code, there must be a better way, e.g. the use of a different tool as there are many that browse with javascript off or with NoScript, etc.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.4.6112 (build 24.4.9067.762) UI 1.0.803/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security

Offline polonus

  • Avast Überevangelist
  • Probably Bot
  • *****
  • Posts: 33916
  • malware fighter
Re: Is this code malcode?
« Reply #5 on: May 28, 2009, 12:45:45 AM »
Hi DavidR,

The main reason for obfuscation on websites to-day is bandwidth related, also here. Again sign of the times, also playing into the hands of malcreants - obfuscated code is obfuscated code whether it is straight or malcode,

polonus
Cybersecurity is more of an attitude than anything else. Avast Evangelists.

Use NoScript, a limited user account and a virtual machine and be safe(r)!

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Is this code malcode?
« Reply #6 on: May 28, 2009, 12:47:30 AM »
The main reason for obfuscation on websites to-day is bandwidth related
Polonus, can you elaborate?
I never heard about that (not that I'm an expert on this anyway...).
The best things in life are free.

Offline polonus

  • Avast Überevangelist
  • Probably Bot
  • *****
  • Posts: 33916
  • malware fighter
Re: Is this code malcode?
« Reply #7 on: May 28, 2009, 01:09:20 AM »
Hi Tech,

From one point of view it is a bandwidth thing, yep, it's just a bandwidth thing. Keep things as small as you can, to keep the downloads down. Imagine if every piece of Google code was as big as it "should*" be, and then having to download all these little chunks of code throughout the day. It'd definitely tot up pretty fast..and furthermore it is that the code cannot be too easily analyzed and hacked by a third party.
Users (like e-mule users) do it for reasons so their ISP won't block their P2P traffic that easily, ISP and Google do it for the reasons mentioned above, malcoders do it on a random basis to get under the radar of webmasters and website admins to redirect to silent malcode download sites, and this code should be blocked by the avast shield,

pol

Cybersecurity is more of an attitude than anything else. Avast Evangelists.

Use NoScript, a limited user account and a virtual machine and be safe(r)!

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67194
Re: Is this code malcode?
« Reply #8 on: May 28, 2009, 01:12:32 AM »
How does obfuscating decrease the download size in http traffic?
I understand obfuscating of P2P traffic as providers wants to block it...
The best things in life are free.

Offline DavidR

  • Avast Überevangelist
  • Certainly Bot
  • *****
  • Posts: 89129
  • No support PMs thanks
Re: Is this code malcode?
« Reply #9 on: May 28, 2009, 01:38:02 AM »
Well in this case it isn't technically obfuscating, but packing the javascript making it smaller (reducing bandwidth) which in turn would obfuscate it in a way.

Though anyone that suggests that this is to save on bandwidth is totally wrong as the file wouldn't be that large in the first place so any packing would produce a very minimal saving.

However true obfuscation could actually increase the size as it takes more physical characters to effectively produce the same code but obfuscated, where one four letter word may when obfuscated tale 12 or more characters to obfuscate.

So when they say it is to reduce bandwidth I fear they are trying to use smoke and mirrors to baffle us.
Windows 10 Home 64bit/ Acer Aspire F15/ Intel Core i5 7200U 2.5GHz, 8GB DDR4 memory, 256GB SSD, 1TB HDD/ avast! free 24.4.6112 (build 24.4.9067.762) UI 1.0.803/ Firefox, uBlock Origin, uMatrix/ MailWasher Pro/ Avast! Mobile Security