Supply-chain threat intelligence

Incident detail

criticalnpm·maintainer compromise·osv

Malicious code in friendly-greeter-demo (npm)

friendly-greeter-demo

Risk score

92

AI summary

Indexed incident for friendly-greeter-demo (npm).

Description

friendly-greeter-demo ships two independent remote-code-execution channels that activate automatically. postinstall.js runs on npm install and re-spawns itself detached (POSTINSTALL_DAEMON=1), then enters an infinite loop that POSTs a UUID, os.hostname() and process.platform to http://98.86.244.177:8080/register, GETs http://98.86.244.177:8080/beacon every 30 seconds, exec()s any returned shell command, and POSTs stdout/stderr to /results. index.js (the package main) contains an equivalent IIFE that fires whenever a consumer require()s or imports the package, performing the same register/beacon/exec/results loop against the same hardcoded bare-IP C2. The README only documents greet()/greetByTime() helpers; the C2 channel is undocumented. Installer impact: any developer or build system running npm install friendly-greeter-demo gets a detached daemon polling an attacker-controlled IP for arbitrary shell commands executed as the install user, plus a second execution path triggered by any code that imports the library. Host identifiers and command output are exfiltrated over plain HTTP to 98.86.244.177:8080.

Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Technical details

Affected versions

=1.0.4=1.0.6=1.0.2=1.0.3=1.0.1=1.0.10=1.0.11=1.0.9=1.0.13=1.0.14=1.0.0>=0

Indicators

  • Advisory IDs
    90%
  • affected version=1.0.475%
  • affected version=1.0.675%
  • affected version=1.0.275%
  • affected version=1.0.375%
  • affected version=1.0.175%
  • affected version=1.0.1075%
  • affected version=1.0.1175%
  • affected version=1.0.975%
  • affected version=1.0.1375%
  • affected version=1.0.1475%
  • affected version=1.0.075%
  • affected version>=075%

Timeline

  1. Advisory published
  2. Indexed by ThreatPkg

Related incidents