Analysis by: Kathleen Notario

ALIASES:

Trojan.ADH (Symantec); Trojan:Win32/Ramnit.D (Microsoft); Generic.grp!i (Mcafee); Mal/EncPk-AAJ (Sophos)

 PLATFORM:

Windows 2000, Windows XP, Windows Server 2003

 OVERALL RISK RATING:
 DAMAGE POTENTIAL:
 DISTRIBUTION POTENTIAL:
 REPORTED INFECTION:

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

This malware has been reported by several media outfits. It gets user information from cookies stored in certain web browsers.

To get a one-glance comprehensive view of the behavior of this Trojan, refer to the Threat Diagram shown below.

This Trojan arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

  TECHNICAL DETAILS

File Size: 112,630 bytes
File Type: EXE
Memory Resident: Yes
Initial Samples Received Date: 23 Aug 2011
Payload: Steals information

Arrival Details

This Trojan arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

Installation

This Trojan drops the following files:

  • %Application Data%\{random file name}.log

(Note: %Application Data% is the current user's Application Data folder, which is usually C:\Windows\Profiles\{user name}\Application Data on Windows 98 and ME, C:\WINNT\Profiles\{user name}\Application Data on Windows NT, and C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, XP, and Server 2003.)

It drops the following copies of itself into the affected system:

  • %Application Data%\{random folder name}\{random file name}.exe
  • %User Temp%\{random file name}.exe
  • %User Startup%\{random file name}.exe

(Note: %Application Data% is the current user's Application Data folder, which is usually C:\Windows\Profiles\{user name}\Application Data on Windows 98 and ME, C:\WINNT\Profiles\{user name}\Application Data on Windows NT, and C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, XP, and Server 2003.. %User Temp% is the current user's Temp folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000, XP, and Server 2003.. %User Startup% is the current user's Startup folder, which is usually C:\Windows\Profiles\{user name}\Start Menu\Programs\Startup on Windows 98 and ME, C:\WINNT\Profiles\{user name}\Start Menu\Programs\Startup on Windows NT, and C:\Documents and Settings\{User name}\Start Menu\Programs\Startup.)

It adds the following processes:

  • svchost.exe

It creates the following folders:

  • %Application Data%\{random folder name}

(Note: %Application Data% is the current user's Application Data folder, which is usually C:\Windows\Profiles\{user name}\Application Data on Windows 98 and ME, C:\WINNT\Profiles\{user name}\Application Data on Windows NT, and C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, XP, and Server 2003.)

It adds the following mutexes to ensure that only one of its copies runs at any one time:

  • {random CLSID}

Autostart Technique

This Trojan adds the following registry entries to enable its automatic execution at every system startup:

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Run
{random file name} = "%Application Data%\{random folder name}\{random file name}.exe"

It modifies the following registry entries to ensure it automatic execution at every system startup:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows NT\CurrentVersion\Winlogon
Userinit = "%System%\userinit.exe, %Application Data%\{random folder name}\{random file name}.exe"

(Note: The default value data of the said registry entry is %System%\userinit.exe,.)

Other System Modifications

This Trojan deletes the following registry keys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\SafeBoot

NOTES:

It injects codes into its created process svchost.EXE.

This malware retrieves user information stored in cookies for the following browsers:

  • Chrome
  • Firefox
  • Internet Explorer

It archives the cookies and saves it as %Application Data%\{random filename}.log.

  SOLUTION

Minimum Scan Engine: 9.200
FIRST VSAPI PATTERN FILE: 8.374.07
FIRST VSAPI PATTERN DATE: 23 Aug 2011
VSAPI OPR PATTERN File: 8.375.00
VSAPI OPR PATTERN Date: 23 Aug 2011

Step 1

For Windows XP and Windows Server 2003 users, before doing any scans, please make sure you disable System Restore to allow full scanning of your computer.

Step 2

Identify and delete files detected as TROJ_RAMNIT.PB using either the Startup Disk or Recovery Console

[ Learn More ]

Step 3

Delete this registry value

[ Learn More ]

Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry.

  • In HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
    • {random file name} = "%Application Data%\{random folder name}\{random file name}.exe"

Step 4

Restore this modified registry value

[ Learn More ]

Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry.

  • In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    • From: Userinit = "%System%\userinit.exe, %Application Data%\{random folder name}\{random file name}.exe"
      To: Userinit = "%System%\userinit.exe,"

Step 5

Search and delete this folder

[ Learn More ]
Please make sure you check the Search Hidden Files and Folders checkbox in the More advanced options option to include all hidden folders in the search result.
  • %Application Data%\{random folder name}

Step 6

Search and delete this file

[ Learn More ]
There may be some component files that are hidden. Please make sure you check the Search Hidden Files and Folders checkbox in the More advanced options option to include all hidden files and folders in the search result.
  • %Application Data%\{random file name}.log

Step 7

Scan your computer with your Trend Micro product to delete files detected as TROJ_RAMNIT.PB. If the detected files have already been cleaned, deleted, or quarantined by your Trend Micro product, no further step is required. You may opt to simply delete the quarantined files. Please check this Knowledge Base page for more information.

NOTES:

To Restore Safe Boot Registry Settings:

  1. Open Notepad. To do this, click Start>Run, type Notepad in the text box provided, then press Enter.
  2. Copy and paste the following script:

    For Windows 2000:


    For Windows XP:


    For Windows 2003:
  3. Save this file as C:\RESTORE.REG..
  4. Click Start>Run again, type C:\RESTORE.REG in the text box provided, then press Enter.
  5. Click Yes at the prompt of the message box to execute the .REG file.


Did this description help? Tell us how we did.