PhantomRaven: An LLM-Generated Information Stealer Developed for Bug Bounty Hunting
PhantomRaven is an LLM-generated JS information stealer delivered via typosquatted npm packages, exfiltrating CI/CD credentials and system data to attacker-controlled C2 infrastructure. PhantomRaven is distributed through typosquatted npm packages that use remote dynamic dependency links to fetch a malicious payload at install time. The stealer collects system information, Git/npm configuration credentials, and CI/CD environment variables from GitHub Actions, GitLab CI, Jenkins, and CircleCI, then exfiltrates via HTTP GET and POST to attacker-controlled domains.
Detection / Hunteropenrouter
Immediate Actions
- Block C2 domains and IP at network perimeter and proxy
- Update npm to version 12 or later to block preinstall scripts by default
- Configure npm to use --ignore-scripts globally, selectively enable for trusted packages
- Audit installed npm packages for typosquatted names and HTTP dependency URLs
Key Takeaways
- Threat actor uses bug bounty platforms (HackerOne) as cover for malicious compromise activity
- npm version 12+ blocks preinstall scripts by default, mitigating this vector
- Malware contacts api64.ipify.org to resolve external IP before exfiltration
- Code assessed as LLM-generated with high confidence based on token analysis and verbose comments
- Threat actor also developed a Python/PyPI variant of the stealer
Attack Chain
- Initial Access: Typosquatted npm packages use HTTP RDD links to fetch malicious dependencies at install time
- Execution: Preinstall script auto-executes PhantomRaven JS payload within NodeJS runtime
- Discovery: Malware collects OS, hostname, IP, process details, and CI/CD environment variables
- Credential Access: Reads Git and npm configuration files for email addresses and credentials
- C2: Exfiltrates collected data via HTTP GET and POST to attacker-controlled domains
- Exfiltration: Data serialized as JSON in POST body; incomplete WebSocket fallback method exists
Affected Systems
- NodeJS runtime environments
- npm package manager users
- GitHub Actions CI/CD pipelines
- GitLab CI pipelines
- Jenkins CI/CD servers
- CircleCI pipeline environments
Detection Availability
No detection rules or queries are published in the source article.
Detection Engineering Assessment
Hypotheses are starting points derived from the article, not findings about your environment; validate against your own telemetry.
| Dimension | Rating | Rationale |
|---|---|---|
| EDR Visibility | Medium | NodeJS process execution and network connections visible but may blend with legitimate npm activity. |
| Network Visibility | High | HTTP GET/POST to known C2 domains and external IP resolution via ipify are network-observable. |
| Detection Difficulty | Moderate | Typosquatted packages and RDD links require package-level analysis; network C2 is detectable. |
Hunting Hypotheses
| Hypothesis | Telemetry | Stage | FP Risk |
|---|---|---|---|
| npm install processes making outbound HTTP requests to non-registry domains during package installation (T1195.001, T1071.001) | EDR process network connections, DNS logs | Initial Access | Medium — legitimate npm packages may contact external CDNs |
| NodeJS processes reading .gitconfig and .npmrc files then transmitting data via HTTP POST (T1552.001, T1041) | EDR file access telemetry, network logs | Credential Access | Low — combined file read and exfiltration pattern is rare |
| CI/CD environment variables accessed by NodeJS processes outside expected pipeline execution context (T1552.007) | EDR environment variable access, CI/CD audit logs | Collection | Medium — CI tools legitimately access these variables |
Required Log Sources
- DNS resolution logs
- HTTP proxy logs
- npm install logs
- EDR process telemetry
- CI/CD pipeline logs
Key Behavioral Indicators
- NodeJS process reading .gitconfig or .npmrc followed by HTTP POST
- npm install fetching dependencies from non-registry HTTP URLs
- Minimal user-agent string missing browser type and version fields
- NodeJS process accessing CI/CD-specific environment variables outside pipeline context
Control Gaps
- Standard npm registry lacks controls against typosquatted packages
- Preinstall scripts execute automatically in npm versions prior to 12
- CI/CD environment variable access by arbitrary processes is often unmonitored
- Dependency URLs in package.json are not inspected by default
False Positive Assessment
Medium — legitimate npm packages may use HTTP dependencies and preinstall scripts; C2 domains and hashes provide high-fidelity indicators but behavioral signals overlap with normal development activity.
Recommendations
Suggestions to evaluate against your own environment, tooling, and incident-response procedures — not directives.
Infrastructure Hardening
- Implement private npm registry with controlled, monitored package installations
- Block outbound HTTP requests from CI/CD build agents to non-registry domains
- Rotate CI/CD secrets and API tokens exposed in environment variables on affected systems
User Protection
- Deploy EDR rules alerting on NodeJS processes reading credential config files
- Enforce allowlisting for npm package sources in developer workstations and CI/CD runners
- Monitor and alert on typosquatted package installations across development environments
Security Awareness
- Train developers on dependency-confusion and typosquatting attack vectors
- Require code review of package.json dependency declarations before installation
MITRE ATT&CK Mapping
Resource Development
Initial Access
Execution
Credential Access
Discovery
Collection
Command and Control
Exfiltration
Plain-Language Summary
A criminal actor created a malware tool called PhantomRaven that steals sensitive information from developers' computers. The malware hides inside fake npm software packages that look similar to real ones. When installed, it automatically runs and collects system details, developer credentials, and CI/CD pipeline secrets, then sends everything to servers the attacker controls. The attacker appears to use bug bounty programs as a cover story for the theft. Organizations using npm should update to version 12 or later and disable automatic script execution.
Additional IOCs
- Command Lines:
- Purpose: Preinstall script auto-execution during npm package installation | Tools:
npm,node| Stage: Execution |node index.js
- Purpose: Preinstall script auto-execution during npm package installation | Tools:
- domainnpm[.]jpartifacts[.]comC2 domain used in November 2025 campaign
- domainpackages[.]storageartifact[.]comC2 domain for PhantomRaven exfiltration
- domainpackages[.]storeartifact[.]comC2 domain for PhantomRaven exfiltration
- domainregistry[.]storageartifact[.]comC2 domain for PhantomRaven exfiltration
- emailjpdtester01[@]gmail[.]comThreat actor contact email in Python variant metadata
- ip54[.]173[.]15[.]59C2 IP address for PhantomRaven
- sha25695a7dcc6de46826b22c43bee7fc550f3b5e2e6cbc5f33b0c241faf523641cf63PhantomRaven payload SHA256 hash
- sha256c31831d47fcbf52ff1f4e61838611916a4276d005a564e69946d5dac04235eedPhantomRaven payload SHA256 hash
- sha256db3fe46df0a65fe9f8c99d2e11126a032a72e9814e354ce017448ce088a01e02PhantomRaven payload SHA256 hash