Ransom.Win32.GANDCRAB.WWO

 Analysis by: Patrick Angelo Roderno

 ALIASES:

Win32/Filecoder.GandCrab.B (ESET-NOD32); HEUR:Trojan.Win32.Generic (KASPERSKY); Ransom:Win32/GandCrab.AE (MICROSOFT)

 PLATFORM:

Windows

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

  • Threat Type: Ransomware

  • Destructiveness: No

  • Encrypted: Yes

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Dropped by other malware, Downloaded from the Internet


This Ransomware steals certain information from the system and/or the user.

It connects to certain websites to send and receive information. It deletes itself after execution.

It encrypts files found in specific folders.

  TECHNICAL DETAILS

File Size:

235,529 bytes

File Type:

EXE

Memory Resident:

No

Initial Samples Received Date:

24 Aug 2018

Payload:

Connects to URLs/IPs, Steals information, Displays message/message boxes, Displays graphics/image, Encrypts files, Terminates processes

Installation

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

  • %Application Data%\Microsoft\{Random Characters}.exe

(Note: %Application Data% is the current user's Application Data folder, which is usually C:\Documents and Settings\{user name}\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Roaming on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).)

It adds the following mutexes to ensure that only one of its copies runs at any one time:

  • Global\pc_group={Machine Workgroup}&ransom_id={16 hex values generated by the malware}

Autostart Technique

This Ransomware adds the following registry entries to enable its automatic execution at every system startup:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\RunOnce
{Random Characters} = %Application Data%\Microsoft\{Random Characters}.exe

Process Termination

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

  • msftesql.exe
  • sqlagent.exe
  • sqlbrowser.exe
  • sqlservr.exe
  • sqlwriter.exe
  • oracle.exe
  • ocssd.exe
  • dbsnmp.exe
  • synctime.exe
  • mydesktopqos.exe
  • agntsvc.exeisqlplussvc.exe
  • xfssvccon.exe
  • mydesktopservice.exe
  • ocautoupds.exe
  • agntsvc.exeagntsvc.exe
  • agntsvc.exeencsvc.exe
  • firefoxconfig.exe
  • tbirdconfig.exe
  • ocomm.exe
  • mysqld.exe
  • mysqld-nt.exe
  • mysqld-opt.exe
  • dbeng50.exe
  • sqbcoreservice.exe
  • excel.exe
  • infopath.exe
  • msaccess.exe
  • mspub.exe
  • onenote.exe
  • outlook.exe
  • powerpnt.exe
  • steam.exe
  • sqlservr.exe
  • thebat.exe
  • thebat64.exe
  • thunderbird.exe
  • visio.exe
  • winword.exe
  • wordpad.exe

Dropping Routine

This Ransomware drops the following files:

  • %User Temp%\pidor.bmp

(Note: %User Temp% is the current user's Temp folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local\Temp on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).)

Information Theft

This Ransomware steals the following information:

  • Machine Workgroup
  • Anti Virus Software
  • System Language
  • Public IP Address
  • Username
  • Machine Name
  • Machine Keyboard Layout
  • OS Version and Platform
  • Drive letters of drives, type, capacity, and free space

Stolen Information

This Ransomware sends the gathered information via HTTP POST to the following URL:

  • http://{BLOCKED}r.bit/{encrypted stolen information}

Other Details

This Ransomware connects to the following URL(s) to get the affected system's IP address:

  • Ipv4bot.whatismyipaddress.com

It connects to the following website to send and receive information:

  • http://{BLOCKED}r.bit/
  • http://{BLOCKED}ware.bit/

It does the following:

  • It checks for the presence of the following antivirus and security applications:
    • AVP.EXE
    • ekrn.exe
    • avgnt.exe
    • ashDisp.exe
    • NortonAntiBot.exe
    • Mcshield.exe
    • avengine.exe
    • cmdagent.exe
    • smc.exe
    • persfw.exe
    • pccpfw.exe
    • fsguiexe.exe
    • cfp.exe
    • msmpeng.exe
  • The malware does not proceed to its encryption routine if it detects a Russian keyboard layout and if it fails to communicate with the server
  • This malware restarts the system using the following command:
    • shutdown -r -t 60 -f
  • It changes the wallpaper of the victim after restarting the system.

  • It avoids encrypting files found in the following folders:
    • ProgramData
    • IETldCache
    • Boot
    • Program Files
    • Tor Browser
    • Ransomware
    • All Users
    • Local Settings
    • Windows
    • Local AppData
  • It avoids encrypting the following files:
    • desktop.ini
    • autorun.inf
    • ntuser.dat
    • iconcache.db
    • bootsect.bak
    • boot.ini
    • ntuser.dat.log
    • Thumbs.db
    • CRAB-DECRYPT.txt
  • It encrypts all files except files with the following extensions:
    • .ani
    • .cab
    • .cpl
    • .cur
    • .diagcab
    • .diagpkg
    • .dll
    • .drv
    • .hlp
    • .ldf
    • .icl
    • .icns
    • .ico
    • .ics
    • .lnk
    • .key
    • .idx
    • .mod
    • .mpa
    • .msc
    • .msp
    • .msstyles
    • .msu
    • .nomedia
    • .ocx
    • .prf
    • .rom
    • .rtp
    • .scr
    • .shs
    • .spl
    • .sys
    • .theme
    • .themepack
    • .exe
    • .bat
    • .cmd
    • .CRAB
    • .crab
    • .GDCB
    • .gdcb
    • .gandcrab
    • .yassine_lemmou
  • It deletes shadow copies by executing the following command:
    • cmd.exe /C WMIC.exe shadowcopy delete
  • It executes the following commands to pop up the ransom note of the malware on Internet Explorer after restarting by executing the following commands:
    • iexplore.exe /C iexplore.exe SCODEF:3124 CREDAT:14337
    • iexplore.exe /C ie4uinit.exe -ShowQLIcon
  • It disables the access of Internet Explorer homepage by executing the following commands:
    • {Malware File Name}.exe /C iexplore.exe -nohome
  • It does not proceed with its encryption routine if the following kernel-mode AV components are found in the victim's machine:
    • klif.sys
    • kl1.sys
    • fsdfw.sys
    • srtsp.sys
    • srtsp64.sys
    • NavEx15.sys
    • NavEng.sys

It performs DNS requests to the following sites:

  • {BLOCKED}1.{BLOCKED}vers.ru
  • {BLOCKED}2.{BLOCKED}vers.ru
  • {BLOCKED}ware.bit
  • {BLOCKED}r.bit

It deletes itself after execution.

Ransomware Routine

This Ransomware encrypts files found in the following folders:

  • It will check the drive type of all drives from A to Z and will only encrypt the ones with the following drive type:
    • Removable Drives
    • Fixed Drives
    • Network Drives
    • Ramdisk Drives

It appends the following extension to the file name of the encrypted files:

  • .CRAB

It leaves text files that serve as ransom notes containing the following text:

  • {Encrypted Directory}\CRAB-DECRYPT.txt

NOTES:

Enabling Volume Shadow Service

  1. Run the command prompt (cmd.exe) as administrator.
  2. Enable Volume Shadow Service by typing the following command:

    net start vss

  SOLUTION

Minimum Scan Engine:

9.850

FIRST VSAPI PATTERN FILE:

15.174.04

FIRST VSAPI PATTERN DATE:

14 Jun 2019

VSAPI OPR PATTERN File:

15.175.00

VSAPI OPR PATTERN Date:

15 Jun 2019

Step 1

Before doing any scans, Windows 7, Windows 8, Windows 8.1, and Windows 10 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_LOCAL_MACHINE\SOFTWARE\Microsoft\CurrentVersion\RunOnce
    • {Random Characters} = %Application Data%\Microsoft\{Random Characters}.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.
  • %Application Data%\Microsoft\{Random Characters}.exe
  • {Encrypted Directory}\CRAB-DECRYPT.txt
  • %User Temp%\pidor.bmp

Step 6

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

Restore encrypted files from backup.

Step 8

Reset your Desktop properties

[ Learn More ]


Did this description help? Tell us how we did.