Zum Inhalt springen

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

MalwareSignature Base (Florian Roth / Nextron)Detection Rule License 1.1Kompiliert mit YARA-X
Autor
Florian Roth
Datum
2025-09-16
Geändert
2025-09-17
Score / Qualität
80 / 85

Was diese Regel erkennt

Detects a supply chain compromise in NPM packages (TinyColor, CrowdStrike etc.)

Sie definiert 5 Muster (5 Text, 0 Hex, 0 Regex).

Zusammenfassung aus den Metadaten und der Bedingung der Regel erzeugt.

Regelquelltext

mal-js-npm-supplychain-compromise-sep25.yarDetection Rule License 1.1
rule SIGNATURE_BASE_MAL_JS_NPM_Supplychain_Compromise_Sep25 : FILE
{
	meta:
		description = "Detects a supply chain compromise in NPM packages (TinyColor, CrowdStrike etc.)"
		author = "Florian Roth"
		id = "f64fa37b-8445-554a-8442-bd2d42a6643b"
		date = "2025-09-16"
		modified = "2025-09-17"
		reference = "https://socket.dev/blog/tinycolor-supply-chain-attack-affects-40-packages"
		source_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/yara/mal_npm_supply_chain_sep25.yar#L23-L50"
		license_url = "https://github.com/Neo23x0/signature-base/blob/94a1c48d7ab499879287ff611dfe7f9c56376030/LICENSE"
		logic_hash = "6ddcf152ee8b90496d9d3f7f51dc239d927a3a2095082d13c6cc7e21819097f4"
		score = 80
		quality = 85
		tags = "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 Muster)

BezeichnerTypWertModifikatoren
$x1Text"if (plat === \"linux\") return \"https://github.com/trufflesecurity/trufflehog/releases"
$sa1Text"curl -d \"$CONTENTS\" https://webhook.site/"ascii
$sa2Text"curl -s -X POST -d \"$CONTENTS\" \"https://webhook.site/"
$sb1Text" | base64 -w 0 | "ascii
$sb2Text" | base64 -w0)"

Bedingung

filesize < 20MB and ( 1 of ( $x* ) or ( 1 of ( $sa* ) and 1 of ( $sb* ) ) ) and not uint8( 0 ) == 0x7b

In Worten (Heuristik)

  • Die Datei muss kleiner als 20MB sein (eine günstige Grenze, die große Dateien ausschließt).
  • Mindestens 1 Muster aus ( $x* ) müssen treffen.
  • Mindestens 1 Muster aus ( $sa* ) müssen treffen.
  • Mindestens 1 Muster aus ( $sb* ) müssen treffen.

Diese Regel im Browser testen

Legen Sie eine Datei ab, um sie mit dieser Regel und YARA-X als WebAssembly zu scannen. Nichts wird hochgeladen.

Datei hier ablegen oder klicken zum AuswählenLokal mit YARA-X gescannt. Dateien bis 200 MB.

Im Editor öffnen

Referenzen

Lizenz & Namensnennung

Autor: Florian Roth

Quell-Repository: Signature Base (Florian Roth / Nextron) @ 94a1c48d7a

Lizenz: Detection Rule License 1.1 (Repository-Lizenz)

Originalregel

Gespiegelt über YARA Forge 20260927, das Regelnamen mit der Quelle präfixiert und normalisierte Meta-Felder ergänzt.

Regel-ID: f64fa37b-8445-554a-8442-bd2d42a6643b

Tags:FILE