Home / malwarePDF  

Virus:W32/Ramnit.N


First posted on 08 April 2011.
Source: SecurityHome

Aliases :

There are no other names known for Virus:W32/Ramnit.N.

Explanation :

A program that secretly and maliciously integrates itself into program or data files. It spreads by integrating itself into more files each time the host program is run.

Additional Details

Virus:W32/Ramnit.N is distributed in infected EXE, DLL and HTML files; it can also be distributed via removable drives.

Once active, the virus infects EXE, DLL and HTML files found on the computer. It will also drop a malicious file that attempts to connect to and download other files from a remote server.

Installation

When a Ramnit.N-infected file is first executed, it will drop a copy of itself to the following location:

  • %programfiles%\Microsoft\WaterMark.exe


It then create the following mutex, which is used to ensure only a single instance of the virus copy is running on the machine at any time:

  • {061D056A-EC07-92FD-CF39-0A93F1F304E3}


In order to automatically execute itself if the system is rebooted, the virus also creates the following registry launchpoint:

  • HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon Userinit
    = c:\windows\system32\userinit.exe,,c:\program files\microsoft\watermark.exe


Infection

Before proceeding to infect other files on the machine, the malware first determines whether a previous instance of its process is already running by checking for its unique mutex in this format:

  • {"8_hex_digits"-"4_hex_digits"-"4_hex_digits"-"4_hex_digits"-"4_hex_digits"-"8_hex_digits""4_hex_digits"}


If the mutex is not present, the virus will spawn a new process (a copy of itself) in the following folder:

  • %programfiles%\Microsoft\[infector].exe


The dropped process will then spawn other hidden processes (either the default web browser process or svchost.exe). The infection routine is injected into these new processes via a hook on Windows Native System Services, for example: ntdll.ZwWriteVirtualMemory.

Once the injection is done, the process from %programfiles\microsoft\[infector].exe terminates, leaving the subsequent infection routine running in the background.

Payload

Ramnit.N modifies EXE, DLL and HTML files by appending its own malicious code to the end of the file.

When the infected file is run, it drops another malicious file to the same directory where it was executed. The dropped file will be named using the format, "[original_filename]mgr.exe".

The dropped file might connect to and download other malicious files from a remote server.

Others

The malware writer also provides a method to protect a machine from infection, by setting the following registry key and value (this feature was probably needed during development of the file infector):

  • [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WASAntidot]
    "disable" = "1"

Last update 08 April 2011

 

TOP