Ransom.MSIL.BLACKLEGION.THLOFBC

 Analysis by: John Rainier Navato

 ALIASES:

Gen:Heur.MSIL.Krypt.!cdmip!.2 (BITDEFENDER)

 PLATFORM:

Windows

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

  • Threat Type: Ransomware

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Downloaded from the Internet, Dropped by other malware


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 drops files as ransom note. It avoids encrypting files with the following file extensions.

  TECHNICAL DETAILS

File Size:

127,488 bytes

File Type:

EXE

Memory Resident:

Yes

Initial Samples Received Date:

05 Dec 2023

Payload:

Drops files, Encrypts files, Modifies system registry

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:

  • %User Temp%\WmiPrvSE.exe

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

It adds the following processes:

  • %System%\schtasks.exe /Create /TN "GoogleUpdateTaskMachineCoreUA" /TR "{Malware File Path}\{Malware File Name}" /SC ONLOGON /RL HIGHEST /F /RU SYSTEM /RL HIGHEST /RL HIGHEST /RL HIGHEST /RP /NP /RL HIGHEST /RL HIGHEST /RP /NP /RU SYSTEM /RP /NP /RL HIGHEST /SD "Keeps your Google software up to date. If this task is disabled or stopped, your Google software will not be kept up to date, meaning security vulnerabilities that may arise cannot be fixed and features may not work. This task uninstalls itself when there is no Google software using it."
  • %System%\cmd.exe /c vssadmin.exe delete shadows /all /quiet

(Note: %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.)

Autostart Technique

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

HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Run
svchost = %User Temp%\WmiPrvSE.exe

Other Details

This Ransomware does the following:

  • It checks the size of the file to encrypt.
    • If its size is greater than 500,000,000 bytes, it will only encrypt the first half of the file.
    • If it is less than or equal 500,000,000 bytes, it will encrypt the whole file.
  • It sets the attributes of the following items to Hidden:
    • {Malware File Path}\{Malware File Name}
    • %User Temp%\WmiPrvSE.exe

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

It adds the following scheduled tasks:

  • Name: GoogleUpdateTaskMachineCoreUA
  • Trigger: At log on of any user
  • Action: {Malware File Path}\{Malware File Name}

Ransomware Routine

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

  • C:\Windows
  • DecryptNote

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

  • .[{Volume Serial Number}].[BlackLegion@zohomail.eu].BlackLegion

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

  • It checks if %Desktop%\DecryptNote.txt exists.
    • If it does not exist:
      • %Desktop%\DecryptNote.txt
    • If it exist:
      • %Desktop%\DecryptNote-{Random}.txt
  • It checks if {Available Drive}\DecryptNote.txt exists.
    • If it does not exist:
      • {Available Drive}\DecryptNote.txt
    • If it exist:
      • {Available Drive}\DecryptNote-{Random}.txt

It avoids encrypting files with the following file extensions:

  • .BlackLegion
  • .dll
  • .exe

  SOLUTION

Minimum Scan Engine:

9.800

FIRST VSAPI PATTERN FILE:

18.862.02

FIRST VSAPI PATTERN DATE:

06 Dec 2023

VSAPI OPR PATTERN File:

18.863.00

VSAPI OPR PATTERN Date:

07 Dec 2023

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:

     
    • PE.Win32.TRX.XXPE50FFF075

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

Deleting Scheduled Tasks while in Safe Mode

  1. Still in safe mode, the following {Task Name}-{Task to be run} listed should be used in the steps identified below:
    • Task Name: GoogleUpdateTaskMachineCoreUA
    • Task to be run: {Malware File Path}\{Malware File Name}
  2. For Windows 7 and Server 2008 (R2) users, click Start>Computer.
    • For Windows 8, 8.1, 10, and Server 2012 users, right-click on the lower left corner of the screen, then click File Explorer.
  3. In the Search Computer/This PC input box, type:
    • %System%\Tasks\{Task Name}
  4. Once located, select the file then press SHIFT+DELETE to delete it.
  5. Open Registry Editor. To do this:
    • For Windows 7 and Server 2008 (R2) users, click the Start button, type regedit in the Search input field, and press Enter.
    • For Windows 8, 8.1, 10, and Server 2012 (R2) users, right-click on the lower left corner of the screen, click Run, type regedit in the text box
  6. In the left panel of the Registry Editor window, double-click the following:
    • HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Windows NT>CurrentVersion>Schedule>TaskCache>Tree>{Task Name}
  7. Locate the created entry and take note of the registry value's data:
    • ID={Task Data}
  8. After taking note of the data, delete the registry key:
    • HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Windows NT>CurrentVersion>Schedule>TaskCache>Tree>{Task Name}
  9. In the left panel of the Registry Editor window, double-click the following:
    • HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Windows NT>CurrentVersion>Schedule>TaskCache>Tasks
  10. Still in the left panel, locate and delete the registry key with the same name as the located Task Data in step #6:
    • ={Task Data}
  11. Close Registry Editor.

Step 6

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
    • svchost = %User Temp%\WmiPrvSE.exe

Step 7

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 Temp%\WmiPrvSE.exe
  • {Available Drive}\DecryptNote.txt
  • {Available Drive}\DecryptNote-{Random}.txt
  • %Desktop%\DecryptNote.txt else
  • %Desktop%\DecryptNote-{Random}.txt

Step 8

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