HomeCyber BalkansAxios NPM Packages Compromised in Ongoing Supply Chain Attack

Axios NPM Packages Compromised in Ongoing Supply Chain Attack

Published on

spot_img

A severe supply chain attack has recently compromised the widely utilized Axios HTTP client available on the npm registry, raising serious concerns among developers worldwide. Axios, a prominent library for making HTTP requests in JavaScript, is foundational for many web applications. The attack highlights the vulnerabilities present in software dependencies, underscoring the importance of secure coding practices and vigilant monitoring.

The malicious operation involved attackers injecting a harmful dependency into specific releases of the Axios library, specifically versions 1.14.1 and 0.30.4. These versions were uploaded directly to the npm registry without any associated GitHub tags, signaling a significant deviation from established protocols. As a result, millions of developers were unwittingly exposed to a multi-stage remote access trojan (RAT), which has the capability to execute arbitrary commands on compromised systems and extract sensitive data.

The incident escalated when Axios maintainers discovered they were unable to revoke access to the compromised dependencies. This failure occurred because the attacker had acquired permissions that exceeded those of the legitimate maintainers, pointing to a severe security lapse. The malicious code, referred to as [email protected], was strategically released just moments before the tainted Axios versions appeared, employing a caret range update. This clever maneuver allowed the compromised code to be pulled in automatically during new installations, thereby ensuring widespread dissemination of the attack.

According to cybersecurity experts at Socket, the execution of the attack begins automatically during the installation phase of the npm package. A postinstall lifecycle hook triggers a dropper script known as setup.js. In order to evade detection by both static analysis tools and signature-based detection systems, the attackers employed a custom two-layer obfuscation technique. Through this method, Base64 encoded strings were reversed, and a specialized XOR cipher, utilizing a hardcoded key, was applied to conceal the script’s true intentions.

Once the malicious code has been deciphered, it identifies the host operating system and subsequently contacts a command-and-control server managed by the attacker. This facilitates the retrieval of subsequent payloads tailored to exploit the specific vulnerabilities of the victim’s operating system. On macOS, for instance, the malware utilizes AppleScript to download a C++ Mach-O RAT that masquerades as a legitimate Apple background process, storing itself in a misrepresented system cache directory. This trojan possesses the ability to fingerprint the system, generate unique victim identifiers, and even utilize a specialized peinject command to sign and execute additional malicious binaries.

In the case of Windows systems, the malware disguises PowerShell as the Windows Terminal to circumvent endpoint detection tools, subsequently executing a concealed VBScript that downloads the final payload while bypassing standard execution policies. For Linux systems, the infiltrator employs a detached Python script that runs silently in the background, further obscuring its presence. Each variant of the malware communicates with the command-and-control server through deceptive HTTP POST requests crafted to mimic normal registry traffic, thereby facilitating continued operation undetected.

To compound the threat, once the payload has been executed, the malware methodically eliminates traces of its presence, thus covering its tracks. It automatically deletes the initial setup.js dropper script and the malicious package.json configuration file, effectively erasing evidence of the attack. Furthermore, in a clever maneuver to avoid detection, the malware renames a benign markdown file to take the place of the deleted configuration, causing the installed directory to appear as an innocuous cryptography library devoid of any remaining malicious code.

This attack serves as a stark reminder of the complexities and challenges posed by supply chain vulnerabilities in software development. With millions of developers relying on npm packages like Axios, the ramifications of such security breaches can be extensive. It is critical for maintainers to conduct regular security audits and for developers to exercise caution when adding dependencies to their projects. As the cybersecurity landscape evolves, so too must the strategies employed to safeguard intellectual property and sensitive data from nefarious actors.

Source link

Latest articles

Anthropic Employee Error Reveals Claude Source Code

Hardening Build Environments: A Call to Action for Developers In the ever-evolving landscape of software...

AI SOC Firm Tenex Secures $250M for Accelerated Response Solutions

Tenex Secures $250 Million in Funding to Transform Cybersecurity Response Times By Michael Novinson March 31,...

TeamPCP Investigates Methods to Capitalize on Stolen Supply Chain Secrets

Increased Threats: The Dangerous Convergence of Cyber Attackers and Extortion Gangs Recent findings from researchers...

Pentagon’s Zero Trust Initiative Confronts a 2027 Reality Check

Analysts Raise Concerns Over Pentagon’s Future with Zero Trust Security Goals The U.S. Department of...

More like this

Anthropic Employee Error Reveals Claude Source Code

Hardening Build Environments: A Call to Action for Developers In the ever-evolving landscape of software...

AI SOC Firm Tenex Secures $250M for Accelerated Response Solutions

Tenex Secures $250 Million in Funding to Transform Cybersecurity Response Times By Michael Novinson March 31,...

TeamPCP Investigates Methods to Capitalize on Stolen Supply Chain Secrets

Increased Threats: The Dangerous Convergence of Cyber Attackers and Extortion Gangs Recent findings from researchers...