RANSOM_CTBLOCKER.AN

 Analysis by: Joselyn Canuela

 ALIASES:

Trojan.Win32.Inject.acbxs (Kaspersky), Trojan:Win32/Dynamer!ac (Microsoft), Ransom.CTBLocker (Symantec), Ransom_c.DJG (AVG)

 PLATFORM:

Windows

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

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Downloaded from the Internet


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 the Windows Task Scheduler to add a scheduled task that executes the copies it drops. It injects its dropped file/component to specific processes.

  TECHNICAL DETAILS

File Size:

801,086 bytes

File Type:

EXE

Memory Resident:

Yes

Initial Samples Received Date:

16 Nov 2016

Payload:

Encrypts files, Displays message/message boxes

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:

  • %User Temp%\{random strings}.exe

(Note: %User Temp% is the user's temporary folder, where it usually is C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Local\Temp 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 component file(s):

  • %Windows%\Tasks\{random strings}.job - added in scheduled tasks which launches the malware executable file
  • %System%\Tasks\{random strings}
  • %Windows%\Temp\Expiry.D
  • %Windows%\Temp\petrolatum.dll
  • %Windows%\Temp\ns{random characters}.tmp\System.dll
  • %AppDataLocal%\Expiry.D
  • %AppDataLocal%\petrolatum.dll
  • %AppDataLocal%\nso{random characters}.tmp\System.dll
  • %ProgramData%\{random strings}.html - contain instructions on how to pay the ransom and the list of encrypted files
  • %User Documents%\!Decrypt-All-Files-{random strings}.txt - ransom note
  • %User Documents%\!Decrypt-All-Files-{random strings}.bmp - the malware changes the wallpaper to this file

(Note: %Windows% is the Windows folder, where it usually is C:\Windows on all Windows operating system versions.. %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.. %AppDataLocal% is the Application Data folder found in Local Settings, where it is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Local 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.. %ProgramData% is the Program Data folder, where it usually is C:\Program Files in Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\ProgramData 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 uses the Windows Task Scheduler to add a scheduled task that executes the copies it drops.

It creates the following folders:

  • %AppDataLocal%\nso{random characters}.tmp
  • %Windows%\Temp\ns{random characters}.tmp

(Note: %AppDataLocal% is the Application Data folder found in Local Settings, where it is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, Windows Server 2003, and Windows XP (32- and 64-bit); C:\Users\{user name}\AppData\Local 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.. %Windows% is the Windows folder, where it usually is C:\Windows on all Windows operating system versions.)

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

  • {random strings}

It injects its dropped file/component to the following processes:

  • explorer.exe

Autostart Technique

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

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Run
{Default} = "%User Temp%\{random strings}.exe"

Other Details

This Trojan encrypts files with the following extensions:

  • .pwm
  • .kwm
  • .txt
  • .cer
  • .crt
  • .der
  • .pem
  • .doc
  • .cpp
  • .c
  • .php
  • .js
  • .cs
  • .pas
  • .bas
  • .pl
  • .py
  • .docx
  • .rtf
  • .docm
  • .xls
  • .xlsx
  • .safe
  • .groups
  • .xlk
  • .xlsb
  • .xlsm
  • .mdb
  • .mdf
  • .dbf
  • .sql
  • .md
  • .dd
  • .dds
  • .jpe
  • .jpg
  • .jpeg
  • .cr2
  • .raw
  • .rw2
  • .rwl
  • .dwg
  • .dxf
  • .dxg
  • .psd
  • .3fr
  • .accdb
  • .ai
  • .arw
  • .bay
  • .blend
  • .cdr
  • .crw
  • .dcr
  • .dng
  • .eps
  • .erf
  • .indd
  • .kdc
  • .mef
  • .mrw
  • .nef
  • .nrw
  • .odb
  • .odm
  • .odp
  • .ods
  • .odt
  • .orf
  • .p12
  • .p7b
  • .p7c
  • .pdd
  • .pdf
  • .pef
  • .pfx
  • .ppt
  • .pptm
  • .pptx
  • .pst
  • .ptx
  • .r3d
  • .raf
  • .srf
  • .srw
  • .wb2
  • .vsd
  • .wpd
  • .wps
  • .7z
  • .zip
  • .rar
  • .dbx
  • .gdb
  • .bsdr
  • .bsdu
  • .bdcr
  • .bdcu
  • .bpdr
  • .bpdu
  • .ims
  • .bds
  • .bdd
  • .bdp
  • .gsf
  • .gsd
  • .iss
  • .arp
  • .rik
  • .gdb
  • .fdb
  • .abu
  • .config
  • .rgx

It renames encrypted files using the following names:

  • {Original file name and extension}.{random strings}

It does the following:

  • The ransomware displays the following user interface once done encrypting:
  • Clicking Next allows to do a test decryption:
  • Clicking next proceeds to connecting to the URL http://{BLOCKED}pu4tmpg.onion.gq/{random characters} to get a private key:
  • Once the private key has been successfully requested, it asks for payment:
  • Clicking Exchange shows directions on paying using bitcoins:
  • If request for private key fails, it shows instructions on how to do offline decryption:
  • It encrypts files in all drives.

  SOLUTION

Minimum Scan Engine:

9.850

FIRST VSAPI PATTERN FILE:

12.902.05

FIRST VSAPI PATTERN DATE:

16 Nov 2016

VSAPI OPR PATTERN File:

12.903.00

VSAPI OPR PATTERN Date:

17 Nov 2016

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

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\Windows\CurrentVersion\Run
    • {Default} = "%User Temp%\{random strings}.exe"

Step 5

Delete the Scheduled Tasks added by this malware/grayware

[ Learn More ]

To delete the added Scheduled Task file:

For Windows 2000, Windows XP, and Windows Server 2003:

  1. Open the Windows Scheduled Tasks. To do this, click Start>Programs>Accessories>System Tools>Scheduled Tasks.
  2. Double-click on a .JOB file.
  3. Check if the malware path and file name exists in the .JOB file. To do this, check the value in the Run field.
  4. If found, select the .JOB file then press SHIFT+DELETE to permanently delete the file.
  5. Repeat the steps above for the remaining .JOB files.

For Windows Vista, Windows 7, Windows Server 2008, Windows 8, Windows 8.1, and Windows Server 2012:

  1. Open the Windows Task Scheduler. To do this:
    • On Windows Vista, Windows 7, and Windows Server 2008, click Start, type taskschd.msc in the Search input field, then press Enter.
    • On Windows 8, Windows 8.1, and Windows Server 2012, right-click on the lower left corner of the screen, click Run, type taskschd.msc, then press Enter.
  2. In the left panel of the Task Scheduler Window, click Task Scheduler Library.
  3. In the upper-middle panel, click a Task.
  4. In the lower middle panel, click the Actions tab
  5. Check if the malware path and file name exists in the task. To do this, check the value in the Details column under the Actions tab.
  6. If found, select the task and press DELETE and click Yes to delete the task.
  7. Repeat the steps above for the remaining tasks.

Step 6

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.  
  • %AppDataLocal%\nso{random characters}.tmp
  • %Windows%\Temp\ns{random characters}.tmp

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.
  • %Windows%\Tasks\{random strings}.job
  • %System%\Tasks\{random strings}
  • %Windows%\Temp\Expiry.D
  • %Windows%\Temp\petrolatum.dll
  • %AppDataLocal%\Expiry.D
  • %AppDataLocal%\petrolatum.dll
  • %ProgramData%\{random strings}.html
  • %User Documents%\!Decrypt-All-Files-{random strings}.txt
  • %User Documents%\!Decrypt-All-Files-{random strings}.bmp

Step 8

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