TROJ_COINMINE.NC

 Analysis by: Pearl Charlaine Espejo
 Modified by: David John Agni

 ALIASES:

Trojan-CoinMiner (McAfee); Trojan.BitCoinMiner (Malwarebytes); not-a-virus:RiskTool.Win32.BitCoinMiner.xou (Kaspersky); Mal/Miner-C (Sophos); Riskware/BitCoinMiner (Fortinet)

 PLATFORM:

Windows

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

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted:

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Downloaded from the Internet

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.

  TECHNICAL DETAILS

File Size:

3,195,134 bytes

File Type:

EXE

Memory Resident:

Yes

Initial Samples Received Date:

01 Sep 2015

Payload:

Connects to URLs/IPs

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 the following copies of itself into the affected system and executes them:

  • %Application Data%\NsCpuCNMiner\CNminer.exe

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

It drops the following files:

  • %Application Data%\NsCpuCNMiner\NsCpuCNMiner32.exe - Detected as TROJ_COINMINE.NC
  • %Application Data%\NsCpuCNMiner\NsCpuCNMiner64.exe - Detected as TROJ_COINMINE.NC
  • %Application Data%\NsCpuCNMiner\pools.txt - contains Bitcoin Mining Pool addresses

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

It drops the following non-malicious files:

  • %User Temp%\ns{random}.tmp\inetc.dll - NSIS plugin (Deleted after use)
  • %User Temp%\ns{random}.tmp\System.dll - NSIS plugin (Deleted after use)

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

It creates the following folders:

  • %Application Data%\NsCpuCNMiner
  • %User Temp%\ns{random}.tmp

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

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
CNminer = "%Application Data%\NsCpuCNMiner\CNminer.exe"

It drops the following file(s) in the Windows User Startup folder to enable its automatic execution at every system startup:

  • %User Startup%\CNminer.lnk - shortcut pointing to the dropped copy

(Note: %User Startup% is the current user's Startup folder, which is usually C:\Documents and Settings\{user}\Start Menu\Programs\Startup on Windows 2000 and XP, and C:\Documents and Settings\{User name}\Start Menu\Programs\Startup on Windows Vista, 7, and 8.)

Process Termination

This Trojan terminates the following processes if found running in the affected system's memory:

  • minerd.exe
  • NsCpuCNMiner32.exe
  • NsCpuCNMiner64.exe

NOTES:

This Trojan connects to the website http://{domain name}/test.html?{7 random numbers}to read its configuration file. The variable {domain name} may be any of the following:

  • {BLOCKED}.{BLOCKED}.238.223
  • {BLOCKED}test.ru
  • {BLOCKED}ts.ru
  • {BLOCKED}ts.ru
  • {BLOCKED}t.ru
  • {BLOCKED}test.ru
  • {BLOCKED}sy.ru
The configuration file contains the parameters to be used when executing the drop NsCpuCNMiner{32 or 64}.exe file.

It executes the file %Application Data%\NsCpuCNMiner\NsCpuCNMiner{32 or 64}.exe {parameter from the configuration file}. An example of the parameter is below:

-dbg -1 -o {pool address} -t 0 -u {Wallet Address} -p x

This Trojan is used for CryptoNote (cryptocurrency) CPU Mining. It can mine the following supported coins:

  • AeonCoin(AEON)
  • Bytecoin (BCN)
  • Dashcoin (DSH)
  • DuckDuckCoin (DUCK)
  • Fantomcoin (FCN)
  • Monero (XMR)
  • MonetaVerde(MCN)
  • OneEvilCoin(OEC)
  • ORION
  • QuazarCoin (QCN)

  SOLUTION

Minimum Scan Engine:

9.750

VSAPI OPR PATTERN File:

11.903.00

VSAPI OPR PATTERN Date:

07 Sep 2015

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

Identify and terminate files detected as TROJ_COINMINE.NC

[ Learn More ]
  1. Windows Task Manager may not display all running processes. In this case, please use a third-party process viewer, preferably Process Explorer, to terminate the malware/grayware/spyware file. You may download the said tool here.
  2. If the detected file is displayed in either Windows Task Manager or Process Explorer but you cannot delete it, restart your computer in safe mode. To do this, refer to this link for the complete steps.
  3. If the detected file is not displayed in either Windows Task Manager or Process Explorer, continue doing the next steps.

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
    • CNminer = "%Application Data%\NsCpuCNMiner\CNminer.exe"

Step 5

Search and delete these files

[ 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 Startup%\CNminer.lnk

Step 6

Search and delete this folder

[ 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%\NsCpuCNMiner

Step 7

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