
The Dell Sonicwall Threats Research team have discovered a malicious obfuscated VBE script which is used to drop additional malware onto the infected system. The script is obfuscated and uses encryption in an attempt to hide its inner functionality.
Infection Cycle:
The Trojan makes the following DNS queries:
guanambier.com.brimprensasofas.com.brThe Trojan adds the following files to the filesystem:
The Trojan adds the following registry key to enable startup after reboot:
The VB script is obfuscated:

Using freely available tools it was easy to deobfuscate the script thus revealing its functionality. It contains code to download a 7z archive from a remote webserver:

It also downloads the 7z utility program that is used to extract files from 7z archives.
The 7z archive is password protected. The script contains the password for the 7z archive:
pass = "vaio1010"Using this password it extracts the malicious files contained in the archive:


The script contains the following decryption routine:
Function fCrypt(sPlainText, sPassword)Dim aBox(255), aKey(255), sTemp, a, b, c, i, j, k, iCipherBy, sTempswap, iLength, sOi = 0:j = 0:b = 0iLength = Len(sPassword)For a = 0 To 255aKey(a) = Asc(Mid(sPassword, (a Mod iLength)+1, 1))aBox(a) = aNextFor a = 0 To 255b = (b + aBox(a) + aKey(a)) Mod 256sTempswap = aBox(a)aBox(a) = aBox(b)aBox(b) = sTempswapNextFor c = 1 To Len(sPlainText)i = (i + 1) Mod 256j = (j + aBox(i)) Mod 256sTemp = aBox(i)aBox(i) = aBox(j)aBox(j) = sTempk = aBox((aBox(i) + aBox(j)) Mod 256)iCipherBy = Asc(Mid(sPlainText, c, 1)) Xor ksO = sO & Chr(iCipherBy)NextfCrypt = sOEnd FunctionThe URL's and filenames to be used are encrypted in the script. The script uses the function above to decrypt this data at runtime. It uses 5F4156472559703C6B6E2B as the decryption key:
linkA = fCrypt(HexToString("440A21CC6E364E7210D0757DA70C34B7397B47F8035587856AAFCA5196D980FB83DEF77D6BBC725532"), "5F4156472559703C6B6E2B")NmFile = fCrypt(HexToString("740E6D8C62571122239F2C66"), "5F4156472559703C6B6E2B")linkZip = fCrypt(HexToString("440A21CC6E364E7210D0757DA70C34B7397B47F8035587856AAFCA5196D980FBC7D4F33638B5"), "5F4156472559703C6B6E2B")ZipFile = fCrypt(HexToString("760E6D8C627B587D4BD46379"), "5F4156472559703C6B6E2B")fileA = fCrypt(HexToString("601C668C61784F701DD4"), "5F4156472559703C6B6E2B")fileB = fCrypt(HexToString("780E668C617026262B9F7E64AF"), "5F4156472559703C6B6E2B")The script runs Tp305iG3N.exe . This banker Trojan announces its presence to its operators by issuing the following HTTP request to a remote webserver:

SonicWALL Gateway AntiVirus provides protection against this threat via the following signatures:
Share This Article

An Article By
An Article By
Security News
Security News