TROJ_WHAIM.A

 Analysis by: Rika Joi Gregorio

 PLATFORM:

Windows

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

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted: Yes

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Dropped by other malware

This threat is a Master Boot Record (MBR) wiper that infected systems of a major Korean electric utility.

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

This Trojan may be dropped by other malware.

  TECHNICAL DETAILS

File Size:

140,800 bytes

File Type:

EXE

Memory Resident:

Yes

Initial Samples Received Date:

11 Dec 2014

Payload:

MBR infection, Drops files

Arrival Details

This Trojan may be dropped by the following malware:

  • TROJ_MDROP.WQA

Installation

This Trojan drops the following copies of itself into the affected system:

  • %System%\{random file name}.dll

(Note: %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.)

Autostart Technique

This Trojan adds the following entries to allow itself to run on safe mode:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\SafeBoot\Minimal\
{random data}
(Default) = "Service"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\SafeBoot\Network\
{random data}
(Default) = "Service"

It adds the following keys to allow itself to run on safe mode:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\SafeBoot\Minimal\
{random data}

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\SafeBoot\Network\
{random data}

It registers its dropped component as a system service to ensure its automatic execution at every system startup. It does this by creating the following registry entries:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\{random data}\Parameters
ServiceDll = "%System%\{random file name}.dll"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\{random data}\Parameters
ServiceMain = "ServiceMain"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\{random data}
ImagePath = "%SystemRoot%\System32\svchost.exe -k {random value}"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\{random data}
DisplayName = "{random value}"

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\{random data}
Description = "{random description}"

It registers its dropped component as a system service to ensure its automatic execution at every system startup. It does this by creating the following registry keys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\{random data}\Parameters

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\{random data}

Other System Modifications

This Trojan adds the following registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\PcaSvcc

It adds the following registry entries:

HKEY_LOCAL_MACHINE\SOFTWARE\PcaSvcc
number = "{random value in hex}"

HKEY_LOCAL_MACHINE\SOFTWARE\PcaSvcc
year = "{current year in hex}"

HKEY_LOCAL_MACHINE\SOFTWARE\PcaSvcc
month = "{current month in hex}"

HKEY_LOCAL_MACHINE\SOFTWARE\PcaSvcc
day = "{current day in hex}"

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows NT\CurrentVersion\SvcHost
{random value} = "{random data}"

HKEY_LOCAL_MACHINE\SOFTWARE\PcaSvcc
finish = "1"

NOTES:

If the Operating System (OS) is Vista or higher and is 64-bit, it drops and executes the following malware:

  • TROJ64_WHAIM.A

This Trojan overwrites the Master Boot record (MBR) of the affected system with the strings, Who Am I?.

After infection, it restarts the system and it displays the following:

Where {random file name} can be any of the following:

  • bddsvc.dll
  • iconsvc.dll
  • ehressvc.dll
  • netstsvc.dll
  • pnas.dll
  • pnrpmchname.dll
  • pwpsvc.dll
  • pcssvc.dll
  • rregconf.dll
  • scardmngsvc.dll
  • tcpmsvc.dll
  • tschmng.dll
  • mmthread.dll
  • wcmngsvc.dll
  • coladj.dll
  • wndmodmng.dll
  • timesyncsvc.dll
  • wiredconfsvc.dll
  • wlanconf.dll
  • wstmng.dll
  • Where {random value} can be any of the following:
  • blockcom
  • iconcom
  • mcsvccom
  • nssvccom
  • pnacom
  • pnrpcom
  • ppolcom
  • pcompcom
  • rregcom
  • scardcom
  • tpcmcom
  • tschcom
  • mmthcom
  • wcmngcom
  • wndcolcom
  • wndmodcom
  • wndtimecom
  • wconfcom
  • wlanconfcom
  • wstcom

Where {random data} can be any of the following:

  • BitLocker Drive Decryption Service
  • Internet Connection Service
  • Media Center Service
  • Network Storage Service
  • Peer Networking Address
  • PNRP Machine Name
  • Power Policy
  • Program Compatibility Service
  • Remote Registry Configuration
  • Smart Card Management Service
  • Tablet PC Management Service
  • Task Schedule Manager
  • Thread Ordering Service
  • WebClient Manage Service
  • Windows Color Adjustment
  • Windows Modules Management
  • Windows Time Synchronization
  • Wired Config Service
  • WLAN Config Service
  • Workstation management
Where {random description} can be any of the following:
  • BDESVC hosts the BitLocker Drive Decryption service.
  • Provides network address translation, addressing, name resolution and/or intrusion prevention services for a home or small office network.
  • Allows Media Center to locate and connect to the computer.
  • This service delivers network notifications (e.
  • Enables multi-party communication using Peer-to-Peer Connecting.
  • This service publishes a machine name using the Peer Name Resolution Protocol.
  • Manages power policy and power policy notification delivery.
  • This service provides support for the Program Compatibility Assistant (PCA).
  • Enables remote users to modify registry configurations on this computer.
  • Manages access to smart cards read by this computer.
  • Enables Tablet PC pen and ink functionality
  • Enables a user to configure and schedule automated tasks on this computer.
  • Provides ordered execution for a group of threads within a specific period of time.
  • Enables Windows-based programs to create, access, and modify Internet-based files.
  • The WcasPlugInService service hosts third-party Windows Color System color device model and gamut map model plug-in modules.
  • Enables installation, modification, and removal of Windows updates and optional components.
  • Maintains date and time synchronization on all clients and servers in the network.
  • The Wired AutoConfig (DOT3SVC) service is responsible for performing IEEE 802.1X

TROJ_WHAIM.A checks if the current date and time is Dec 10, 2014 11:00 AM or later. If it meets this condition, it sets the registry, HKEY_LOCAL_MACHINE\SOFTWARE\PcaSvcc\finish to 1, thus triggering the MBR infection. Otherwise, it sleeps for a minute and checks the system time again.

  SOLUTION

Minimum Scan Engine:

9.700

FIRST VSAPI PATTERN FILE:

11.338.07

FIRST VSAPI PATTERN DATE:

11 Dec 2014

VSAPI OPR PATTERN File:

11.339.00

VSAPI OPR PATTERN Date:

12 Dec 2014

Step 1

Restore your system's Master Boot Record (MBR)

To restore your system's Master Boot Record (MBR):

• On Windows 2000, XP, and Server 2003:

  1. Insert your Windows Installation CD into your CD drive then restart your computer.
  2. When prompted, press any key to boot from the CD.
  3. On the Main Menu, type r to enter the Recovery Console.
    (Note for Windows 2000: After pressing r, type c to choose the Recovery Console on the repair options screen.)
  4. Type the number that corresponds to the drive and folder that contains Windows (usually C:\WINDOWS) and press Enter.
  5. Type your Administrator password and press Enter.
  6. In the input box, type the following then press Enter:
    fixmbr {affected drive}
  7. Type exit and press Enter to restart the system normally.

• On Windows Vista, 7, and Server 2008:

  1. Insert your Windows Installation DVD into the DVD drive, then press the restart button on 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 choose the installation language. On the Install Windows window, choose your language, locale, and keyboard layout or input method. 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 menu, click Command Prompt.
  7. In the Command Prompt window, type the following then press Enter:
    BootRec.exe /fixmbr
  8. Type exit and press Enter to close the Command Prompt window.
  9. Click Restart to restart your computer normally.

• On Windows 8, 8.1, and Server 2012:

  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:
    BootRec.exe /fixmbr
  6. Type exit and press Enter to close the Command Prompt window.
  7. Click Continue to restart the system normally.

Step 2

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

Step 3

Note that not all files, folders, and registry keys and entries are installed on your computer during this malware's/spyware's/grayware's execution. This may be due to incomplete installation or other operating system conditions. If you do not find the same files/folders/registry information, please proceed to the next step.

Step 4

Remove the malware/grayware file that dropped/downloaded TROJ_WHAIM.A. (Note: Please skip this step if the threat(s) listed below have already been removed.)

     
    • TROJ_MDROP.WQA

Step 5

Remove malware/grayware files dropped/downloaded by TROJ_WHAIM.A. (Note: Please skip this step if the threats listed below have already been removed.)

     
    • TROJ64_WHAIM.A

Step 6

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 7

    Delete this registry key

    [ 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
      • PcaSvcc
    • In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
      • {random data}
    • In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal
      • {random data}
    • In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Network
      • {random data}

    Step 8

    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_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SvcHost
      • {random value} = "{random data}"

    Step 9

    Restart in normal mode and scan your computer with your Trend Micro product for files detected as TROJ_WHAIM.A. 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.


    Did this description help? Tell us how we did.