Another NPM Library Hijacked Again - COA

Description

FortiGuard Labs is aware of another Node Package Manager (NPM) library hijack affecting the coa library. Coa is a parser that is command line based and has not seen any updates to it since 2018. The compromise was discovered today by React developers. They noticed breakages in React packages when new updates were observed and pushed to the NPM library.

Earlier last month, another NPM library ua-parser-js was hacked also, which ultimately delivered the cryptocurrency miner XMRIG. Please see our October 22nd Threat Signal for more information (linked in the Appendix).


What Are the Technical Details of this Attack?

Malicious code exists in the form of an obfuscated JavaScript file that launches a batch file. The batch file will then connect to a predefined site to download a malicious DLL file.


What Malware was Delivered in This Latest Attack?

Preliminary reports have identified DanaBot as the malware. DanaBot is an infostealer.


Is this Related to the Attacks that Occurred in October to NPM (ua-parser-js) As well?

While preliminary evidence suggests they are related, researchers have observed some code reuse in the malicious JavaScript. This suggests that it's possible the same threat actors are behind this attack.


Which Versions of COA Served Malware?

Non legitimate versions 2.0.3, 2.0.4, 2.1.1, 2.1.3, and 3.1.3


Which Version is Deemed Legitimate?

Version 2.02 from 2018 is the only identified official version of this file


What is the Status of Coverage?

FortiGuard Labs provides the following AV coverage against the available files used in the attack:


W32/GenKryptik.FMUS!tr


All Network IOC's related to this threat are blocked by the FortiGuard WebFiltering Client.


What Other Mitigation is Suggested?

Due to the potential impact of the issue, users of the coa library are strongly advised to check if affected machines have been updated to the malicious versions documented above.


Windows systems with compromised versions of coa will receive an infostealer payload. As such, affected Windows users are strongly recommended to change their passwords, keys, and refresh tokens, and perform an anti-virus scan. It is suggested to remove the machine from the network until the identified malware has been removed completely.


As an added precaution, package maintainers should enable Two-Factor Authentication (2FA) to ensure increased security. A link to the instructions on enabling 2FA on npm.js can be found in the APPENDIX.