YARA · Signature Base (Florian Roth / Nextron)
SIGNATURE_BASE_MAL_JS_NPM_Supplychain_Compromise_Sep25
Detects a supply chain compromise in NPM packages (TinyColor, CrowdStrike etc.)
- Author
- Florian Roth
- Date
- 2025-09-16
- Modified
- 2025-09-17
- Score / Quality
- 80 / 85
What this rule detects
Detects a supply chain compromise in NPM packages (TinyColor, CrowdStrike etc.)
It defines 5 patterns (5 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
mal-js-npm-supplychain-compromise-sep25.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_JS_NPM_Supplychain_Compromise_Sep25 : FILE
{
meta:
= "Detects a supply chain compromise in NPM packages (TinyColor, CrowdStrike etc.)"
= "Florian Roth"
= "f64fa37b-8445-554a-8442-bd2d42a6643b"
= "2025-09-16"
= "2025-09-17"
= "https://socket.dev/blog/tinycolor-supply-chain-attack-affects-40-packages"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/mal_npm_supply_chain_sep25.yar#L23-L50"
= "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
= "6ddcf152ee8b90496d9d3f7f51dc239d927a3a2095082d13c6cc7e21819097f4"
= 80
= 85
= "FILE"
strings:
$x1 = "if (plat === \"linux\") return \"https://github.com/trufflesecurity/trufflehog/releases"
$sa1 = "curl -d \"$CONTENTS\" https://webhook.site/" ascii
$sa2 = "curl -s -X POST -d \"$CONTENTS\" \"https://webhook.site/"
$sb1 = " | base64 -w 0 | " ascii
$sb2 = " | base64 -w0)"
condition:
filesize < 20MB and ( 1 of ( $x* ) or ( 1 of ( $sa* ) and 1 of ( $sb* ) ) ) and not uint8( 0 ) == 0x7b
}
Strings (5 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "if (plat === \"linux\") return \"https://github.com/trufflesecurity/trufflehog/releases" | |
| $sa1 | text | "curl -d \"$CONTENTS\" https://webhook.site/" | ascii |
| $sa2 | text | "curl -s -X POST -d \"$CONTENTS\" \"https://webhook.site/" | |
| $sb1 | text | " | base64 -w 0 | " | ascii |
| $sb2 | text | " | base64 -w0)" |
Condition
filesize < 20MB and ( 1 of ( $x* ) or ( 1 of ( $sa* ) and 1 of ( $sb* ) ) ) and not uint8( 0 ) == 0x7bIn plain words (Heuristic)
- The file must be smaller than 20MB (a cheap guard that skips large files).
- At least 1 patterns in ( $x* ) must match.
- At least 1 patterns in ( $sa* ) must match.
- At least 1 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.
Licence & attribution
Author: Florian Roth
Source repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: f64fa37b-8445-554a-8442-bd2d42a6643b
Tags:FILE
Related rules
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2023-04-15
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2024-02-23
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2024-02-23
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2023-02-13
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2023-02-13
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2023-04-17
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2023-04-17
- MalwareSignature Base (Florian Roth / Nextron)· Florian Roth· 2023-11-01