Nine malicious extensions on Microsoft’s Visual Studio Code Marketplace have been discovered by ExtensionTotal researcher Yuval Ronen. These extensions, posing as legitimate development tools, infect users with the XMRig cryptominer to mine Ethereum and Monero. Since being published on April 4, 2025, the extensions have amassed over 300,000 installs, with artificial installation counts inflating their perceived legitimacy. The extensions were primarily designed to target users of the popular VSCode code editor.
Once installed, the malicious extensions execute a PowerShell script fetched from an external source. This script performs multiple functions to ensure the persistence and stealth of the attack. It disables critical Windows services like Windows Update, evades detection by adding the malware’s working directory to Windows Defender’s exclusion list, and creates a scheduled task to ensure the malware runs at startup.
The malware eventually decodes a base64-encoded executable and connects to a secondary server to download and run XMRig, a cryptocurrency miner.
To evade detection and escalate privileges, the script mimics system binaries and performs DLL hijacking. The malicious extensions impersonated several legitimate development tools, including popular ones like Discord Rich Presence, Golang Compiler, and Solidity Compiler. This tactic helped deceive users into installing them, believing they were safe tools to enhance their coding experience.
The attack demonstrates how cybercriminals exploit trusted platforms like VSCode Marketplace to distribute malware.
Microsoft has since removed the malicious extensions and blocked the publisher responsible for the attack. Users who installed these extensions are advised to manually remove the cryptominer, scheduled tasks, registry entries, and malware directories from their systems. Microsoft has confirmed that no further action is required from users who have updated their systems. The situation highlights the importance of vigilance when downloading third-party tools from marketplaces.