WORM_COINMINER.INJ

 Analysis by: Hazel Ann Poligratis

 ALIASES:

NSIS/CoinMiner.T (ESET-NOD32), Worm.NSIS.BitMin.d (Kaspersky), Worm:Win32/NeksMiner.A (Microsoft)

 PLATFORM:

Windows

 OVERALL RISK RATING:
 REPORTED INFECTION:

  • Threat Type: Worm

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

This Worm arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

It propagates via shared networks and drops copies of itself into available networks.

  TECHNICAL DETAILS

File Size:

1,033,460 bytes

File Type:

EXE

Memory Resident:

Yes

Initial Samples Received Date:

28 May 2018

Arrival Details

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

  • %Application Data%\Temps\DOC001.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:

  • %User Temp%\nst{4 random characters}.tmp\inetc.dll - connects to download java12.exe
  • %User Temp%\java.exe - detected as Coinminer_MALBTC.C-SFX (which will drop a file detected as Coinminer_MALBTC.C)
  • %Temporary Internet Files%\Content.IE5\{8 Random Characters}\java[1].dat - detected as Coinminer_MALBTC.C-SFX
  • %User Temp%\java12.exe - deleted afterwards

(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.. %Temporary Internet Files% is the Temporary Internet Files folder, where it usually is C:\Documents and Settings\{user name}\Local Settings\Temporary Internet Files on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Local\Microsoft\Windows\Temporary Internet Files on Windows Vista (32- and 64-bit), Windows 7 (32- and 64-bit), and Windows Server 2008; C:\Users\{user name}\AppData\Local\Microsoft\Windows\INetCache on Windows 8 (32- and 64-bit), Windows 8.1 (32- and 64-bit), and Windows Server 2012.)

It drops and executes the following files:

  • %Application Data%\Temps\NsCpuCNMiner32.exe - detected as Coinminer_MALXMR.SM-WIN32
  • %Application Data%\Temps\NsCpuCNMiner64.exe - detected as Coinminer_CryptoNight.SM-WIN64
  • %AppDataLocal%\Temp\java.exe - detected as Coinminer_MALBTC.C-SFX

(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.. %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 creates the following folders:

  • %Application Data%\Temps\

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

Autostart Technique

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

  • %Application Data%\Microsoft\Windows\Start Menu\Programs\Startup\explorer.lnk (which points to the dropped copy in %Application Data%\Temps\DOC001.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.)

Propagation

This Worm propagates via shared networks and drops copies of itself into available networks.

It drops copies of itself in the following drives:

  • {All Available Drives}:\DOC001.exe

Download Routine

This Worm downloads the file from the following URL and renames the file when stored in the affected system:

  • http://{BLOCKED}1s.ru/java.dat
  • http://{BLOCKED}1s.ru/tess.html
  • http://{BLOCKED}op.ru/java12.dat
  • http://{BLOCKED}îp.ru/ (site is inaccessible)

Other Details

This Worm does the following:

  • It executes the file %Application Data%\Temps\NsCpuCNMiner32.exe using the command:
    • "%Application Data%\Temps\NsCpuCNMiner32.exe" -o stratum+tcp://x{BLOCKED}-eu1.{BLOCKED}pool.org:14444 -t 1 -u {BLOCKED}g86Zug9dwbJ3ysuyWMF7R6Un2Ko84TNfiCW7xghhbKZV6jh8Q7hJoncnLayLVDwpzbPQPi62bvPqe6jJouHAsGNkg2/21 -p x;
  • It will then kill the process containing the strings:
    • NsCpuCNMiner*
    • IMG0*
  • It will attempt to propagate to network using the command:
    • xcopy / y / d "%Application Data%\Temps\DOC001.exe" "\\{IP Address / Machine Name}\%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup\DOC001.exe"
    • xcopy / y / d "%Application Data%\Temps\DOC001.exe" "\\{IP Address / Machine Name}\%Start Menu%\Programs\Startup\DOC001.exe"
    • xcopy / y / d "%Application Data%\Temps\DOC001.exe" "\\{IP Address / Machine Name}\%Application Data%\Microsoft\Windows\Start Menu\Programs\Startup\DOC001.exe"

  SOLUTION

Minimum Scan Engine:

9.850

FIRST VSAPI PATTERN FILE:

14.322.06

FIRST VSAPI PATTERN DATE:

18 Jun 2018

VSAPI OPR PATTERN File:

14.323.00

VSAPI OPR PATTERN Date:

19 Jun 2018

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

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%\Temps\

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.
  • {All Available Drives}:\DOC001.exe
  • %User Temp%\nst{4 random characters}.tmp\inetc.dll
  • %User Temp%\java.exe
  • %Temporary Internet Files%\Content.IE5\{8 Random Characters}\java[1].dat
  • %User Temp%\java12.exe
  • %AppDataLocal%\Temp\java.exe
  • %Application Data%\Microsoft\Windows\Start Menu\Programs\Startup\explorer.lnk

Step 6

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