Ransom.Win32.CRYPTESLA.KPNJ

 Analysis by: Paul Steven Nadera

 ALIASES:

Win32/Filecoder.TeslaCrypt.I trojan (NOD32); Ransom:Win32/Tescrypt (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:

Downloaded from the Internet


This Ransomware 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 connects to certain websites to send and receive information. It gathers information and reports it to its servers.

It encrypts files found in specific folders. It drops files as ransom note.

  TECHNICAL DETAILS

File Size:

327,168 bytes

File Type:

EXE

Memory Resident:

Yes

Initial Samples Received Date:

25 Oct 2017

Payload:

Connects to URLs/IPs, Displays message/message boxes, Encrypts files, Steals information

Arrival Details

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

  • %Application Data%\{random string}-a.exe -> dropped copy

(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 drops the following files:

  • %User Profile%\Documents\recover_file_{random string}.txt -> contains encoded data

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

It adds the following processes:

  • bcdedit.exe /set {current} bootems off
  • bcdedit.exe /set {current} advancedoptions off
  • bcdedit.exe /set {current} optionsedit off
  • bcdedit.exe /set {current} bootstatuspolicy IgnoreAllFailures
  • bcdedit.exe /set {current} recoveryenabled off
  • "%System%\vssadmin.exe" delete shadows /all /Quiet
  • "%System%\NOTEPAD.EXE" %Desktop%\Howto_RESTORE_FILES.txt
  • %Application Data%\{random string}-a.exe
  • "%System%\cmd.exe" /c DEL {malware path}\{malware filename}.exe -> deletes original malware file
  • "C:\Windows\system32\cmd.exe" /c DEL %Application Data%\{random string}-a.exe -> deletes dropped copy after execution

(Note: %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.. %Desktop% is the current user's desktop, which is usually C:\Documents and Settings\{User Name}\Desktop on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\Desktop on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).. %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 executes then deletes itself afterward.

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

  • 78456214324124

Autostart Technique

This Ransomware modifies the following registry entries to ensure it automatic execution at every system startup:

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Run
Acronis = %Application Data%\{random string}-a.exe

Other System Modifications

This Ransomware adds the following registry entries:

HKEY_CURRENT_USER\Software\zsys
ID = {Instance ID}

HKEY_CURRENT_USER\Software\{Instance ID in hex}
data = {encoded data}

It modifies the following registry entries:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Policies\
System
EnableLinkedConnections = 1 -> to ensure it can find mapped network drives

Process Termination

This Ransomware terminates processes or services that contain any of the following strings if found running in the affected system's memory:

  • askmg -> taskmgr
  • rocex -> procexp
  • egedi -> regedit
  • sconfi -> msconfig
  • cmd -> CMD

Other Details

This Ransomware adds the following registry keys:

HKEY_CURRENT_USER\Software\zsys

HKEY_CURRENT_USER\Software\{Instance ID in hex}

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

  • http://myexternalip.com/raw

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

  • http://{BLOCKED}a.com/misc.php
  • http://{BLOCKED}rabailarsevillanas.com/wp-content/uploads/misc.php
  • http://{BLOCKED}stiepel.com/tmp/misc.php
  • http://{BLOCKED}den.com/sysmisc.php
  • http://{BLOCKED}totalwellness.com/wp-content/uploads/misc.php
  • http://{BLOCKED}k.com/misc.php

It encrypts files with the following extensions:

  • .vpp_pc
  • .r3d
  • .ptx
  • .pef
  • .srw
  • .x3f
  • .der
  • .cer
  • .crt
  • .pem
  • .odt
  • .ods
  • .odp
  • .odm
  • .odc
  • .odb
  • .doc
  • .docx
  • .kdc
  • .mef
  • .mrwref
  • .nrw
  • .orf
  • .raw
  • .rwl
  • .rw2
  • .mdf
  • .dbf
  • .psd
  • .pdd
  • .pdf
  • .eps
  • .jpg
  • .jpe
  • .dng
  • .3fr
  • .arw
  • .srf
  • .sr2
  • .bay
  • .crw
  • .cr2
  • .dcr
  • .ai
  • .indd
  • .cdr
  • .erf
  • .bar
  • .hkx
  • .raf
  • .rofl
  • .dba
  • .db0
  • .kdb
  • .mpqge
  • .vfs0
  • .mcmeta
  • .m2
  • .lrf
  • .ff
  • .cfr
  • .snx
  • .lvl
  • .arch00
  • .ntl
  • .fsh
  • .itdb
  • .itl
  • .mddata
  • .sidd
  • .sidn
  • .bkf
  • .qic
  • .bkp
  • .bc7
  • .bc6
  • .pkpass
  • .tax
  • .gdb
  • .qdf
  • .t12
  • .t13
  • .ibank
  • .sum
  • .sie
  • .zip
  • .w3x
  • .rim
  • .psk
  • .tor
  • .vpk
  • .iwd
  • .kf
  • .mlx
  • .fpk
  • .dazip
  • .vtf
  • .vcf
  • .esm
  • .blob
  • .dmp
  • .layout
  • .menu
  • .ncf
  • .sid
  • .sis
  • .ztmp
  • .vdf
  • .mov
  • .fos
  • .sb
  • .itm
  • .wmo
  • .itm
  • .map
  • .wmo
  • .sb
  • .svg
  • .cas
  • .gho
  • .syncdb
  • .mdbackup
  • .hkdb
  • .hplg
  • .hvpl
  • .icxs
  • .docm
  • .wps
  • .xls
  • .xlsx
  • .xlsm
  • .xlsb
  • .xlk
  • .ppt
  • .pptx
  • .pptm
  • .mdb
  • .accdb
  • .pst
  • .dwg
  • .xf
  • .dxg
  • .wpd
  • .rtf
  • .wb2
  • .pfx
  • .p12
  • .p7b
  • .p7c
  • .txt
  • .jpeg
  • .png
  • .rb
  • .css
  • .js
  • .flv
  • .m3u
  • .py
  • .desc
  • .xxx
  • .wotreplay
  • wallet
  • .big
  • .pak
  • .rgss3a
  • .epk
  • .bik
  • .slm
  • .lbf
  • .sav
  • .re4
  • .apk
  • .bsa
  • .ltx
  • .forge
  • .asset
  • .litemod
  • .iwi
  • .das
  • .upk
  • .d3dbsp
  • .csv
  • .wmv
  • .avi
  • .wma
  • .m4a
  • .rar
  • .7z
  • .mp4
  • .sql

It gathers the following information and reports it to its servers:

  • Callback Function ("Ping" for initial request or "Crypted" after Encrypting)
  • IP Address
  • Operating System Version
  • Malware Version
  • Machine-specific Installation ID
  • Domain Name Used
  • RSA Key
  • Bitcoin Address
  • ECDH Global Recovery Key
  • Part of the malware image file checksum (Used as ID)

Ransomware Routine

This Ransomware encrypts files found in the following folders:

  • Fixed Drive
  • Removable Drive
  • Remote Drive

It avoids encrypting files with the following strings in their file path:

  • recove
  • .vvv

It avoids encrypting files found in the following folders:

  • %Windows%
  • %Program Files%
  • %ProgramData%

(Note: %Windows% is the Windows folder, where it usually is C:\Windows on all Windows operating system versions.. %Program Files% is the default Program Files folder, usually C:\Program Files in Windows 2000(32-bit), Server 2003(32-bit), XP, Vista(64-bit), 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit) , or C:\Program Files (x86) in Windows XP(64-bit), Vista(64-bit), 7(64-bit), 8(64-bit), 8.1(64-bit), 2008(64-bit), 2012(64-bit) and 10(64-bit).. %ProgramData% is a version of the Program Files folder where any user on a multi-user computer can make changes to programs. This contains application data for all users. This is usually C:\ProgramData on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit), or C:\Documents and Settings\All Users on Windows Server 2003(32-bit), 2000(32-bit) and XP.)

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

  • .vvv

It drops the following file(s) as ransom note:

  • %Desktop%\Howto_RESTORE_FILES.html and {encrypted directory}\how_recover+{random string}.html
  • %Desktop%\Howto_RESTORE_FILES.bmp
  • %Desktop%\Howto_RESTORE_FILES.txt and {encrypted directory}\how_recover+{random string}.txt

  SOLUTION

Minimum Scan Engine:

9.800

FIRST VSAPI PATTERN FILE:

16.346.04

FIRST VSAPI PATTERN DATE:

12 Nov 2020

VSAPI OPR PATTERN File:

16.347.00

VSAPI OPR PATTERN Date:

13 Nov 2020

Step 1

Trend Micro Predictive Machine Learning detects and blocks malware at the first sign of its existence, before it executes on your system. When enabled, your Trend Micro product detects this malware under the following machine learning name:

     
    • BKDR.Win32.TRX.XXPE002FF019

Step 2

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 3

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 4

Restart in Safe Mode

[ Learn More ]

Step 5

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\zsys
    • ID = {Instance ID values}
  • In HKEY_CURRENT_USER\Software\{Instance ID in hex}
    • data = {encoded data}
  • In HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
    • Acronis = %Application Data%\{random string}-a.exe

Step 6

Delete this registry key

[ 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.

  • HKEY_CURRENT_USER\Software\zsys
  • HKEY_CURRENT_USER\Software\{Instance ID in hex}

Step 7

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%\{random string}-a.exe
  • %User Profile%\Documents\recover_file_{random string}.txt{encrypted directory}\how_recover+{random string}.html
  • {encrypted directory}\how_recover+{random string}.txt
  • %Desktop%\Howto_RESTORE_FILES.txt
  • %Desktop%\Howto_RESTORE_FILES.html
  • %Desktop%\Howto_RESTORE_FILES.bmp

Step 8

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

Restore encrypted files from backup.


Did this description help? Tell us how we did.