Trojan.BAT.BATCLOAK.THJBDBC

 Analysis by: Francesca Villasanta

 ALIASES:

Script.Downloader.48271.GC (QUICKHEAL)

 PLATFORM:

Windows

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

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted: Yes

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Downloaded from the Internet, Dropped by other malware


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 uses Windows Task Scheduler to create a scheduled task that executes the dropped copy.

  TECHNICAL DETAILS

File Size:

1,093,563 bytes

File Type:

BAT

Memory Resident:

Yes

Initial Samples Received Date:

16 Oct 2023

Payload:

Drops files, Creates scheduled tasks

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%\Network48336Man.cmd

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

  • Copies of %System%\WindowsPowershell\v1.0\powershell.exe :
    • {Malware Path}\{Malware Filename and Extension}.exe
    • %Application Data%\Network48336Man.cmd.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 processes:

  • {Malware Filename and Extension}.exe {Powershell Script to decrypt and reflectively load the malicious payload}
  • powershell.exe $a = [System.Diagnostics.Process]::GetProcessById({Process ID});$b = $a.MainModule.FileName;$a.WaitForExit();Remove-Item -Force -Path $b;
  • powershell.exe add-mppreference -exclusionpath @({List of Available Drives})
  • "powershell.exe" [Console]::Title = ((Get-ScheduledTask).Actions.Execute -join '').Contains('{Malware Path}\{Malware Filename}')
  • powershell.exe Register-ScheduledTask -TaskName 'OneNote 48336' -Trigger (New-ScheduledTaskTrigger -AtLogon) -Action (New-ScheduledTaskAction -Execute '%Application Data%\Network48336Man.cmd') -Settings (New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -Hidden -ExecutionTimeLimit 0) -RunLevel Highest -Force
  • cmd /c ""%Application Data%\Network48336Man.cmd" "

(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 uses Windows Task Scheduler to create a scheduled task that executes the dropped copy.

Autostart Technique

The scheduled task executes the malware every:

  • Logon

Other Details

This Trojan does the following:

  • It reflectively loads the encrypted payloads.
  • It bypasses the Antimalware Scan Interface (AMSI).
  • Terminates if found being executed in a debugger.
  • Sets the attribute of the copied powershell.exe ({Malware Path}\{Malware Filename and Extension}.exe) to HIDDEN.
  • Deletes the copied powershell.exe after execution.
  • It adds the available drives to the exclusion path list of Windows Defender.

It adds the following scheduled tasks:

  • Task Name: OneNote 48336
    Trigger: At Logon
    Task Action: %Application Data%\Network48336Man.cmd

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

  SOLUTION

Minimum Scan Engine:

9.800

FIRST VSAPI PATTERN FILE:

18.776.04

FIRST VSAPI PATTERN DATE:

24 Oct 2023

VSAPI OPR PATTERN File:

18.777.00

VSAPI OPR PATTERN Date:

25 Oct 2023

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

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: OneNote 48336
    • Task Action: %Application Data%\Network48336Man.cmd
  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 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.
  • {Malware Path}\{Malware Filename and Extension}.exe
  • %Application Data%\Network48336Man.cmd.exe
  • %Application Data%\Network48336Man.cmd

Step 6

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