Posted by Sorin Mustaca on March 1, 2015.
I haven’t seen in a while a well done complex spam with malicious payload.
This one appears to be addressed to first name of the email recipient. As you can see in the subject, it is addressed to “SORIN” since my email address is sorin.mustaca@…
The spam contains a nice piece of social engineering which creates enough curiosity to the reader to open the attached archive.
First of all, I asked myself why a ZIP with a JS in it?
ZIP is natively supported by Windows Explorer. If you have a ZIP archive, it will be automatically opened as a folder and you can execute any file in it. JS is executed by the Windows Script host without any HTML page to interpret it. Smart, I have to agree.
Now,there are some things which ruined my amazement of this spam after I executed it in a VM.
It doesn’t work… 🙂
Apparently, due to a programming error a function is called recursively without any end condition.
I am not a JS expert and I also didn’t spend any time to understand and de-obfuscate the code, but from what I could see between the lines:
– it writes a piece of JS code
– it executes it
– once executed it downloads a file from an URL.
The URL is even better obfuscated than the rest of the code.
– It drops the file in the %TEMP% and
– probably tries to execute it.
The obfuscated code is written by numerous functions into two global variables which are written in the end with the document.write function.
The malicious payload
Fortunately, there are tools online which de-obfuscate, analyze and scan the content.
Let’s have a look what antivirus software says:
|Detection ratio:||6 / 57|
|Analysis date:||2015-03-01 16:55:08 UTC ( 0 minutes ago )|
Interesting piece of code. I wonder which tool created that obfuscated code. It would be interesting to get it and see what it can do.