HomeCyber AttacksHackers Trojanize Official Q-Dir and DesktopOK Installers to Spread Python-Based Spyware

Hackers Trojanize Official Q-Dir and DesktopOK Installers to Spread Python-Based Spyware

Attackers have tampered with the official installers for two popular free Windows utilities, Q-Dir and DesktopOK, quietly bundling a Python-based remote access trojan alongside the real software. The tainted installers were found on the developer’s own official download page rather than on a pirate site or a phishing link, which is what makes this case notable: people who went straight to the source still ended up with malware.

A poisoned download page

Q-Dir is a lightweight file manager that shows several folders in one window, and DesktopOK is a small tool that remembers and restores the position of desktop icons. Both are made by the same developer, Nenad Hrg, whose site SoftwareOK also distributes a third utility called WinScan2PDF.

South Korean security company AhnLab reported that several recent versions carried tampered installers, including Q-Dir 12.85.0.0, 12.84.0.0 and 12.83.0.0, and DesktopOK 12.85.0.0 and 12.82.0.0. AhnLab said other versions may be affected as well. The firm flagged the problem after noticing that the SHA-256 hashes of files downloaded from the site did not match the hashes SoftwareOK had published for those same releases, a mismatch that pointed to the files being swapped after they were built. AhnLab also found evidence that infections happened both through fresh downloads and through automatic updates of copies that were already installed. Neither AhnLab nor The Hacker News, which first reported on the AhnLab findings, said how the attackers managed to replace the files on the official site.

How the trojanized installer behaves

When someone runs one of the altered installers, it first drops a genuine, digitally signed copy of Q-Dir or DesktopOK into a public folder on the computer and opens it, so the program looks and works exactly as expected. While that is happening in the background, the installer quietly reaches out to an external server at mail.c1a2[.]top and downloads two files: a legitimate copy of the 7-Zip archive tool, renamed 7zr.exe, and an archive called dsv2_py39_agent.7z.

The 7-Zip tool is used to unpack that archive into a folder under C:\ProgramData\Microsoft\DeviceSync, or a similar path if that one is not available. Inside is a full Python 3.9 runtime along with the malicious program itself, which means the attack does not depend on the victim already having Python installed. To survive a restart, the malware creates a Windows Scheduled Task disguised with a name resembling Microsoft Edge, which quietly launches the hidden Python script every time the system starts.

What the hidden malware can do

Once running, the malware connects to a command and control server, the remote system the attackers use to issue instructions, at the address 8.210.69[.]51. From there it can execute shell commands and arbitrary Python code, upload and download files, take screenshots of the victim’s screen, and collect basic information about the operating system.

AhnLab also found that the malware checks the list of processes running on the infected machine against an internal list of more than 1,200 entries covering security software, including well-known names such as CrowdStrike, SentinelOne, Kaspersky, ESET, Trend Micro and AhnLab’s own V3 products. It reports back whatever it finds to the command server. AhnLab suggested the attackers could use that information to decide which follow-up tools are safe to deploy on a given machine, or to avoid triggering a particular antivirus product.

Who is behind the campaign

No security researcher has formally attributed this campaign to a specific hacking group, and AhnLab’s report does not name one. The company did note that the malware’s Python source code contains comments written in Chinese, and that the long list of security products it checks for also appears to have been compiled with Chinese-language naming conventions in mind. That is a pattern often associated with Chinese-speaking developers or operators, but it is not proof of who is responsible, and AhnLab stopped short of naming a country or group. As of publication, no CVE identifier has been assigned to this incident, since it involves a compromised distribution channel rather than a vulnerability in the Q-Dir or DesktopOK software itself.

What to do if you installed Q-Dir or DesktopOK recently

AhnLab recommends that anyone who downloaded either program recently check the SHA-256 hash of the installer file against the hash published on SoftwareOK’s official page before trusting it. If the file was already installed, AhnLab warns that simply uninstalling and reinstalling the program will not remove an existing infection, since the malware runs independently of the original software once it has been planted. Instead, affected users should look for the suspicious scheduled task, check for an unexpected Python environment on the system, update their antivirus definitions and run a full scan. Anyone who finds signs of the scheduled task or the C2 connection described above should treat the machine as compromised, disconnect it from the network, and check whether any sensitive data may have been accessed before cleaning it up.

Source: The Hacker News, reporting on findings originally published by AhnLab’s ASEC research team.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments