Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_MAL_JS_NPM_Supplychain_Attack_Nov25

Detects malicious JavaScript worm bun_environment.js

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Compiles with YARA-X
Author
Marius Benthin
Date
2025-11-24
Modified
2025-12-15
Score / Quality
80 / 85

What this rule detects

Detects malicious JavaScript worm bun_environment.js

It defines 6 patterns (6 text, 0 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

mal-js-npm-supplychain-attack-nov25.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_JS_NPM_Supplychain_Attack_Nov25 : FILE
{
	meta:
		description = "Detects malicious JavaScript worm bun_environment.js"
		author = "Marius Benthin"
		id = "11726cbe-48a7-577a-9694-8f38ffa746e1"
		date = "2025-11-24"
		modified = "2025-12-15"
		reference = "https://www.aikido.dev/blog/shai-hulud-strikes-again-hitting-zapier-ensdomains"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/mal_npm_supply_chain_nov25.yar#L1-L23"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "62ee164b9b306250c1172583f138c9614139264f889fa99614903c12755468d0"
		logic_hash = "b5a8da01ecb31dfa7a3921847a0fe26021b7618b1ee7a115a366b0854a4fa0a8"
		score = 80
		quality = 85
		tags = "FILE"

	strings:
		$sa1 = "npm publish"
		$sa2 = "NPM_TOKEN"
		$sa3 = "NPM_CONFIG_TOKEN"
		$sb1 = "GITHUB_"
		$sb2 = "GITLAB_"
		$sb3 = "TEAMCITY_"

	condition:
		filesize < 20MB and all of ( $sa* ) and 2 of ( $sb* )
}

Strings (6 patterns)

IdentifierTypeValueModifiers
$sa1text"npm publish"
$sa2text"NPM_TOKEN"
$sa3text"NPM_CONFIG_TOKEN"
$sb1text"GITHUB_"
$sb2text"GITLAB_"
$sb3text"TEAMCITY_"

Condition

filesize < 20MB and all of ( $sa* ) and 2 of ( $sb* )

In plain words (Heuristic)

  • The file must be smaller than 20MB (a cheap guard that skips large files).
  • All patterns in ( $sa* ) must match.
  • At least 2 patterns in ( $sb* ) must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 62ee164b9b306250c1172583f138c9614139264f889fa99614903c12755468d0

Licence & attribution

Author: Marius Benthin

Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 11726cbe-48a7-577a-9694-8f38ffa746e1

Tags:FILE