Home > ParetoLogic Blogs > Malware Diaries > Sea, Hex and Sun
Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2009, 01:14 AM
Michael Michael is offline
Administrator
Join Date: May 2007
Posts: 313
Default Sea, Hex and Sun

In this post I'm going to show you some tricks used by malware authors to evade detection. We shall see redirections, obfuscated javascripts and rootkit.

First things first, here is a site that has been compromised (chinaforge.cn). The last line of code from the source page shows a "script".

cn1

The URL is of course obfuscated. It is a redirect to a malicious site: w.siyou.org.cn

That page has rather interesting code starting with an if statement.

if (document.location.href.indexOf("gov")>=0) {} else payload

In other words, the script detects where the user is coming from, and if the string 'gov' is found it will do nothing. (Government sites?)

cn2

If the payload gets the green light, we get an iframe to the following domain: w.jsguangji.cn

cn3

That page contains yet again 2 iframes as well as javascript code:

cn4

Let's take a turn and follow the first iframe:

cn5

Alright. We are going to stop here for a moment and see what this is all about.

What appears to be links to pictures is actually pieces of code (javascript). Here is the code revealed from one of the 'picture':

code

I downloaded all the 'pictures' and compiled the code together. Here is what it looks like:

cn7

More obfuscated javascript!

This time we may actually have reached our final destination:

cn8

Yes, all of that for a single file.

For the end user, however, things are a lot more simple. You browse to a compromised site, get redirected once, twice and then: wham! bam! a drive-by download as shown below:

cn10

Upon execution a file is created: c:\windows\tasks\conime.exe

To make things more difficult, the file is hidden:

cn11

But just to prove it is there, I rebooted under Ubuntu (dual boot) to show you:

ub

The file is detected by about half the AV vendors on VirusTotal:

cn13

Programs / OS *used for this post:

Malzilla
FileAlyzer
Ubuntu

If you want to do more research, I have uploaded the 'pictures' and the malware sample to our FTP.

Malware ID:*jscode.zip

Malware ID:*3b10f98238023336aa753f9e072fb244.zip

Jerome Segura
Reply With Quote
Reply

« Previous Thread | Next Thread »

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


Terms of Use