Analysis by: Jennifer Gumban

ALIASES:

Trojan:Win32/Ramnit (Microsoft)

 PLATFORM:

Windows

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

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted:

  • In the wild: Yes

  OVERVIEW

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.

It deletes the initially executed copy of itself.

  TECHNICAL DETAILS

File Size: 275,493 bytes
File Type: EXE
Initial Samples Received Date: 24 Sep 2016

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 a copy of itself in the following folders using different file names:

  • %User Temp%\{random}.exe
  • %AppDataLocal%\{random folder name}\{random file name}.exe

(Note: %User Temp% is the user's temporary folder, where it usually is C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Local\Temp on Windows Vista (32- and 64-bit), Windows 7 (32- and 64-bit), Windows 8 (32- and 64-bit), Windows 8.1 (32- and 64-bit), Windows Server 2008, and Windows Server 2012.. %AppDataLocal% is the Application Data folder found in Local Settings, where it is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Local on Windows Vista (32- and 64-bit), Windows 7 (32- and 64-bit), Windows 8 (32- and 64-bit), Windows 8.1 (32- and 64-bit), Windows Server 2008, and Windows Server 2012.)

It drops the following files:

  • %All Users Profile%\Application Data\{random}.log
  • %AppDataLocal%\{random}.log

(Note: %All Users Profile% is the All Users folder, where it usually is C:\Documents and Settings\All Users on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\ProgramData on Windows Vista (32- and 64-bit), Windows 7 (32- and 64-bit), Windows 8 (32- and 64-bit), Windows 8.1 (32- and 64-bit), Windows Server 2008, and Windows Server 2012.. %AppDataLocal% is the Application Data folder found in Local Settings, where it is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Local on Windows Vista (32- and 64-bit), Windows 7 (32- and 64-bit), Windows 8 (32- and 64-bit), Windows 8.1 (32- and 64-bit), Windows Server 2008, and Windows Server 2012.)

It adds the following processes:

  • svchost.exe

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} = "%AppDataLocal%\{random folder name}\{random file name}.exe"

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Run
{random file name} = "%User Temp%\{random file name}.exe"

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows NT\CurrentVersion\Winlogon
Userinit = "%AppDataLocal%\{random folder name}\{random file name}.exe"

Other Details

This Trojan connects to the following possibly malicious URL:

  • http://{random generated domain}.{eu|click|bid}
  • http://{BLOCKED}.{BLOCKED}.254.94:80/qq/3.exe

It deletes the initially executed copy of itself

  SOLUTION

Minimum Scan Engine: 9.850

Step 1

Before doing any scans, Windows XP, Windows Vista, and Windows 7 users must disable System Restore to allow full scanning of their computers.

Step 2

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

[ Learn More ]

Step 3

Since this malware cannot be removed in normal and safe mode, it is necessary to restart using the Windows Recovery Console. To restart the system using the Windows Recovery Console:

• On Windows XP and Server 2003 systems:

  1. Click Start>Run. In the Open input box, type secpol.msc and press Enter.
  2. In the left panel, double-click Local Policies>Security Options.
  3. In the right panel, double-click Recovery Console: Allow floppy copy and access to all drives and folders.
  4. Select Enabled and click OK.
  5. Insert the Windows Installation CD into the CD drive, then restart your computer.
  6. When prompted, press any key to boot from the CD.
  7. On the main menu, type r to go to the Recovery Console.
  8. Type the number that corresponds to the drive and directory that contains Windows (usually C:\WINDOWS) and press Enter.
  9. Type the Administrator password and press Enter.
  10. In the input box, type the following then press Enter:
    SET AllowAllPaths = TRUE
DATA_GENERIC
  • Type exit and press Enter to restart the system normally.
  • • On Windows Vista, 7, and Server 2008 systems:

    1. Insert your Windows Installation DVD in the DVD drive, then Press the restart button.
    2. When prompted, press any key to boot from the DVD.
    3. Depending on your Windows Installation DVD, you might be required to select the installation language. Then on the Install Windows window, choose your language, locale, and keyboard layout or input method. Click Next, then click Repair your computer.
    4. Select Use recovery tools that can help fix problems starting Windows. Select your installation of Windows. Click Next.
    5. If the Startup Repair window appears, click Cancel, Yes, then Finish.
    6. In the System Recovery Options window, click Command Prompt.
    7. In the Command Prompt window, type the following then press Enter:
      DATA_GENERIC
      (Note: In Windows 7, all local drives will be assigned one more than normal. For example, the C: drive becomes D:.)
    8. Type exit and press Enter to close the Command Prompt window.
    9. Click Restart to restart the system normally.

    • On Windows 8, 8.1, and Server 2012 systems:

    1. Insert your Windows Installation DVD in the DVD drive, then restart your computer.
    2. When prompted, press any key to boot from the DVD.
    3. Depending on your Windows Installation DVD, you might be required to select the keyboard layout. Then on the Windows Setup window, choose your language, locale, and input method. Click Next, then click Repair your computer.
    4. Click Troubleshoot>Advanced Options>Command Prompt.
    5. In the Command Prompt window, type the following then press Enter:
      DATA_GENERIC
    6. Type exit and press Enter to close the Command Prompt window.
    7. Click Continue to restart the system normally.

    Step 4

    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} = "%AppDataLocal%\{random folder name}\{random file name}.exe"
    • In HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
      • {random file name} = "%User Temp%\{random file name}.exe"
    • In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
      • Userinit = "%AppDataLocal%\{random folder name}\{random file name}.exe"

    Step 5

    Search and delete this file

    [ Learn More ]
    There may be some 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.
    %All Users Profile%\Application Data\{random}.log
    %AppDataLocal%\{random}.log


    Did this description help? Tell us how we did.