ENGINEERING

Q-Dir and DesktopOK installers from SoftwareOK’s own site installed a Python RAT. How to check your Windows PCs and remove it

AhnLab’s ASEC team reported on November 26 that some Q-Dir and DesktopOK installers on SoftwareOK’s official website had been replaced with tampered copies. Q-Dir is a free four-pane file manager, and DesktopOK is a free tool that saves and restores desktop icon layouts. The tampered installer runs the real program, so nothing looks wrong. At the same time it downloads and installs a Python remote access trojan (RAT) that lets the attacker run commands and Python code, copy files in and out, and take screenshots.

ASEC also found logs where an existing copy created the malicious files while it updated itself. ASEC hasn’t identified how the installers on SoftwareOK’s site were replaced.

These versions were confirmed tampered:

ProgramVersions
Q-Dir12.83, 12.84, 12.85
DesktopOK12.82, 12.85

ASEC warns that a PC which installed or updated either program while the bad files were up may be affected even at another version.

What it leaves on the PC

From ASEC’s report:

The RAT also checks the running processes against 1,206 names of antivirus and EDR products and sends the attacker what it found. ASEC’s table of good and bad installer hashes is in the report. SoftwareOK’s download page lists the good ones.

Uninstalling Q-Dir or DesktopOK leaves the RAT in place. It lives in its own folder with its own scheduled task.

Check one PC

Look for the RAT:

Get-ScheduledTask -TaskPath '\UPnp\' -TaskName 'MicrosoftEdge_dcntel' -ErrorAction SilentlyContinue
Test-Path "$env:ProgramData\Microsoft\DeviceSync\b2", "$env:ProgramData\DeviceSync\b2"
Get-CimInstance Win32_Process -Filter "Name='pythonw.exe'" | Where-Object CommandLine -match 'py_client_dsv2' | Select-Object ProcessId, CommandLine
Get-NetTCPConnection -RemoteAddress 8.210.69.51 -ErrorAction SilentlyContinue

The RAT is installed if any of these returns a task, True, a process or a connection. Get-DnsClientCache | Where-Object Entry -like '*c1a2.top' also shows a PC that looked up the download server since its last restart.

Find the installed version:

Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' |
    Where-Object DisplayName -match '^(Q-Dir|DesktopOK)' | Select-Object DisplayName, DisplayVersion

Both programs also come as portable zips, which leave no uninstall entry. Look for Q-Dir*.exe and DesktopOK*.exe wherever your techs keep their tools, and in C:\Users\Public.

Check a downloaded installer with Get-FileHash <file> -Algorithm SHA256 against ASEC’s table and SoftwareOK’s page.

Removing it

  1. Delete the \UPnp\MicrosoftEdge_dcntel task first, so nothing restarts the RAT.
  2. Stop the pythonw.exe running py_client_dsv2.py.
  3. Delete the DeviceSync\b2 folder, and dsv2_py39_agent.7z wherever it landed.
  4. Reinstall Q-Dir or DesktopOK from a download whose SHA-256 matches SoftwareOK’s page, or uninstall it.
  5. From a clean computer, change the passwords used on that PC. The RAT could take screenshots and copy files, so treat anything typed or stored there as seen.

If the RAT was running, ASEC’s advice is to isolate the PC and check whether it fetched anything else.

Doing it with RFF

The RFF Script Library has two new Windows entries. Q-Dir/DesktopOK Supply Chain - Compromise Check looks for the scheduled task, the RAT folder, the running RAT, a connection to its command server, the download domain in the DNS cache, the RAT package, and ASEC’s bad installer hashes in Downloads, Desktop and C:\Users\Public. It reports COMPROMISED for any of those. It reports REVIEW for Q-Dir or DesktopOK at one of the versions above, or a copy running from C:\Users\Public, and lists every copy it finds with its version. Remove Q-Dir/DesktopOK Python RAT does steps 1 to 3 above. It writes the RAT folder’s file list with SHA-256 hashes to C:\ProgramData\RFF first, for your incident notes. It leaves Q-Dir and DesktopOK installed, because the copy the installer starts is the real, signed program.

I tested both on a Windows 11 25H2 lab VM with harmless stand-ins: a renamed cmd.exe as pythonw.exe pinging localhost from the RAT’s path, text files for the script and package, and a hosts file line for the download domain. I didn’t have the real installers, so the hash match is untested. Compare a suspect installer by hand with Get-FileHash before you rely on it. I also didn’t connect the VM to the live command server, so the connection check has only run against a stand-in. My first removal left the domain in the DNS cache, so the check still said COMPROMISED afterwards. The removal now flushes the cache when it finds the RAT.

Start free and you can run the check on every Windows PC at once.

RFF is free for your first 100 endpoints: getrff.com.

Sources

One email per new post, nothing else. Unsubscribe in one click. Or use the RSS feed.

Comments

Comments use GitHub Discussions, so you'll need a GitHub account to post. Corrections are especially welcome.