A recent cybersecurity campaign has shed light on a concerning loophole in the Visual Studio Code (VS Code) Marketplace, allowing threat actors to exploit removed extension names for malicious purposes. The campaign, involving extensions named “shiba,” delivered ransomware through a multi-stage attack.
Researchers at ReversingLabs discovered that one of the malicious extensions, ahbanC.shiba, acted as a simple downloader. Upon installation, it executed a command to retrieve a second payload from a remote server. This payload encrypted files in a test folder and demanded ransom in the form of one Shiba Inu token, an Ethereum-based cryptocurrency. Notably, no payment details were provided, similar to previous malware incidents in the Python Package Index.
The reuse of removed extension names on the VS Code Marketplace contradicts the platform’s guidelines, which require unique extension names. This loophole stems from how VS Code handles extension removal – unpublished extensions retain their names, while removed extensions make their names available for reuse. This flaw allowed attackers to republish malicious code under names associated with previously deleted extensions.
The shiba campaign showcased a recurring use of this tactic over several months, indicating a broader trend of criminals leveraging public repositories for malware delivery. While the campaign may not be linked to known ransomware groups, the strategy aligns with criminal interests in exploiting software supply chains.
ReversingLabs highlighted several key takeaways from their investigation:
– Removed extension names can be freely reused, enabling malicious impersonation.
– Developers should exercise caution when adding Marketplace packages to their projects.
– The VS Code Marketplace is increasingly targeted by malicious actors, necessitating heightened security measures.
As of now, there is no public information regarding Microsoft’s response to address the issue of publishers reusing extension names after removal. This discovery underscores the importance of maintaining vigilance and implementing robust security practices when utilizing third-party software extensions.
