Cybercriminals Use npm Packages for Advanced Phishing Against Critical Infrastructure Personnel

Cybercriminals Exploit npm Packages to Launch Sophisticated Phishing Attacks

In a recent cybersecurity development, researchers have uncovered a targeted spear-phishing campaign leveraging the npm package registry to steal login credentials. Over a span of five months, attackers uploaded 27 malicious packages under six different aliases, aiming primarily at sales and commercial personnel within critical infrastructure sectors across the United States and allied nations.

The Malicious Packages

The identified packages include:

– adril7123
– ardril712
– arrdril712
– androidvoues
– assetslush
– axerification
– erification
– erificatsion
– errification
– eruification
– hgfiuythdjfhgff
– homiersla
– houimlogs22
– iuythdjfghgff
– iuythdjfhgff
– iuythdjfhgffdf
– iuythdjfhgffs
– iuythdjfhgffyg
– jwoiesk11
– modules9382
– onedrive-verification
– sarrdril712
– scriptstierium11
– secure-docs-app
– sync365
– ttetrification
– vampuleerl

Attack Methodology

Unlike traditional attacks that rely on users installing malicious packages, this campaign repurposes npm and associated content delivery networks (CDNs) as hosting platforms. The attackers embed client-side HTML and JavaScript lures within these packages, masquerading as secure document-sharing portals. When victims access these lures, they are redirected to counterfeit Microsoft sign-in pages with their email addresses pre-filled, facilitating credential theft.

Advantages of Using npm and CDNs

By utilizing npm and its CDNs, attackers benefit from:

– Resilience to Takedowns: Legitimate distribution services provide a robust infrastructure that’s challenging to dismantle.
– Operational Flexibility: Even if certain packages are identified and removed, attackers can swiftly introduce new aliases and package names, maintaining their malicious activities.

Evasion Techniques

To enhance the campaign’s stealth, the attackers employ several anti-analysis measures:

– Bot and Sandbox Detection: The malicious code includes checks to identify and evade automated analysis tools.
– User Interaction Requirements: The phishing flow necessitates mouse or touch input, ensuring that only real users proceed to the credential harvesting stage.
– Code Obfuscation: The JavaScript code is heavily minified and obfuscated, complicating efforts to scrutinize its functionality.
– Honeypot Fields: Hidden form fields are used to trap automated crawlers. These fields are invisible to genuine users but are likely to be filled by bots, preventing the attack from advancing further.

Infrastructure Overlap

Analysis reveals that the domains embedded within these packages share similarities with adversary-in-the-middle (AitM) phishing infrastructure associated with Evilginx, an open-source phishing toolkit. This suggests a possible connection or inspiration drawn from known phishing methodologies.

Comparison to Previous Campaigns

This isn’t the first instance of npm being exploited for phishing purposes. In October 2025, a campaign named Beamglea involved the upload of 175 malicious packages aimed at credential harvesting. While both campaigns share core strategies, the current operation distinguishes itself by delivering a comprehensive, browser-executed phishing flow embedded directly within the packages, rather than simple redirect scripts.

Targeted Individuals

The phishing packages are designed to target specific individuals, with 25 hard-coded email addresses belonging to professionals in roles such as account management, sales, and business development. These individuals are associated with sectors including manufacturing, industrial automation, plastics, and healthcare across countries like Austria, Belgium, Canada, France, Germany, Italy, Portugal, Spain, Sweden, Taiwan, Turkey, the U.K., and the U.S. The method by which attackers obtained these email addresses remains unclear.

Implications and Recommendations

This campaign underscores the evolving tactics of cybercriminals who exploit trusted platforms like npm to orchestrate sophisticated phishing attacks. Organizations and individuals are advised to:

– Exercise Caution: Be vigilant when accessing document-sharing portals and verify the authenticity of sign-in pages.
– Monitor npm Packages: Regularly review and audit npm packages for any signs of malicious activity.
– Implement Security Measures: Utilize advanced threat detection tools capable of identifying obfuscated code and unusual behaviors.
– Educate Personnel: Train staff to recognize phishing attempts and report suspicious activities promptly.

By staying informed and proactive, organizations can better defend against such insidious threats that exploit trusted infrastructures for malicious purposes.