Compromised Intercom npm Package Steals GitHub Credentials Using Shai-Hulud-Style Attack

· Original article ↗

Summary

Intercom TypeScript Library version 7.0.4 runs an install-time infostealer that harvests GitHub credentials and retrieves C2 instructions through GitHub commit search. Users are advised to check for suspicious activity and rotate credentials.

Key points

  • Version 7.0.4 runs setup.mjs through a preinstall hook, downloads the Bun runtime, and executes a payload.
  • The payload runs `gh auth token` to steal GitHub credentials.
  • It queries zero.masscan.cloud and uses GitHub's public commit-search API to retrieve C2 instructions embedded in commit messages.
  • The malware deletes the downloaded Bun binary after execution to reduce forensic traces.
  • The article says stolen credentials may be used to infect additional npm packages, as in previous Shai-Hulud-style attacks.
  • Users who installed version 7.0.4 should check for suspicious activity and rotate GitHub credentials.

Article Details

Attack Vectors
  • Compromised Intercom TypeScript Library version 7.0.4 runs setup.mjs through a preinstall hook, downloads the Bun runtime, and executes a JavaScript payload that harvests GitHub credentials.
  • The payload uses GitHub's public commit search API and a repository's public commit messages as a dead-drop resolver for C2 instructions.
  • Stolen GitHub credentials are used to infect additional npm packages.
Defensive Notes
  • Users who installed version 7.0.4 should check for suspicious activity and rotate their GitHub credentials.

Indicators of compromise

TypeIndicatorContext
DOMAINzero[.]masscan[.]cloudC2 domain queried by the payload.
URLhxxps[:]//api[.]github[.]com/search/commits?q=beautifulcastle%20&sort=author-date&order=descGitHub commit-search query used as a dead-drop resolver to retrieve C2 instructions.
URLhxxps[:]//api[.]github[.]com/search/commits?q=EveryBoiWeBuildIsAWormyBoi&sort=author-date&order=desc&per_page=50GitHub commit-search query used as a dead-drop resolver to retrieve C2 instructions.
URLhxxps[:]//github[.]com/LuisDepo/sayyadina-heighliner-138Repository whose public commit messages are used to retrieve C2 instructions.

MITRE ATT&CK

Products

Tools

Related Articles