Malicious Telegram Installer Drops Purple Fox Rootkit

This AutoIt script is the first stage of the attack which creates a new folder named “TextInputh” under C:UsersUsernameAppDataLocalTemp and drops a legitimate Telegram installer (which is not even executed) and a malicious downloader (TextInputh.exe).
When executed, TextInputh.exe creates a new folder named “1640618495” under the C:UsersPublicVideos directory. TextInputh.exe file is used as a downloader for the next stage of the attack. It contacts a C&C server and downloads two files to the newly created folder:

1.rar – which contains the files for the next stage. 7zz.exe – a legitimate 7z archiver.
2.The 7zz.exe is used to unarchive 1.rar, which contains the following files.

Next, TextInputh.exe performs the following actions:

Copies 360.tct with “360.dll” name, rundll3222.exe and svchost.txt to the ProgramData folder
Executes ojbk.exe with the “ojbk.exe -a” command line
Deletes 1.rar and 7zz.exe and exits the process
ojbk.exe

When executed with the “-a” argument, this file is only used to reflectively load the malicious 360.dll file.

This DLL is responsible for reading the dropped svchost.txt file. After which, a new HKEY_LOCAL_MACHINESYSTEMSelectMarkTime registry key is created, whose value equals the current time of svchost.exe and then, the svchost.txt payload is executed.

As the attack flow continues, this file appears to contain the byte code of the next stage of the malicious payload executed by the 360.dll. As the first action of svchost.txt, it checks for the existence of the HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp Paths360safe.exePath registry key. If the registry key is found, the attack flow will perform an additional step before moving on to the next stage:

The attack drops five more files into the ProgramData folder:

-Calldriver.exe – this file is used to shut down and block initiation of 360 AV
-Driver.sys – after this file is dropped, a new system driver service named “Driver” is created and started on the infected PC and bmd.txt is created in the ProgramData folder.
-dll.dll – executed after UAC bypass. The UAC bypass technique used by svchost.txt is a “UAC bypass using CMSTPLUA COM interface” and is well described here. This technique is commonly used by the LockBit and BlackMatter ransomware authors. The dll.dll is executed with the “C:ProgramDatadll.dll, luohua” command line.
-kill.bat – a batch script which is executed after the file drop ends.
-speedmem2.hg – SQLite file

All these files work together to shut down and block the initiation of 360 AV processes from the kernel space, thus allowing the next stage attack tools (Purple Fox Rootkit, in our case) to run without being detected.

After the file drop and execution, the payload moves to the next step, which is the C&C communication. As mentioned above, if the HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp Paths360safe.exePath registry key is not found, the flow just skips to this step.

First, the hardcoded C&C address is added as a mutex. Next, the following victim’s information is gathered:

Hostname
CPU – by retrieving a value of HKLMHARDWAREDESCRIPTIONSystemCentralProcessor ~MHz registry key
Memory status
Drive Type
Processor Type – by calling GetNativeSystemInfo and checking the value of wProcessorArchitecture.

Next, the malware checks if any of the following processes are running on the victim’s PC:

360tray.exe – 360 Total Security
360sd.exe – 360 Total Security
kxetray.exe – Kingsoft Internet Security
KSafeTray.exe – Kingsoft Internet Security
QQPCRTP.exe – Tencent
HipsTray.exe – HeroBravo System Diagnostics
BaiduSd.exe – Baidu Anti-Virus
baiduSafeTray.exe – Baidu Anti-Virus
KvMonXP.exe – Jiangmin Anti-Virus
RavMonD.exe – Rising Anti-Virus
QUHLPSVC.EXE – Quick Heal Anti-Virus
mssecess.exe – Microsoft MSE
cfp.exe – COMODO Internet Security
SPIDer.exe
acs.exe
V3Svc.exe – AhnLab V3 Internet Security
AYAgent.aye – ALYac Software
avgwdsvc.exe – AVG Internet Security
f-secure.exe – F‑Secure Anti‑Virus
avp.exe – Kaspersky Anti-Virus
Mcshield.exe – McAfee Anti-Virus
egui.exe – ESET Smart Security
knsdtray.exe
TMBMSRV.exe – Trend Micro Internet Security
avcenter.exe – Avira Anti-Virus
ashDisp.exe – Avast Anti-Virus
rtvscan.exe – Symantec Anti-Virus
remupd.exe – Panda software
vsserv.exe – Bitdefender Total Security
PSafeSysTray.exe – PSafe System Tray
ad-watch.exe
K7TSecurity.exe – K7Security Suite
UnThreat.exe – UnThreat Anti-Virus
It seems that after this check is complete, all the collected information, including which security products are running, is sent to the C&C server.

The last stage of this attack is the download and execution of the Purple Fox Rootkit. Purple Fox uses the msi.dll function, ‘MsiInstallProductA’, to download and execute its payload. The payload is a .msi file that contains encrypted shellcode including 32-bit and 64-bit versions. Once executed, the system will be restarted with the ‘PendingFileRenameOperations’ registry to rename its components. In our case the Purple Fox Rootkit is downloaded from hxxp://144.48.243[.]79:17674/C558B828.Png.
Calldriver.exe

Used to shut down and block initiation of 360 AV processes from the kernel space.

Sign Up For Threat Alerts

Loading...
Threats Icon

Mar 21, 2023

Dotrunpex – Demystifying new virtualized .net injector...

DotRunpeX is a new injector written in .NET using the Process Hollowing technique and used...

Threats Icon

Mar 21, 2023

GlobeImposter Ransomware With MedusaLocker Spreading Via RDP

A GlobeImposter ransomware campaign was discovered being carried out by the attackers behind MedusaLocker. The...

Threats Icon

Mar 20, 2023

Common credential stealers

FortiGuard Threat Research has observed an increasing threat arising from credential stealers. The most common...

Threats Icon

Mar 20, 2023

Sirattacker And ALC Ransomware Analysis

The Sirattacker and ALC ransomware families continue to gain traction and compromise Microsoft Windows devices....

Threats Icon

Mar 19, 2023

Google Advertising Used To Distribute RedLine Stealer

A malvertising campaign was discovered mimicking websites belonging to well-known software such as Notepad++ and...

Threats Icon

Mar 16, 2023

Microsoft Outlook Elevation of Privilege Vulnerability Exploit

Microsoft has posted a security vulnerability CVE-2023-23397, exploiting it allows attackers to gain elevated privileges...

Threats Icon

Mar 16, 2023

ImBetter Information Stealer Targets Cryptocurrency Users

Threat actors are targeting cryptocurrency users with the ImBetter information stealer malware. Adversaries are hosting...

Threats Icon

Mar 16, 2023

ImBetter Information Stealer Targets Cryptocurrency Users

Threat actors are targeting cryptocurrency users with the ImBetter information stealer malware. Adversaries are hosting...

Threats Icon

Mar 15, 2023

US Cert Alert – Threat Actors Exploit...

CISA and authoring organizations assess that, beginning as late as November 2022, threat actors successfully...

Threats Icon

Mar 15, 2023

Threat Actors Use ParallaxRAT For Targeting Cryptocurrency...

Threat actors are targeting organization in the cryptocurrency sector with spam and phishing campaigns that...

Threats Icon

Mar 13, 2023

Exposing The Lazarus Arsenal WinorDLL64 Backdoor

In 2021 the researchers discovered and dissected a tool from the Lazarus APTs arsenal named...

Threats Icon

Mar 12, 2023

Clasiopa New Group Targets Materials Research

A campaign targeting the materials research sector with custom and commodity utilities and malware is...

Threats Icon

Mar 09, 2023

New Emotet campaign

Emotet is a type of malware that is designed to steal sensitive information from infected...

Threats Icon

Mar 09, 2023

How sys01 stealer will get your sensitive...

Morphisec has been tracking an advanced info stealer Analysts have named "SYS01 stealer." SYS01 stealer...

Threats Icon

Mar 09, 2023

How sys01 stealer will get your sensitive...

Morphisec has been tracking an advanced info stealer Analysts have named "SYS01 stealer." SYS01 stealer...