PhantomRaven: An LLM-Generated Information Stealer Developed for Bug Bounty Hunting

PhantomRaven: An LLM-Generated Information Stealer Developed for Bug Bounty Hunting
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)


Read more: https://www.crowdstrike.com/en-us/blog/phantomraven-llm-generated-information-stealer-for-bug-bounty-hunting/