TSPY_GATAK.SM4
W32/Kryptik.FLXL!tr (Fortinet), Trojan:Win32/Dynamer!ac (Microsoft)
Windows


Threat Type: Spyware
Destructiveness: No
Encrypted: Yes
In the wild: Yes
OVERVIEW
This spyware arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
As of this writing, the said sites are inaccessible.
It connects to certain websites to send and receive information. It deletes itself after execution.
TECHNICAL DETAILS
Arrival Details
This spyware 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 spyware drops the following files:
- %User Temp%\Tar{random digits}.tmp - contains system information
(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 injects codes into the following process(es):
- explorer.exe
Other System Modifications
This spyware adds the following registry keys:
HKEY_CURRENT_USER\Software\Microsoft\
EventSubsystem
Download Routine
This spyware accesses the following websites to download files:
- http://{BLOCKED}enpost.org/uploads/ad5413d5da03f42231b3892fdfcf4084.png
- http://{BLOCKED}.{BLOCKED}.22.206/safari/confirm?ocr=552927891723
- http://{BLOCKED}.{BLOCKED}.77.109/timetable/ballet?bigleti=42007347811
As of this writing, the said sites are inaccessible.
Information Theft
This spyware gathers the following data:
- OS Version
- Computer Name
- User Name
- Running process
Other Details
This spyware connects to the following website to send and receive information:
- http://{BLOCKED}c.co.kr/report_N_0053_{hex value}_{step number}_{report status}
- http://{BLOCKED}c.co.kr/report_N_0053_{hex value}_0_started_ext_ALRRR_{value}_OSBBB_{OS architecture}_OSNNN_{OS}_CNNN_{Computer Name}_UNNN_{UserName}_EXXX_
It deletes itself after execution.
NOTES:
This spyware executes the following command:
- CMD /C SYSTEMINFO & SYSTEMINFO & SYSTEMINFO & SYSTEMINFO &SYSTEMINFO & DEL {original malware copy}
Where {report status} can be any of the following:
- already_active
- already_ok
- crc_ok
- except
- except_detail_
- executed_ok
- finished
- gdiplus_not_ok
- gdiplus_ok
- image_not_ok
- image_ok
- image_size_not_ok
- image_size_ok
- image_type_not_ok
- image_type_ok
- mark_already
- mark_not_setted
- mark_ok
- mark_setted
- page_err
- page_ok
- payload_executed
- payload_file_delete_ok
- payload_file_name_ok
- payload_file_run_ok
- payload_file_wait_ok
- payload_file_write_ok
- payload_mem_not_ok
- payload_mem_ok
- payload_not_ok
- payload_ok
- payload_size_ok
- payload_type_bad
- payload_type_exe
- payload_type_exe_wait_del
- payload_type_shell
- process_{running process}
- started_ext_
- step_0
- step_1
- step_2
- step_3
- step_4
- watch2_err_{digits}
- watch2_start_{digits}_{digits}
- watch2_finish_{digits}_{digits}__{digits}
- http__{BLOCKED}enpost.org/uploads/ad5413d5da03f42231b3892fdfcf4084.png
This malware relies on steganography to evade detection. It connects to specific URLs to download a stock image, where majority of its routines are embedded. It then extracts the following from the downloaded image:
- Arbitrary code
- List of URLs to be accessed
The malware avoids to execute its malicious behavior if the computer name is MIKE-PC.
SOLUTION
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
Step 4
Delete this registry key
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
- EventSubsystem
- EventSubsystem
Step 5
Search and delete this file
- %User Temp%\~{random digits}.tmp
Step 6
Restart in normal mode and scan your computer with your Trend Micro product for files detected as TSPY_GATAK.SM4. 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.

