Skip to content

YARA · Signature Base (Florian Roth / Nextron)

SIGNATURE_BASE_SUSP_JS_NPM_Setupscript_Nov25

Detects suspicious JavaScript which exits silently and checks operating system

Suspicious / huntingSignature 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
70 / 85

What this rule detects

Detects suspicious JavaScript which exits silently and checks operating system

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

Summary generated from the rule's metadata and condition.

Rule source

susp-js-npm-setupscript-nov25.yarDetection Rule License 1.1
rule SIGNATURE_BASE_SUSP_JS_NPM_Setupscript_Nov25 : FILE
{
	meta:
		description = "Detects suspicious JavaScript which exits silently and checks operating system"
		author = "Marius Benthin"
		id = "2d102efd-681a-5af1-b4fe-3489e5e7f8f2"
		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#L43-L64"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		hash = "a3894003ad1d293ba96d77881ccd2071446dc3f65f434669b49b3da92421901a"
		logic_hash = "b685f642d1d62200da973aad7fd7a2d606a098b92524aaebe5e2bb45c63f3155"
		score = 70
		quality = 85
		tags = "FILE"

	strings:
		$sa1 = "require('child_process')"
		$sa2 = "process.platform ==="
		$sb1 = "().catch((e"
		$sb2 = "process.exit(0)"

	condition:
		filesize < 100KB and all of ( $sa* ) and $sb1 in ( filesize - 50 .. filesize ) and $sb2 in ( filesize - 30 .. filesize )
}

Strings (4 patterns)

IdentifierTypeValueModifiers
$sa1text"require('child_process')"
$sa2text"process.platform ==="
$sb1text"().catch((e"
$sb2text"process.exit(0)"

Condition

filesize < 100KB and all of ( $sa* ) and $sb1 in ( filesize - 50 .. filesize ) and $sb2 in ( filesize - 30 .. filesize )

In plain words (Heuristic)

  • The file must be smaller than 100KB (a cheap guard that skips large files).
  • All patterns in ( $sa* ) must match.
  • Pattern $sb1 must be found within the range filesize - 50 .. filesize.
  • Pattern $sb2 must be found within the range filesize - 30 .. filesize.

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).

  • a3894003ad1d293ba96d77881ccd2071446dc3f65f434669b49b3da92421901a

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: 2d102efd-681a-5af1-b4fe-3489e5e7f8f2

Tags:FILE