Ransom_RARLOCK.A

 Analysis by: Cris Nowell Pantanilla

 ALIASES:

Trojan-Ransom.Win32.Rakhni.wbqb (Kaspersky), JS/Filecoder.D (ESET-NOD32)

 PLATFORM:

Windows

 OVERALL RISK RATING:
 REPORTED INFECTION:

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted: Yes

  • 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 executes then deletes itself afterward.

It accesses websites to download files. This action allows this malware to possibly add other malware on the affected computer.

It connects to certain websites to send and receive information.

  TECHNICAL DETAILS

File Size:

347,149 bytes

Memory Resident:

Yes

Initial Samples Received Date:

10 Mar 2017

Payload:

Collects system information

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%\Microsoft\Crypto\{random filename}.swf

(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%\Microsoft\Crypto\wscript.exe
  • %Application Data%\Microsoft\Crypto\wscript.exe.config ← xml file
  • %Application Data%\Microsoft\Crypto\comm.txt ← ransom note
  • %Application Data%\Microsoft\Crypto\bann.txt ← list of whitelisted directories
  • %Application Data%\Microsoft\Crypto\aext.txt ← list of extensions to zip
  • %Application Data%\Microsoft\Crypto\rar_{drive letter}.exe ← copy of rar.exe (depends on target drive)
  • {Drive}:\All_Your_Documents\All_Your_Documents.rar ← archived files
  • {Drive}:\All Your Files in Archive!.txt
  • %Desktop%\All_Your_Documents({drive letter}).lnk ← shortcut to archive

(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.. %Desktop% is the desktop folder, where it usually is C:\Documents and Settings\{user name}\Desktop in Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\Desktop in 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%\Microsoft\Crypto

(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 executes then deletes itself afterward.

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
{Serial Number} = "wscript.exe //B {malware full path}"

Download Routine

This Trojan accesses websites to download the following files:

  • http://{BLOCKED}ycreative.com/wp-content/plugins/WPSecurity/rar.exe
  • http://{BLOCKED}dshowbiznews.com/wp-content/plugins/WPSecurity/rar.exe

It saves the files it downloads using the following names:

  • %Application Data%\Microsoft\Crypto\rar.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.)

Information Theft

This Trojan gathers the following data:

  • Drive volume serial number
  • Drives
  • User domain
  • Computer name
  • User name
  • System information
  • Manufacturer
  • Processor
  • Physical Memory and RAM
  • Printer devices
  • Network drives

Other Details

This Trojan connects to the following website to send and receive information:

  • http://{BLOCKED}dshowbiznews.com/wp-content/plugins/WPSecurity/load.php

It does the following:

  • It generates filename by randomly selecting from the following strings (ex. toolwin.swf):
    • Dll
    • Help
    • Host
    • Init
    • Mem
    • Net
    • Sys
    • Tool
    • Tray
    • Win
  • It executes the following command lines:
    • vssadmin.exe Delete Shadows /All /Quiet
  • It avoids files from the following directories:
    • *\AMD
    • *\AppData
    • *\Application Data
    • *\Boot
    • *\BOOTSECT.BAK
    • *\Chrome
    • *\Config.Msi
    • *\Dell
    • *\Drivers
    • *\ESTsoft
    • *\FIFA
    • *\Games
    • *\HeroOnline
    • *\HP
    • *\Intel
    • *\iTunes
    • *\League
    • *\Local Settings
    • *\McAfee
    • *\Microsoft
    • *\MineCraft
    • *\nDoors
    • *\NortonInstaller
    • *\Norton
    • *\PerfLogs
    • *\Program Files
    • *\Program Files (x86)
    • *\ProgramData
    • *\Sample Media
    • *\Sample Music
    • *\Sample Pictures
    • *\Sample Videos
    • *\Setup
    • *\SmileGate
    • *\Steam
    • *\Temporary
    • *\TwelveSky
    • *\WarRock
    • *\Windows
  • It searches directories for files with extensions from the "aext.txt" list and adds them to the archive "All_Your_Documents.rar".

  SOLUTION

Minimum Scan Engine:

9.850

FIRST VSAPI PATTERN FILE:

13.268.06

FIRST VSAPI PATTERN DATE:

10 Mar 2017

VSAPI OPR PATTERN File:

13.269.00

VSAPI OPR PATTERN Date:

11 Mar 2017

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

Restart in Safe Mode

[ Learn More ]

Step 3

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
    • {Serial Number} = "wscript.exe //B {malware full path}"

Step 4

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%\Microsoft\Crypto

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.
%Application Data%\Microsoft\Crypto\wscript.exe
%Application Data%\Microsoft\Crypto\wscript.exe.config
%Application Data%\Microsoft\Crypto\comm.txt
%Application Data%\Microsoft\Crypto\bann.txt
%Application Data%\Microsoft\Crypto\aext.txt
%Application Data%\Microsoft\Crypto\rar_{drive letter}.exe
{Drive}:\All_Your_Documents\All_Your_Documents.rar
{Drive}:\All Your Files in Archive!.txt
%Desktop%\All_Your_Documents({drive letter}).lnk

Step 6

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