Q-Dir Malware: Microsoft Finds a Second, Native Backdoor

By 12 min read
Q-Dir malware: Microsoft report on a second native backdoor in the SoftwareOK supply chain attack

The Q-Dir malware did not stop at one backdoor. Microsoft says the Python trojan hidden in tampered Q-Dir and DesktopOK installers was later used to start a second, native Windows backdoor that loads plugins in memory, and that the operators searched infected PCs for AI and machine-learning tools.

In short: Q-Dir and DesktopOK are free file-manager and desktop-layout utilities from the developer SoftwareOK, and some of their official installers and updaters were swapped for versions that install a remote access trojan (RAT). The attack was first reported publicly in mid-November 2026 and confirmed by AhnLab ASEC on 26 November. The new development, published by Microsoft Threat Intelligence on 2 December 2026, is the second backdoor, which survives even if you clean up the first.

What is new in Microsoft’s Q-Dir malware report?

Microsoft’s report adds a second stage that earlier coverage did not describe. ASEC’s 26 November post, which this site covered in the original Q-Dir and DesktopOK supply chain attack breakdown, described a Python RAT with a scheduled task and one command server. Microsoft’s analysis, titled “Unpacking the SoftwareOK attack chain: A Python RAT and native backdoor”, shows that the RAT was a foothold for more.

The new findings fall into four groups:

  • A native backdoor. After the Python RAT was active, PowerShell launched winhost.exe from C:\Temp and backgroundTask.exe from C:\Users\Public. Both talk to their own command servers, separate from the Python agent.
  • A plugin system. The native backdoor runs plugins inside short-lived child processes whose names begin with KKKD.PluginHost, and passes them work over named pipes.
  • An AI software census. A PowerShell task searched Python’s site-packages folders for AI and machine-learning libraries.
  • Defender tooling. Microsoft published 28 SHA-256 hashes, seven IP addresses, two domains, five advanced hunting queries and its Defender detection names.
Eight-stage chain from a tampered SoftwareOK installer to the Python RAT and a native plugin backdoor
The tampered installer is only the start: the Python RAT later hands off to a native backdoor. Data: Microsoft Threat Intelligence.

When was the SoftwareOK attack first reported?

The compromise itself is not new; the second backdoor is. The Hacker News, in its 27 November report, credits Bert de Jong of HOB ICT Security with flagging a suspicious Q-Dir 12.83 installer on 12 November, and researcher SecurityAura with noting Microsoft Defender alerts on Q-Dir_AutoUpdate.exe from 9 November. ASEC published its confirmation on 26 November, and BleepingComputer followed on 28 November.

Microsoft’s own report says its threat intelligence team had been investigating the compromise “as of November 9, 2026”. The full write-up with the native backdoor went live on 2 December 2026, and The Hacker News updated its story with the new findings.

Timeline of the SoftwareOK Q-Dir compromise from first Defender alerts to Microsoft's report
Three weeks passed between the first Defender alerts and the public description of the second backdoor. Data: Microsoft, AhnLab ASEC, The Hacker News, BleepingComputer.

How did the tampered installers reach Windows PCs?

The installers came from SoftwareOK’s official download and update channel, according to Microsoft. That is what makes this a software supply chain attack: an attacker compromises something trusted upstream so that the trusted source delivers the malware.

Microsoft lists several routes the bad files took:

  • Package managers. Microsoft saw execution after a package-manager update to Q-Dir 12.83.0.
  • The built-in updater. An older, clean Q-Dir install launched its updater, which fetched the tampered build.
  • Portable copies. People keep these tools in synced folders, code repositories and file shares, where the tampered copy spread further.
  • Managed deployment. Where IT pushed the utilities silently, the malware installed silently too.

ASEC lists the confirmed tampered builds as 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. Microsoft adds a warning that matters for hunting: the same tampered Q-Dir binary shows up as Q-Dir_Installer_x64.exe, Q-Dir.exe and Q-Dir_Autoupdate.exe, so match by hash, not by name.

Why the signature did not help

The program the installer launched was the genuine utility, with a valid signature from developer Nenad Hrg according to ASEC. Microsoft stresses that a publisher signature on the embedded utility does not authenticate the outer installer that actually ran. Checking the signature of the app you see is not the same as checking the file you executed.

What does the DeviceSync Python RAT do?

DeviceSync is the name Microsoft uses for the malicious Python package. The RAT itself reports its name as VmBaseTool 5.17.6. It ships with its own 64-bit Python 3.9 runtime, so it runs on PCs where Python was never installed.

Installation and persistence

The installer downloads 7zr.exe, the small official 7-Zip extractor, and a .7z archive holding the runtime and scripts. Microsoft says the downloader tries an IP address first and falls back to a domain, resumes broken transfers and can replace an older copy of the agent.

Persistence means the way malware survives a reboot. Here there are two mechanisms: a current-user Run registry value named DeviceSyncUpdate_b2 and a scheduled task named \UPnp\MicrosoftEdge_dcntel. Both relaunch the Python interpreter at sign-in.

Microsoft describes two package variants. The b2 variant runs py_client_b2_dll.py through python.exe; the dsv2 variant runs py_client_dsv2.py through pythonw.exe, which has no console window.

Command and control

Command and control (C2) is the channel an attacker uses to send orders to infected machines. DeviceSync uses an unencrypted WebSocket (ws://) connection to 8.210.69[.]51 on TCP port 9876, with AES-GCM encryption applied to the messages inside it. Microsoft also saw connections to port 9092 on the same address. Both variants listen locally on 127.0.0.1:3660, which Microsoft describes as a health check rather than external C2.

On first contact the RAT sends its version, authentication data, OS details, account and computer names, local IP and interpreter path. The server answers with a token for a second command connection.

Capabilities in the code

Microsoft lists functions for running cmd.exe commands, running extra Python code, browsing, reading, writing and deleting files, chunked file transfer, URL downloads, JPEG screenshots, relaying TCP and UDP traffic to a host the operator chooses, transfers to MinIO object storage and an inventory of security products. Microsoft notes that the presence of a function in the code does not prove the operators used it.

Why did the attackers search for AI tools?

Nobody knows, and Microsoft does not guess. What it observed was a PowerShell task, started by the RAT, that searched Python site-packages folders for five libraries: ollama and vllm, which run language models locally; langchain and llama_index, frameworks for building AI applications; and mlflow, a tool for managing machine-learning workflows.

Microsoft is careful here: the command inventoried installed software and “does not establish collection of models or training data”. It is still a useful signal for prioritising: a workstation that runs local AI tooling is often a developer machine that also holds API keys, model files and source code. This site has covered other campaigns aimed at the same people, including malicious GGUF model files on Hugging Face and the Microsoft Agent Framework PyPI attack.

Other reconnaissance Microsoft saw was routine: ver, whoami /groups, ipconfig /all and a check for the ToDesk remote desktop process. Microsoft describes the ToDesk check as discovery, not as the way in.

How does the second, native backdoor work?

The native backdoor is a compiled Windows program family, not Python, and it is the part most likely to be missed by anyone who cleaned up using the earlier ASEC indicators.

The launchers

PowerShell started two launchers after the Python RAT was running: C:\Temp\winhost.exe and C:\Users\Public\backgroundTask.exe. Microsoft also saw C:\Users\Public\backgroundTaskHost.exe written to disk but does not describe its role. The launchers resolve the Windows functions they need at run time, copy an embedded payload into memory, mark that memory executable and run it in a thread inside their own process. Running code this way leaves less on disk for scanners to find.

Separate command servers

winhost.exe connected to 8.210.203[.]136 on port 443 from several devices over several days. backgroundTask.exe connected to 47.239.64[.]37 on TCP ports 7006 and 7007, and to 8.210.20[.]147 on port 443. Microsoft lists 47.238.130[.]37:443 as a further campaign command server. None of these is the Python RAT’s server, so blocking 8.210.69[.]51 alone does not cut the operators off.

The KKKD plugin host

The design separates the network connection from the work. The main process holds the C2 connection. For each task it starts a short-lived child process whose name begins with KKKD.PluginHost, and the two exchange the plugin module, the command and the result over a named pipe, a Windows channel that lets two local processes pass data. The child maps the module into its own memory, resolves its imports and calls an exported function named Plugin_Execute.

Six steps showing how the native backdoor passes plugins to a KKKD.PluginHost child over a named pipe
The parent keeps the C2 link while disposable child processes run each plugin in memory. Data: Microsoft Threat Intelligence.

Microsoft saw two plugins in use:

Plugin What Microsoft observed Why it matters
plugin-1001 cmd.exe runs curl.exe and nslookup.exe to learn the public IPv4 address, with the marker __KKKD_PUBIP__ Tells the operator where the victim sits on the internet
plugin-1009 Repeated worker launches with the argument master#plugin-1009 and dynamically named pipes Shows the plugin framework in active use; purpose not established

Microsoft says the purpose of other, unidentified plugins is not known.

How does Microsoft’s report compare with ASEC’s?

The two reports describe the same campaign from different vantage points. ASEC focused on the installer and the first-stage RAT; Microsoft had telemetry from infected Defender customers and saw what happened next.

Question AhnLab ASEC, 26 Nov Microsoft, 2 Dec
Delivery Tampered installers on the official site; updates affected Same, plus package managers, portable copies and managed deployment
First-stage RAT Python RAT with own runtime, scheduled task Named DeviceSync / VmBaseTool 5.17.6, plus a Run registry value and two variants
Second stage Not described Native backdoor with in-memory plugins
C2 servers 8.210.69[.]51:9876 Seven IPs across ports 443, 7006, 7007, 9092 and 9876
Post-compromise activity Security product census of 1,206 process names Recon, AI package search, handoff to native backdoor
Attribution None; notes Chinese-language code comments None; no named threat actor

For a different example of a utility vendor’s distribution channel being abused, see the AOMEI Backupper supply chain attack.

Who is affected and how do you check exposure?

Anyone who installed or updated Q-Dir or DesktopOK during the compromise window may be affected, including through a package manager or a portable copy on a shared drive. Microsoft does not give a victim count, sectors or countries.

Quick exposure checks on a Windows PC:

  1. Look for C:\ProgramData\Microsoft\DeviceSync\b2 and any py39 folder inside it.
  2. Check HKCU\Software\Microsoft\Windows\CurrentVersion\Run for a value named DeviceSyncUpdate_b2.
  3. Check Task Scheduler for \UPnp\MicrosoftEdge_dcntel.
  4. Look for C:\Temp\winhost.exe, C:\Users\Public\backgroundTask.exe and C:\Users\Public\backgroundTaskHost.exe.
  5. Hash every Q-Dir and DesktopOK installer, updater and portable copy you hold and compare with Microsoft’s and ASEC’s lists.

If you find only the Python components, do not assume the native backdoor is absent. Check for it on its own.

How do you detect the Q-Dir malware and its second backdoor?

Microsoft’s five advanced hunting queries cover the whole chain with a 30-day lookback. Their logic carries over to any EDR or Sysmon setup.

Behaviour Log source ATT&CK technique
python.exe or pythonw.exe running py_client_b2_dll.py or py_client_dsv2.py from DeviceSync\b2\py39 Process creation (Sysmon 1, EDR) T1059.006 Python
Run value DeviceSyncUpdate_b2 or task MicrosoftEdge_dcntel created Registry (Sysmon 13), Task Scheduler, Event 4698 T1547.001, T1053.005
cmd or PowerShell child of the staged Python searching site-packages for AI library names Process creation with command line T1518 Software Discovery
Connections to the campaign IPs on 443, 7006, 7007, 9092 or 9876 Firewall, proxy, EDR network events T1071.001 Web Protocols
Process names starting KKKD.PluginHost. with --plugin-host and --pipe arguments Process creation, named pipe events (Sysmon 17, 18) T1559 Inter-Process Communication

Microsoft also maps the campaign to T1195.002 (software supply chain), T1059.001 and T1059.003 (PowerShell and Windows command shell), T1057 (process discovery) and T1105 (ingress tool transfer).

Indicator counts in Microsoft's SoftwareOK report: 28 hashes, 7 IPs, 5 hunting queries
Microsoft published enough indicators to hunt both stages; get the full list from the report. Data: Microsoft Threat Intelligence.

Defender detection names

Microsoft lists Trojan:Python/VmBaseTool.MA!MTB, Trojan:Python/Multiverze!rfn and Trojan:Win64/GlassWorm.DB!MTB, .DC!MTB and .DD!MTB, plus behavioural alerts such as “Possible initial access from an emerging threat” and suspicious scheduled task activity. The report does not explain the GlassWorm label or tie the campaign to anything else by that name.

Network indicators to block and search for include the staging domain mail.c1a2[.]top, the associated domain cloudfronts[.]top and the IP addresses above. Take the 28 file hashes from Microsoft’s report rather than from a copy.

What should defenders do now?

Microsoft’s guidance, in priority order:

  1. Pull the bad files everywhere. Remove affected installers and portable copies from file shares, mirrors, package-manager caches and synced folders. Validate any replacement against a separately trusted release, and check the outer file, not only the utility inside it.
  2. Hunt across the fleet. Run the five queries or their equivalents, and search network logs for the seven IPs.
  3. Isolate confirmed hosts. Preserve the installer hash, process tree, task definition, Run value data and network connections before cleaning.
  4. Remove both backdoors. Delete the Python package, Run value and task, then remove the native launchers and plugin workers separately. Reinstalling the utility does not help. Rebuild from a trusted image if you cannot establish integrity.
  5. Rotate credentials. Where exposure is established, revoke sessions and rotate credentials the affected user could reach, working from a clean system. Developer machines with AI tooling deserve extra attention for API keys.
  6. Verify before release. Restart under supervision and confirm no interpreter, plugin worker or command-server connection comes back.
  7. Limit portable runtimes. Use App Control for Business, or a similar allowlisting tool, to block unapproved installers and interpreters in writable folders. Microsoft notes this does not enforce script policy inside third-party Python hosts.

What is still unknown?

  • How the installers were modified. Microsoft calls the upstream mechanism unconfirmed and says compromise of a package manager, deployment service or storage has not been established.
  • Who did it. No threat actor is named by Microsoft or ASEC.
  • How many victims. Neither report gives a number, sector or country.
  • What the plugins were for. Only two of the native plugins are described.
  • Why the AI search. Microsoft records the inventory but no collection and no motive.
  • What SoftwareOK says. As of 2 December, the news page on softwareok.com showed new Q-Dir and DesktopOK releases but no notice about the compromise, and BleepingComputer reported no response from the developer at publication.

The bottom line

Microsoft’s report turns the Q-Dir malware from a one-stage RAT into a two-stage intrusion: the Python agent was the door, and a native, plugin-based backdoor was what the operators brought in next. Anyone who cleaned up using the November indicators should hunt again for winhost.exe, backgroundTask.exe and KKKD.PluginHost processes, and treat developer machines with local AI tools as the most interesting targets on the network.

Sources

This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.

Frequently asked questions

What is the Q-Dir malware?

It is malware delivered through tampered installers and updaters of Q-Dir and DesktopOK, two free Windows utilities from SoftwareOK. The installer opens the real program while it quietly installs a Python remote access trojan, which Microsoft says was later used to launch a second native backdoor.

What did Microsoft add to the Q-Dir DesktopOK story?

Microsoft's 2 December 2026 report describes a second backdoor, launched by PowerShell as winhost.exe or backgroundTask.exe, that loads plugins in memory through a child process named KKKD.PluginHost. It also published 28 file hashes, seven IP addresses and five Defender hunting queries.

Is DeviceSync a virus?

In this campaign DeviceSync is the name of the malicious Python package installed under C:\ProgramData\Microsoft\DeviceSync\b2. It is not a legitimate Windows component, even though the folder name sounds like one.

Does uninstalling Q-Dir remove the malware?

No. Microsoft says closing, replacing or reinstalling the utility removes neither the Python RAT nor the native backdoor. Each has to be found and removed, or the machine rebuilt from a trusted image.

Why did the Q-Dir attackers search for AI tools?

Microsoft observed a PowerShell task that listed Python packages such as ollama, vllm, langchain, llama_index and mlflow. It says the command only inventoried software and does not show that models or training data were collected, and it gives no motive.

Who is behind the SoftwareOK supply chain attack?

Nobody has been named. Microsoft says it has not attributed the activity to a named threat actor, and it says the way the official installers were modified is still unconfirmed.

Which Q-Dir and DesktopOK versions are affected?

AhnLab ASEC confirmed tampered 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. Microsoft says to match files by hash, because the same tampered binary appears under several file names.

What is GlassWorm in the Defender detections?

Three Microsoft Defender detection names for this campaign contain the word GlassWorm. Microsoft's report does not explain the name or link the campaign to any other GlassWorm activity, so do not read an attribution into it.

Keep reading

Q-Dir malwareSoftwareOKDesktopOKDeviceSyncsupply chain attackMicrosoft Threat Intelligencethreat hunting