CrowdStrike identified PhantomRaven, a JavaScript information stealer distributed through malicious npm packages and likely written with help from a large language model, with the operator posing as a bug bounty hunter to target organizations and potential rewards. The campaign used typosquatted packages, attacker-controlled domains, and automated exfiltration of system and CI/CD data, while CrowdStrike also linked the activity to accounts and infrastructure tied to the threat actor. #PhantomRaven #npm #Bugcrowd #Intigriti #YesWeHack #HackerOne #HackenProof
Keypoints
- PhantomRaven is a JavaScript-based information stealer distributed through malicious npm packages.
- CrowdStrike assessed with high confidence that the malware code was likely generated with a large language model.
- The threat actor posed as a bug bounty hunter and contacted a victim organization in an apparent attempt to claim a compromised device.
- Malicious npm packages such as transform-jsbi-to-bigint and sort-imports-es6-autofix were used to deliver the payload.
- The malware collected system details, credentials-related data, and CI/CD environment variables from GitHub Actions, GitLab CI, Jenkins, and CircleCI.
- PhantomRaven exfiltrated data through HTTP GET and POST requests, with a fallback WebSocket channel included in the code.
- CrowdStrike linked the activity to attacker-controlled infrastructure including npm[.]jpartifacts[.]com and other related domains.
MITRE Techniques
- [T1016.001 ] System Network Configuration Discovery: Internet Connection Discovery â PhantomRaven queried a public service to determine the victimâs external IP address (âcontacts https://api64.ipify.org to determine the infected systemâs external IP addressâ).
- [T1583.001 ] Acquire Infrastructure: Domains â The threat actor registered and operated domains for command-and-control infrastructure (âregistered and operated multiple domains for C2 infrastructureâ).
- [T1587.001 ] Develop Capabilities: Malware â The actor developed PhantomRaven, likely with AI assistance (âdeveloped PhantomRaven, likely using an LLM to generate the JS codeâ).
- [T1195.001 ] Supply Chain Compromise: Compromise Software Dependencies and Development Tools â Malicious npm packages were published to deliver the stealer through dependency installation (âpublished typosquatted npm packages that fetched malicious dependencies via HTTP URLs during installationâ).
- [T1059.007 ] Command and Scripting Interpreter: JavaScript â The malware executed as JavaScript in the NodeJS runtime (âPhantomRaven executes as JS code within the NodeJS runtime environmentâ).
- [T1072 ] Software Deployment Tools â npm preinstall scripts were used to automatically run the payload during installation (âleverages npmâs preinstall script functionality to automatically execute during package installationâ).
- [T1027.009 ] Obfuscated Files or Information: Embedded Payloads â The payload was hidden behind HTTP URL dependencies not visible in npmâs web interface (âembedded malicious payloads behind HTTP URL dependencies that are not displayed in npmâs web interfaceâ).
- [T1036.005 ] Masquerading: Match Legitimate Name or Location â Typosquatted package names were made to resemble legitimate tools (âTyposquatted package names mimic legitimate development tools and librariesâ).
- [T1552.001 ] Unsecured Credentials: Credentials In Files â The malware searched Git and npm configuration files for email addresses and credentials (âsearches Git and npm configuration files for email addresses and credentialsâ).
- [T1552.007 ] Unsecured Credentials: Container API â CI/CD-related environment variables were collected and may have contained secrets (âcollects CI/CD-related environment variables from GitHub Actions, GitLab CI, Jenkins, and CircleCIâ).
- [T1082 ] System Information Discovery â The malware gathered host and runtime details (âcollects OS type, architecture, hostname, NodeJS version, process ID, and current working directoryâ).
- [T1083 ] File and Directory Discovery â The malware searched for configuration and project files (âsearches for and reads package.json files, Git configuration files, and npm configuration filesâ).
- [T1614.001 ] System Location Discovery: System Language Discovery â The malware collected location and time-zone related information (âcollects system location and time zone informationâ).
- [T1005 ] Data from Local System â PhantomRaven collected information directly from the infected system (âcollects system information, environment variables, and configuration filesâ).
- [T1119 ] Automated Collection â Collection and exfiltration occurred automatically after execution (âperformed automatically upon malware execution, without user interactionâ).
- [T1071.001 ] Application Layer Protocol: Web Protocols â Exfiltration used HTTP GET and POST requests (âuses HTTP GET and POST requests to communicate with C2 infrastructureâ).
- [T1104 ] Multi-Stage Channels â The code included redundant communication methods with a fallback WebSocket path (âincludes both HTTP-based exfiltration and an unfinished WebSocket fallback methodâ).
- [T1041 ] Exfiltration Over C2 Channel â Collected data was sent to attacker-controlled servers (âexfiltrated to the threat actorâs C2 servers via HTTP GET and POST requestsâ).
Indicators of Compromise
- [Domain ] C2 and payload delivery infrastructure â packages[.]storeartifact[.]com, registry[.]storageartifact[.]com, and 2 more domains
- [Domain ] C2 domain used in PhantomRaven incidents â npm[.]jpartifacts[.]com, packages[.]storageartifact[.]com
- [IP address ] C2 server address â 54.173.15[.]59
- [File hashes ] PhantomRaven SHA256 samples â c31831d47fcbf52ff1f4e61838611916a4276d005a564e69946d5dac04235eed, 95a7dcc6de46826b22c43bee7fc550f3b5e2e6cbc5f33b0c241faf523641cf63, and other 2 hashes
- [Package names ] Malicious npm packages used to deliver PhantomRaven â transform-jsbi-to-bigint, sort-imports-es6-autofix
- [Email addresses ] Threat actor and sample metadata â jpdtester01@gmail[.]com, and the JPD username string in the initial contact email
- [User agents ] POST exfiltration user-agent â Mozilla/5.0 (Windows NT 10.0; Win64; x64)