Hacking

npm libraries coa and rc. have been hijacked to deliver password-stealing malware

Two popular npm libraries, coa and rc., have been hijacked, threat actors replaced them with versions laced with password-stealing malware.

The security team of the npm JavaScript package warns that two popular npm libraries, coa and rc., have been hijacked, threat actors replaced them versions laced with password-stealing malware.

Coa is a command-line argument parser with approximately 9 million weekly downloads, while Rc is a configuration loader with 4 million weekly downloads. Two npm libraries that have a total of 23 million weekly downloads, a data that is worrisome.

Experts warns that compromised coa versions are 2.0.3, 2.0.4, 2.1.1, 2.1.3, 3.0.1, 3.1.3, while compromised rc versions are 1.2.9, 1.3.9, 2.3.9.

The attackers gained access to the account of the developer of the package, then added a post-installation script to the original codebase, which runs an obfuscated TypeScript used to download a Windows batch or Linux bash script depending on the OS of the machine running the software.

TheRecord reported that the Windows batch script would download and run a DLL file containing a version of the Qakbot trojan.

The last stable coa version 2.0.2 was released in December 2018, but developers noticed that several suspicious versions (2.0.3, 2.0.4, 2.1.1, 2.1.3, and 3.1.3) were uploaded on the npm repository in a few hours, triggering errors on React packages that depend on ‘coa’.

The security team of the npm temporarily disabled the compromised account to investigate the incident.

Researchers from Bleeping Computer reported that the malware hidden in the tainted ‘coa’ versions is the same found in the hijacked ua-parser-js versions that were spotted last month. This circumstance suggests the presence of the same threat actor behind the two supply chain attacks.

The investigation allowed for the discovery of the compromise of the race package a few hours later.

The npm security team has removed all the compromised coa and rc versions of the packages.

Follow me on Twitter: @securityaffairs and Facebook

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(SecurityAffairs – hacking, supply chain attack)

[adrotate banner=”5″]

[adrotate banner=”13″]

Both packages were compromised around the same time and were the result of attackers gaining access to a package developer’s account.

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

FBI chief says China is preparing to attack US critical infrastructure

China-linked threat actors are preparing cyber attacks against U.S. critical infrastructure warned FBI Director Christopher…

4 hours ago

United Nations Development Programme (UNDP) investigates data breach

The United Nations Development Programme (UNDP) has initiated an investigation into an alleged ransomware attack…

6 hours ago

FIN7 targeted a large U.S. carmaker with phishing attacks

BlackBerry reported that the financially motivated group FIN7 targeted the IT department of a large…

17 hours ago

Law enforcement operation dismantled phishing-as-a-service platform LabHost

An international law enforcement operation led to the disruption of the prominent phishing-as-a-service platform LabHost.…

22 hours ago

Previously unknown Kapeka backdoor linked to Russian Sandworm APT

Russia-linked APT Sandworm employed a previously undocumented backdoor called Kapeka in attacks against Eastern Europe since…

1 day ago

Cisco warns of a command injection escalation flaw in its IMC. PoC publicly available

Cisco has addressed a high-severity vulnerability in its Integrated Management Controller (IMC) for which publicly…

1 day ago

This website uses cookies.