Q-Dir malware found in official installers with RAT
Q-Dir malware was found in installation files distributed through the official SoftwareOK website, in a software supply chain attack, where attackers tamper with software before it reaches users. AhnLab, a South Korean cybersecurity company, said the altered files affected both fresh downloads and updates applied to previously installed legitimate programs.
Q-Dir, also known as Quad Directory Explorer, is a free, lightweight file manager for Windows. DesktopOK is a free Windows utility that saves and restores desktop icon positions. The unauthorized changes were designed to make the programs appear to work normally while they downloaded and installed a Python-based remote access trojan, or RAT. A RAT is malware that gives an attacker remote control over an infected computer.
AhnLab confirmed poisoned installers for Q-Dir 12.85.0.0, Q-Dir 12.84.0.0, Q-Dir 12.83.0.0, DesktopOK 12.85.0.0 and DesktopOK 12.82.0.0. The company identified the files through differences in their SHA-256 hashes, which are fixed digital fingerprints used to check whether a file has been changed, and through extra code that downloaded and automatically ran additional files. The exact way the installation files were replaced remains unknown.
The malicious installer still launches the legitimate Q-Dir or DesktopOK, helping reduce suspicion, but also contacts an external server to retrieve two files from mail.c1a2[.]top. One is 7zr.exe, a legitimate 7-Zip program used to decompress files. The other is dsv2_py39_agent.7z, an archive containing the RAT and a Python runtime environment. The attack uses 7-Zip to extract the archive and start the Python malware.
The RAT creates persistence, meaning it arranges to start again after the computer is restarted, through a scheduled task. A scheduled task is an automatic instruction that Windows runs at a set time or trigger. This task is made to resemble Microsoft Edge and launches a Python script called py_client_dsv2.py. After starting, the RAT connects to its command and control server, a system used by attackers to send instructions, at 8.210.69[.]51:9876.
According to AhnLab, the malware can execute shell commands, which are text instructions for controlling a computer, and Python code. It can upload and download files, capture screenshots, and collect operating system and system information. It also gathers a list of running processes and compares that list with an internal catalogue of security products used in South Korea and elsewhere.
The catalogue includes AhnLab, ESTSecurity, Hauri, CrowdStrike, SentinelOne, Trend Micro, Avast, McAfee, ESET, Symantec, Kaspersky, Bitdefender, Sophos, Fortinet, Elastic and Malwarebytes. Information about detected security programs is sent to the command and control server. AhnLab said this could help the attackers plan later stages of the intrusion or deliver payloads intended to bypass detection.
The activity has not been linked to any known threat actor. AhnLab did find Chinese-language comments in the malware's source code, but said this only suggests that the malware authors or attackers may have worked in a Chinese-speaking environment. It does not establish who carried out the attack.
Anyone using Q-Dir or DesktopOK, or anyone who recently installed or updated either program, should verify the SHA-256 hash of the downloaded installer and look for signs that the RAT was installed or executed. Removing and reinstalling the application alone may not remove the Python malware. AhnLab also recommends checking for suspicious Python environments, scheduled tasks, related files and traces of external network communication, updating the antivirus engine and running a full system scan.
For businesses and IT teams, AEU-I provides security-first IT, infrastructure and consulting, which is relevant when checking affected endpoints and reviewing suspicious activity after a software installation incident.