Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Malware

bw1.js

Share:
For your environment

Hunt this family in your stack

Mallory pivots from this family to the IOCs, detections, and named campaigns that touch your stack, and pages you when something new lands.

MITRE ATT&CK

Techniques & procedures

30 distinct techniques documented for this family, organized by ATT&CK tactic.

Initial Access

3 techniques
T1078Valid AccountsEvidence2

First, it validates stolen GitHub tokens against https://api.github.com/user .

T1195Supply Chain CompromiseEvidence2

JFrog security researchers identified a hijacked npm package published as @bitwarden/cli version 2026.4.0, impersonating the legitimate Bitwarden command line client.

T1195.001Compromise Software Dependencies and Development ToolsEvidence2

When a valid npm token with bypass_2fa and package:write permissions is found, the malware pivots to active supply chain propagation... injects preinstall: node setup.mjs into package.json... Republishes to npm with the stolen auth token. | Bitwarden’s command-line interface (CLI) has been compromised in a software supply chain attack. The malicious version 2026.4.0 of the npm package @bitwarden/cli was available on npm...

Execution

4 techniques
T1053Scheduled Task/JobEvidence1

the payload used them to inject malicious workflows into victim repositories, giving the attacker a durable foothold and an automated path to spreading further.

T1059.004Unix ShellEvidence1

The shell collector explicitly runs gh auth token and also captures process.env

T1059.007JavaScriptEvidence4

The malicious package.json declares version 2026.4.0 with legitimate-looking Bitwarden metadata. The attack vector is a single field: { "name": "@bitwarden/cli", "version": "2026.4.0", "scripts": { "preinstall": "node bw_setup.js" } } ... preinstall runs before npm finishes installing the package. The developer does not need to run the tool or import it. Installing is enough.

T1574Hijack Execution FlowEvidence1

When a live AI tool is detected, the malware appends the following to both ~/.bashrc and ~/.zshrc ... AI coding assistants routinely read shell configuration files ... That content lands in the AI’s context window as if the developer had written it.

Persistence

5 techniques
T1053Scheduled Task/JobEvidence1

the payload used them to inject malicious workflows into victim repositories, giving the attacker a durable foothold and an automated path to spreading further.

T1078Valid AccountsEvidence2

First, it validates stolen GitHub tokens against https://api.github.com/user .

T1136.003Cloud AccountEvidence1

With a working PAT, it creates a repository in the victim account and uploads encrypted JSON blobs under a results/ directory.

T1546.004Unix Shell Configuration ModificationEvidence1

When an AI CLI tool is found... the malware calls appendFileSync on both ~/.bashrc and ~/.zshrc...

T1556Modify Authentication ProcessEvidence1

stolen GitHub tokens were weaponized in-line: the payload used them to inject malicious workflows into victim repositories, giving the attacker a durable foothold and an automated path to spreading further.

Privilege Escalation

3 techniques
T1053Scheduled Task/JobEvidence1

the payload used them to inject malicious workflows into victim repositories, giving the attacker a durable foothold and an automated path to spreading further.

T1078Valid AccountsEvidence2

First, it validates stolen GitHub tokens against https://api.github.com/user .

T1546.004Unix Shell Configuration ModificationEvidence1

When an AI CLI tool is found... the malware calls appendFileSync on both ~/.bashrc and ~/.zshrc...

Stealth

4 techniques
T1027Obfuscated Files or InformationEvidence3

bw1.js is 9.7 MB of heavily obfuscated JavaScript processed through obfuscator.io. It contains a 43,436-entry string lookup table using a custom base64 alphabet, a seeded pseudo-random scramble table for the most sensitive strings (C2 domain, file paths), and six gzip-compressed payload blobs referenced by index.

T1078Valid AccountsEvidence2

First, it validates stolen GitHub tokens against https://api.github.com/user .

T1497.001System ChecksEvidence1

Before performing any malicious activity, bw1.js runs a gauntlet of self-termination checks... System locale starts with ru... process.exit(0)... Not running in any CI/CD environment and daemonization fails... process.exit(0).

T1574Hijack Execution FlowEvidence1

When a live AI tool is detected, the malware appends the following to both ~/.bashrc and ~/.zshrc ... AI coding assistants routinely read shell configuration files ... That content lands in the AI’s context window as if the developer had written it.

Defense Impairment

1 technique
T1556Modify Authentication ProcessEvidence1

stolen GitHub tokens were weaponized in-line: the payload used them to inject malicious workflows into victim repositories, giving the attacker a durable foothold and an automated path to spreading further.

Credential Access

8 techniques
T1528Steal Application Access TokenEvidence1

looks for AWS credentials in ~/.aws/credentials... targets GCP credential storage in ~/.config/gcloud/credentials.db ... AWS, GCP, and Azure secrets

T1552Unsecured CredentialsEvidence1

mcpAddon.js is designed to sweep development environments for high-value secrets, including GitHub tokens, npm tokens, AWS/Azure/GCP credentials, SSH keys, environment variables, and configuration files for Claude and other AI tools.

T1552.001Credentials In FilesEvidence2

All extend a common $f base class with pattern-matching for ghp_*, gho_* (GitHub tokens), and npm_* (npm tokens)... Filesystem scanner... plausible targets include ~/.ssh/id_rsa, ~/.npmrc, ~/.aws/credentials...

T1552.004Private KeysEvidence1

The malicious payload collects CI secrets such as SSH keys or API tokens... plausible targets include ~/.ssh/id_rsa...

T1552.007Container APIEvidence1

MITRE attack mapping ... Credential Access T1552.001 / .004 / .007 Files, private keys, container/cloud API

T1555Credentials from Password StoresEvidence4

The filesystem sweep went after... SSH private keys, .git-credentials, .npmrc, .env files... AWS credential and config files... GCP credentials... Azure credentials... and a comprehensive pile of token files. | The shell collector explicitly ran gh auth token to grab the user's GitHub CLI token, then scanned process.env for anything matching ghp_[A-Za-z0-9]{36} ... or npm_[A-Za-z0-9]{36,} ...

T1556Modify Authentication ProcessEvidence1

stolen GitHub tokens were weaponized in-line: the payload used them to inject malicious workflows into victim repositories, giving the attacker a durable foothold and an automated path to spreading further.

T1649Steal or Forge Authentication CertificatesEvidence3

It steals credentials from cloud providers, AI tool configurations, SSH keys, and git credentials... Linux targets: ~/.ssh/id_* SSH private keys ... ~/.aws/credentials AWS access keys ... ~/.config/gcloud/credentials.db Google Cloud credentials ... .git-credentials Git credentials

Discovery

5 techniques
T1082System Information DiscoveryEvidence1

The payload runs three primary collectors: A filesystem collector A shell and environment collector A GitHub Actions runner collector

T1083File and Directory DiscoveryEvidence2

Filesystem scanner, Walks OS-specific 'hotspot' paths... reading files up to 5 MB each... Windows targets are plaintext in the binary: ['.env', 'config.ini'].

T1497.001System ChecksEvidence1

Before performing any malicious activity, bw1.js runs a gauntlet of self-termination checks... System locale starts with ru... process.exit(0)... Not running in any CI/CD environment and daemonization fails... process.exit(0).

T1526Cloud Service DiscoveryEvidence1

Enumerates all packages the token can publish to via /whoami, /-/org/<org>/package , and /-/v1/search?text=maintainer:<user>&size=250

T1614.001System Language DiscoveryEvidence1

The first thing bw1.js does after loading is check whether the machine has a Russian locale configured... If any of them contain ru, the process exits cleanly with code 0.

Collection

3 techniques
T1005Data from Local SystemEvidence2

Seven independent collectors run in parallel and feed a shared result store... Filesystem scanner... Shell and environment scanner... dumps the entire process.env object.

T1119Automated CollectionEvidence1

The payload runs three primary collectors: A filesystem collector A shell and environment collector A GitHub Actions runner collector

T1560Archive Collected DataEvidence1

The session key is then RSA-2048 OAEP encrypted with the Fr public key, bundled together as tpcp.tar.gz , and POSTed to https://audit.checkmarx.cx/v1/telemetry .

Command and Control

2 techniques
T1105Ingress Tool TransferEvidence2

bw_setup.js ... downloads the Bun JavaScript runtime (version 1.3.13) from GitHub’s official release endpoint and use it to execute the main payload, bw1.js .

T1568Dynamic ResolutionEvidence1

If the primary C2 is unreachable, the malware falls back to searching GitHub’s commit API for C2 instructions embedded in public Git commit messages.

Exfiltration

2 techniques
T1567Exfiltration Over Web ServiceEvidence4

The primary exfil channel was audit.checkmarx[.]cx/v1/telemetry, a domain that typosquats the real checkmarx.com and was designed to look like legitimate telemetry from a security tool. | If the primary endpoint is unreachable, the payload uses a stolen GitHub PAT to create a new public repository on the victim’s GitHub account... Encrypted results get committed as results/results-<timestamp>-<counter>.json batches...

T1567.001Exfiltration to Code RepositoryEvidence1

then creates a new repo under the victim’s account and uploads encrypted result blobs there.

INDICATORS OF COMPROMISE

IOCs tracked for this family

2 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Full values are available in Mallory.

View more in app
Network
2 tracked

IPs, domains, and DNS infrastructure linked to this family.

TypeValueLatest sighting
domain●●●●●●●●●●●●View more in app1 month ago
ip.v4●●●●●●●●●●●●View more in app2 months ago
What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching2

Match every observed IP, domain, and hash against your live telemetry.

Threat actor attribution

Named campaigns wielding this family, with evidence pinned to each claim.

Exploited vulnerabilities

CVEs this family uses for access and lateral movement.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

MITRE ATT&CK mapping30

Every documented technique, ranked by evidence weight.

Researcher chatter

Reddit, Mastodon, and CTI community discussion around this family.