Severity: HIGH · Priority: P2 — malicious npm package fetch, investigate on hit
This rule raises an alert when a device on your network downloads the malicious npm package tw-pkgprobe-7731 from a package registry. The package was documented by ReversingLabs in September 2026 and deliberately disguised itself as an authorised security-research tool for Twilio's official bug-bounty programme, to trick Twilio developers into installing it without suspicion. Once installed, it checks whether it is running inside a Twilio developer environment and exits immediately if not — a targeting mechanism that also helps it evade sandbox analysis. In a Twilio environment, it harvests environment variables, credentials, Twilio Account SIDs and Auth Tokens, and AWS instance metadata, and exfiltrates them via webhook. Later versions also scanned the host's installed packages and injected malicious code into existing node_modules directories.
A hit indicates a developer machine on your network is downloading this package — the only moment before its malicious code executes. Treat it as an active installation attempt: block the download immediately if possible, identify the developer and the project, and confirm whether any version of this package was already successfully installed. Because the package harvests Twilio credentials (Account SID and Auth Token) and AWS metadata, treat those as exposed: rotate the Twilio Auth Token and any other credentials or API keys reachable from that developer's environment, from a known-clean system, and check whether any of the harvested credentials have already been used by the attacker. Audit the project's package.json and node_modules for the injected PoC package the malware plants in matching directories.