SANS Digital Forensics and Incident Response Blog

The Trojan solved it! Catching a fraudster with another criminal, 'myspacce.exe'

by Robert-Jan Mora

Introduction

I work as a forensic investigator at Hoffmann Investigations (en.hoffmannbv.nl) in the Netherlands. Besides doing a lot of investigations our department develops open source forensic software like:

  • Libewf, http://libewf.sourceforge.net/ A library and tools to acquire, read, export and verify disk images in the Expert Witness format or EnCase format.

  • Revit, http://revit.souceforge.net/ A flexible file carver to recover deleted files from disk images.

  • Libpff, http://libpff.sourceforge.net A library and tools to read and recover Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in Microsoft Outlook files like PST, OST and PAB files.

The following is based on an actual investigation, but has been anonymized.

Recently we had a case where an employee was selling assets from the company on the Internet for personal gain. A manager of the company looked at the screen of the computer of the employee and saw that the employee was selling articles on a known Dutch auction website at 14.00 hours. The manager then closed the browser. When the employee came back the employee noticed that someone had closed the browser. At that moment the employee knew they were on to him and tried to cover his tracks. Later that day the manager asked us to investigate the computer the employee had been using.

Investigation

After imaging and verifying the image with the libewf tools ?ewfacquire' and ?ewfverify' we started the investigation. Basically our first step is conducting a virus scan on the mounted image. The virus scanners Clamav and McAfee did not find any virus or Trojan on the NTFS filesystem.

Next we created a timeline of the file system, registry, eventlogs and browser history of the computer of the employee. In the timeline we could observe that the employee had started to delete files after 14.00 hours and downloading registry cleaners, wipers and other tools and was activating them. The manager informed us that the employee had visited a particular website, but we found no traces anymore in the browsers that were used by the employee (Firefox, Chrome and Internet Explorer). On the auction website all relevant entries were removed as well.

So, we did not find those significant temporary files anymore on the computer because they were mostly deleted or overwritten. Next we did a keyword search, among other things, on that particular website on the computer and found it several times in a file called 'c:\windows\system32\myspacce'

After reviewing the file we quickly determined that it was the recording file of an active key logger that contained all the visiting websites and product and serial numbers that the employee was selling on the Internet! Great evidence or what? So what's next? If you ever heard about the ?Trojan-did it-defense', the suspect could use it as an alibi. We could hear the defense already that it was someone controlling the Trojan that was selling the assets of the company on the Internet. We reviewed the keyboard captures and they were unique for the employee so the next thing in the investigation would be to interview the employee based on the findings. But first we needed to examine this key logger closer. We then searched on the filename ?myspacce' within Encase and found the following files:image001

Figure 1: View of Myspacce executables and keystroke capture files

Two of the files were in the alternate data stream of NTFS and were not visible for the users. Alternate data streams are a functionality within NTFS that allow files to be associated with more than one data stream. For example, in this case the folder 'system32' has an Alternate Data Stream with the name 'system32:myspacce.exe' and 'system32:myspacce' After this result we submitted 'myspacce.exe' to the online virus scanner http://www.virustotal.org and only 30% of the scanners detected it as an Trojan, which could be a false positive by the way.

One of the great malware sites for behavioral analysis of malware is http://www.cwsandbox.org. On the website you can submit a sample of malware found during investigations. Here's the link of the full report from 'myspacce.exe':

http://www.cwsandbox.org/?page=samdet&id=532351&password=eqirn

The id and password are auto generated by the website.

From the report of ?cwsandbox' among other things we found the following behaviour from the malware:

Filesystem Changes

Create File: C:\WINDOWS\system32:myspacce.exe
Delete File: C:\WINDOWS\system32:myspacce.exe
Open File: c:\myspacce.exe (OPEN_EXISTING), (FILE_ANY_ACCESS), (FILE_SHARE_READ), (FILE_ATTRIBUTE_NORMAL SECURITY_ANONYMOUS)
Open File: C:\WINDOWS\system32:myspacce.exe (OPEN_EXISTING), (FILE_ANY_ACCESS), (), (FILE_ATTRIBUTE_NORMAL SECURITY_ANONYMOUS)
Registry Changes
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{644A4322-7128-E694-771C-CF236241FED9}\ "" =
(C:\WINDOWS\system32:myspacce.exe)HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ "" = (C:\WINDOWS\system32:myspacce.exe)
Connections
buddybuddy.myftp.org 91.64.203.37
Outgoing connection to remote server: buddybuddy.myftp.org TCP port 2888
Outgoing connection to remote server: buddybuddy.myftp.org TCP port 2988

From the full report we could observe that the malware infected another process and started creating hidden copies of itself in the Alternate Data Streams and installing itself in the registry to make sure it would survive a reboot. Furthermore we could determine that when the malware installs itself, outgoing connections were made to the server 'buddybuddy.myftp.org' probably registering itself in some sort of Botnet. The same registry setting was found on the image.

So now we had a Trojan that had been running on the computer of the employee, but how was the computer infected? We soon encountered another file in the restore points that after some research led back to another Trojan that was installed by using cracks for copy protected software that was downloaded from news servers to the computer of the employee.

After confronting the employee with the findings registered by the malicious Trojan he confessed to the fraud. He was selling items on the Internet from his employer for several years. After his confessions we also confessed that we got this evidence thanks to the Trojan ?myspacce.exe', but that the criminal that was distributing ?myspacce' got the employees credentials and several accounts as well. So we advised him to change his banking credentials, otherwise he could be the victim of cybercrime. It's a strange world.

Conclusions

  • Always interview an employee or suspect when conducting an digital forensic investigation.
  • This time the Trojan 'myspacce.exe' solved the fraud, but be aware malware is getting stealthier every day!
  • Do not rely on one virusscanner and use one that supports scanning Alternate Data Streams
  • Also fraudsters can be the victims of cybercrime
  • Fraudsters be aware of yourself and your behavior because there's always another criminal whose smarter than you.

Robert-Jan Mora, GCFA #199

1 Comments

Posted March 31, 2011 at 8:59 PM | Permalink | Reply

925maurice

interesting story, cool catch :)