Threat Actors Using Malicious VSCode Extension to Deploy Anivia Loader and OctoRAT

By Published On: December 4, 2025

Developers are a prime target for threat actors, and their ubiquitous tools are increasingly under attack. A recent supply chain compromise highlights this, with attackers leveraging a malicious Visual Studio Code (VSCode) extension to deploy potent malware like Anivia Loader and OctoRAT. This incident underscores the critical need for vigilance in developer ecosystems and robust supply chain security.

The Malicious VSCode Extension: prettier-vscode-plus

The attack originated with a rogue VSCode extension named prettier-vscode-plus. This extension was meticulously crafted to impersonate the legitimate and widely popular Prettier formatter, a tool essential for maintaining consistent code styling. For a brief period, this deceptive extension was available on the official VSCode Marketplace, a testament to the sophistication of the supply chain attack.

The core of the deception lay in its name and intended functionality, designed to dupe developers into believing they were installing a harmless and beneficial utility. The rapid takedown of the extension from the marketplace by Microsoft’s security teams was a crucial response, yet its mere presence, even for a short duration, was enough to compromise unsuspecting users.

Attack Chain: From Installation to Malware Deployment

Once installed by a developer, the prettier-vscode-plus extension initiated a multi-stage attack. It did not immediately deploy its malicious payload. Instead, it pulled staged scripts from a GitHub repository. This technique, common in advanced persistent threats (APTs), allows attackers to dynamically control the next phases of their compromise and evade initial detection.

The use of a GitHub repository (under the name “vscode”) to host these scripts adds another layer of legitimacy to the attacker’s operations. Developers frequently interact with GitHub, making such a source less suspicious at first glance. These scripts were designed to download and execute additional malware, specifically:

  • Anivia Loader: This is a sophisticated downloader that typically acts as a first-stage component. Its primary role is to establish persistence and then fetch and execute further malicious payloads from command-and-control (C2) servers. Anivia Loader is known for its stealth and ability to evade detection, making it a dangerous initial compromise tool.
  • OctoRAT: A powerful Remote Access Trojan (RAT), OctoRAT grants threat actors extensive control over a compromised system. This includes capabilities such as keylogging, credential theft, file exfiltration, remote command execution, and potentially the deployment of ransomware or other devastating malware.

The combination of Anivia Loader and OctoRAT provides attackers with a robust platform for data exfiltration, espionage, and further lateral movement within a compromised network, posing significant risks to intellectual property and corporate infrastructure.

Supply Chain Attack: A Growing Threat to Developers

This incident is a classic example of a supply chain attack targeting the developer ecosystem. By compromising a trusted tool or platform (in this case, the VSCode Marketplace and a seemingly legitimate extension), threat actors can bypass traditional perimeter defenses and directly infiltrate developer workstations. The implications are severe:

  • Code Tampering: Malicious extensions could theoretically alter code being written or compiled, introducing backdoors or vulnerabilities into legitimate software.
  • Credential Theft: Access to a developer’s environment often means access to sensitive credentials for source code repositories, cloud platforms, and internal systems.
  • Intellectual Property Theft: Developers work with proprietary code, designs, and data, making them high-value targets for IP theft.
  • Broader Compromise: A compromised developer machine can serve as a pivot point for broader network compromise, affecting entire development teams and organizations.

Remediation Actions and Best Practices

Protecting against such sophisticated supply chain attacks requires a multi-layered approach. Developers and organizations must adopt stringent security practices:

  • Exercise Extreme Caution with Extensions: Always scrutinize VSCode extensions, even those from the official marketplace. Check the publisher’s reputation, the number of downloads, reviews, and the last update date. Prefer extensions from well-known and reputable publishers.
  • Principle of Least Privilege: Ensure developer workstations operate with the minimum necessary privileges to perform their tasks.
  • Network Segmentation: Isolate development environments from production networks to limit the blast radius of a potential compromise.
  • Regular Software Updates: Keep VSCode, operating systems, and all development tools updated to patch known vulnerabilities.
  • Endpoint Detection and Response (EDR): Deploy EDR solutions on developer workstations to detect and respond to suspicious activities, such as anomalous process execution or network connections.
  • Threat Intelligence Feeds: Integrate threat intelligence to stay informed about emerging threats targeting development tools and platforms.
  • Static and Dynamic Analysis: Implement secure coding practices, including regular static application security testing (SAST) and dynamic application security testing (DAST) for developed applications.
  • Supply Chain Security Audits: Organizations should regularly audit their software supply chain for vulnerabilities and potential points of compromise.
  • Educate Developers: Provide continuous security awareness training for developers, emphasizing the risks associated with third-party components and social engineering tactics.

Tools for Detection and Mitigation

Tool Name Purpose Link
VS Code Marketplace (Official) Primary source for extensions; review details carefully. https://marketplace.visualstudio.com/vscode
Endpoint Detection and Response (EDR) Solutions Detect and respond to malicious activity on endpoints. (Varies by vendor: CrowdStrike, SentinelOne, Microsoft Defender ATP)
Software Composition Analysis (SCA) Tools Identify vulnerabilities in third-party and open-source components. (Varies by vendor: Snyk, Black Duck, OWASP Dependency-Check)
Network Intrusion Detection/Prevention Systems (IDS/IPS) Monitor network traffic for suspicious patterns and block threats. (Varies by vendor: Snort, Suricata, commercial appliances)
Vulnerability Scanners (for GitHub Repositories) Scan code repositories for known vulnerabilities and secret exposures. (Varies by vendor: GitHub Advanced Security, GitGuardian)

Conclusion

The compromise via the prettier-vscode-plus extension is a stark reminder that no part of the software development lifecycle is immune to attack. Threat actors are continually evolving their tactics, and supply chain attacks targeting trusted development tools represent a significant and growing risk. By implementing robust security measures, fostering a culture of cybersecurity awareness, and leveraging appropriate tooling, organizations can significantly reduce their exposure to such sophisticated threats and protect their critical assets and intellectual property.

Share this article

Leave A Comment