Your Yello Ring Road To Success
GOOGLE LOGIN MY ADS MY SHOP

Malicious NPM Packages Caught Running Cryptominer On Windows, Linux, macOS Devices

NPM Package

Three JavaScript libraries uploaded to the official NPM package
repository have been unmasked as crypto-mining malware, once again
demonstrating how open-source software package repositories are
becoming a lucrative target for executing an array of attacks on
Windows, macOS, and Linux systems.

The malicious packages in question — named okhsa[1], klow[2], and klown[3] — were published by the
same developer and falsely claimed to be JavaScript-based
user-agent string parsers designed to extract hardware specifics
from the “User-Agent[4]” HTTP header. But
unbeknownst to the victims who imported them, the author hid
cryptocurrency mining malware inside the libraries.

Automatic GitHub Backups

The bad actor’s NPM account has since been deactivated, and all
the three libraries, each of which were downloaded 112, 4, and 65
times respectively, have been removed from the repository as of
October 15, 2021.

Attacks involving the three libraries worked by detecting the
current operating system, before proceeding to run a .bat (for
Windows) or .sh (for Unix-based OS) script. “These scripts then
download an externally-hosted EXE or a Linux ELF, and execute the
binary with arguments specifying the mining pool to use, the wallet
to mine cryptocurrency for, and the number of CPU threads to
utilize,” Sonatype security researcher Ali ElShakankiry said[5].

NPM Package

This is far from the first time brandjacking[6], typosquatting[7], and cryptomining
malware have been found lurking in software repositories.

Prevent Data Breaches

Earlier this June, Sonatype[8], and JFrog[9]
(formerly Vdoo) identified malicious packages infiltrating the PyPI
repository that secretly deployed crypto-miners on the affected
machines. This is notwithstanding copycat packages[10] named after
repositories or components used internally by high-profile tech
companies in what’s known as dependency confusion[11].

References

  1. ^
    okhsa
    (www.npmjs.com)
  2. ^
    klow
    (www.npmjs.com)
  3. ^
    klown
    (www.npmjs.com)
  4. ^
    User-Agent
    (developer.mozilla.org)
  5. ^
    said
    (blog.sonatype.com)
  6. ^
    brandjacking
    (blog.sonatype.com)
  7. ^
    typosquatting
    (thehackernews.com)
  8. ^
    Sonatype
    (blog.sonatype.com)
  9. ^
    JFrog
    (jfrog.com)
  10. ^
    copycat packages
    (blog.sonatype.com)
  11. ^
    dependency confusion
    (thehackernews.com)

Read more