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.
When a Ramnit.N-infected file is first executed, it will drop a copy of itself to the following location:
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:
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
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:
If the mutex is not present, the virus will spawn a new process (a copy of itself) in the following folder:
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.
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.
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"