Mitigating the SoftwareOK Supply Chain Backdoor Attack
Attackers have compromised SoftwareOK installer and updater channels to distribute Python-based RATs and native backdoors. Learn how to identify, contain, and remediate this supply chain threat.
TL;DR
- Compromise: Trojanised installers for Q-Dir and DesktopOK utilities are deploying a multi-stage backdoor.
- Impact: Attackers gain remote shell access via a Python-based RAT (DeviceSync) and a native secondary backdoor capable of plugin execution.
- Persistence: The malware survives utility uninstallation via independent Windows Registry Run keys and scheduled tasks.
- Detection: Monitor for non-TLS WebSocket traffic on ports 9876 and 9092, and scan for
C:\ProgramData\Microsoft\DeviceSync. - Action: Isolate affected hosts, remove independent persistence mechanisms, and validate software distribution channels against verified upstream hashes.
Software supply chain integrity faces a significant challenge following the discovery of tampered installers for Q-Dir and DesktopOK utilities. Developed by SoftwareOK, these tools were distributed through official channels containing malicious payloads that operate independently of the primary applications. Microsoft Threat Intelligence identified that threat actors modified these installers to deploy a Python-based Remote Access Trojan (RAT), known as DeviceSync, alongside a native secondary backdoor. This compromise allows attackers to maintain persistence, perform reconnaissance on developer environments—specifically targeting artificial intelligence (AI) and machine-learning (ML) toolsets—and execute arbitrary plugins. Crucially, the malicious components are not tied to the lifecycle of the Q-Dir or DesktopOK utilities; simply uninstalling the target software leaves the backdoor fully functional on the infected endpoint.
Anatomy of a Supply Chain Compromise
The attack employs a sophisticated "wrapper" strategy where a trojanised installer functions as a delivery vehicle for malicious payloads while simultaneously executing the legitimate utility. Users and automated update systems remain unaware of the compromise because the host application exhibits its expected behaviour. The malicious installer logic remains distinct from the utility itself, often retrieved through automated update routines or manual execution of installer binaries like Q-Dir_Autoupdate.exe. Execution paths are diverse, ranging from direct user interaction with downloaded installers to automated deployments via package managers or synchronised network shares. Because the outer installer possesses its own execution logic, the legitimate publisher signature on the embedded Q-Dir or DesktopOK binaries provides a false sense of security. The infection occurs at the installer level, meaning standard file-integrity checks that only validate the utility binary will fail to detect the threat.
Stage 1: The Python-Based Remote Access Trojan
Upon execution, the installer deploys a self-contained Python 3.9 runtime, ensuring the backdoor remains independent of any Python environment already present on the host. This runtime, bundled with scripts identified as VmBaseTool 5.17.6, is extracted to C:\ProgramData\Microsoft\DeviceSync\. This directory serves as the base for the Python-based RAT, which achieves persistence through two primary methods:
- Registry Run Keys: A current-user Run value,
DeviceSyncUpdate_b2, ensures the interpreter restarts upon user sign-in. - Scheduled Tasks: The task
\UPnp\MicrosoftEdge_dcntelmaintains systemic persistence, ensuring the agent remains active even if the user logs out.
Communication between the DeviceSync agent and its command-and-control (C2) infrastructure occurs over non-TLS WebSocket connections on TCP ports 9876 and 9092. While the application-layer messages are encrypted using Advanced Encryption Standard in Galois/Counter Mode (AES-GCM), the transport lacks TLS encapsulation, making the raw traffic patterns identifiable through network monitoring.
Stage 2: Operational Reconnaissance and Native Escalation
The Python RAT serves as a foundation for broader system compromise. Beyond file operations and screen capture, operators leverage the agent for reconnaissance. Specifically, PowerShell scripts are invoked to identify locally installed AI and ML development tools, such as Ollama, vLLM, LangChain, and MLflow. Once established, the attackers may transition to a native backdoor, such as winhost.exe or backgroundTask.exe. Unlike the Python-based agent, these native payloads resolve Windows APIs at runtime and inject code into memory to evade signature-based detection. These native components support plugin execution through a local named-pipe architecture:
- The main backdoor process manages the C2 connection.
- Native plugins are loaded into a short-lived child process (often prefixed with
KKKD.PluginHost). - Data, modules, and execution commands are exchanged over the named pipe, effectively decoupling the C2 logic from the plugin's functional payload.
Persistence Independence
Standard uninstallation of Q-Dir or DesktopOK does not remove the DeviceSync RAT or the native backdoors. If your remediation plan relies on the "Add/Remove Programs" workflow, the environment remains compromised.
Detection Strategies for System Administrators
Effective detection requires a shift from binary-based inspection to behavioral and network telemetry analysis. Given the reliance on independent persistence, focus your efforts on process lineage and network egress:
# Search for common DeviceSync installation paths
dir C:\ProgramData\Microsoft\DeviceSync\ /s /b
# Identify unauthorized TCP connections to specific C2 ports
Get-NetTCPConnection -RemotePort 9876, 9092 | Select-Object LocalAddress, RemoteAddress, OwningProcess
# Look for suspicious scheduled tasks or Run keys
Get-ScheduledTask | Where-Object {$_.TaskPath -eq "\UPnp\"}
Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run | Select-Object DeviceSyncUpdate_b2
Monitor for PowerShell execution chains originating from non-administrative contexts that query site-packages or local library paths. Furthermore, any instance of python.exe or pythonw.exe spawning from C:\ProgramData\ should be treated as high-fidelity evidence of compromise.
Containment and Remediation Workflow
Remediation must be performed out-of-band to prevent the backdoor from detecting incident response activity.
- Isolate: Immediately restrict network access for suspected endpoints. The RAT is capable of relaying traffic; an infected host may act as a pivot point.
- Terminate: Kill all processes associated with the
DeviceSyncdirectory and the identified native backdoors (e.g.,winhost.exe). - Purge Persistence: Remove the identified scheduled tasks and registry keys. Manual inspection of
HKCUandHKLMRun keys is necessary. - Verify Integrity: Delete the
C:\ProgramData\Microsoft\DeviceSyncdirectory and any related.7zor7zr.exefiles.
Verify remediation by monitoring for re-establishment of WebSocket traffic to the known C2 IP addresses. If integrity cannot be guaranteed, the host should be re-imaged from a trusted baseline.
Strengthening Supply Chain Integrity
This event highlights the dangers of relying on third-party utilities without rigorous governance.
- Application Control: Implement App Control for Business (formerly Windows Defender Application Control) to restrict the execution of binaries and interpreters in writable directories like
ProgramData. - Distribution Security: Centralise software distribution. Avoid allowing clients to pull updates directly from vendors if those updates can be intercepted or if the vendor's distribution mechanism is untrusted. Validate all packages against known good hashes before pushing to endpoints.
- Behavioural Baselines: Move away from static hash-based detection. Modern backdoors often use runtime obfuscation and memory-only execution that bypasses traditional anti-malware signatures. EDR solutions should be configured to alert on anomalous named-pipe communication and process injection patterns.
Frequently asked questions
If I uninstall Q-Dir, is the device still compromised?
No, uninstalling the primary utility is ineffective. The malware operates as an independent service and persistence layer. The Python RAT and native backdoors are deployed to system-level directories and configured to restart via persistent Registry keys or Scheduled Tasks. Deleting the host utility removes only the legitimate software, leaving the malicious persistence mechanisms and backdoors fully operational.
Does this attack affect my cloud infrastructure?
The compromise specifically targets Windows endpoints running these utilities. However, if your cloud infrastructure is managed via workstations where these utilities are installed, those devices are at risk. Attackers often use compromised workstations to steal session tokens, API keys, or credentials stored locally by developers, which can then be used to pivot into your cloud environment.
Can I rely on file signatures to detect this?
No, file signatures are insufficient for detection. The attackers have wrapped legitimate, signed utilities within trojanised installers. While the Q-Dir or DesktopOK binary may carry a valid signature, the wrapper itself and the secondary payloads (Python scripts and native backdoors) are distinct. Relying solely on the presence of a "trusted" signature on the main executable will provide a false sense of security while the malicious components run in the background.
Why were AI and ML tools targeted?
Attackers are performing targeted reconnaissance on developer workstations to identify the existence of proprietary models, training data, or development frameworks. By cataloguing tools like Ollama or LangChain, the attackers can identify high-value targets for intellectual property theft or lateral movement into deeper development pipelines. The focus on these tools suggests an objective beyond standard credential theft, aiming instead for the exfiltration of sensitive AI assets.
Related reading on ITSTCK
- Critical Flaws in OFFIS DCMTK Threaten Medical Data Integrity
- Mitigating Active Exploitation: CVE-2026-61500 and CVE-2026-125160
- Java4Shell RCE: Assessing the New OpenJDK Vulnerability
- CVE-2026-131914: RCE Risk in Abandoned Idunno.AntiCsrf
Sources and further reading
- Unpacking the SoftwareOK attack chain: A Python RAT and native backdoor | Microsoft Security Blog Microsoft Security Blog
This analysis was produced by the ITSTCK editorial pipeline with AI assistance, using only the public sources cited above, and passed automated checks for structure, sourcing and CVE accuracy. Verify critical details against the vendor advisory before acting.