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.)
- Auteur
- Florian Roth
- Date
- 2025-09-16
- Modifiée
- 2025-09-17
- Score / Qualité
- 80 / 85
Ce que détecte cette règle
Detects a supply chain compromise in NPM packages (TinyColor, CrowdStrike etc.)
Elle définit 5 motifs (5 texte, 0 hex, 0 regex).
Résumé généré à partir des métadonnées et de la condition de la règle.
Source de la règle
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
}
Chaînes (5 motifs)
| Identifiant | Type | Valeur | Modificateurs |
|---|---|---|---|
| $x1 | texte | "if (plat === \"linux\") return \"https://github.com/trufflesecurity/trufflehog/releases" | |
| $sa1 | texte | "curl -d \"$CONTENTS\" https://webhook.site/" | ascii |
| $sa2 | texte | "curl -s -X POST -d \"$CONTENTS\" \"https://webhook.site/" | |
| $sb1 | texte | " | base64 -w 0 | " | ascii |
| $sb2 | texte | " | base64 -w0)" |
Condition
filesize < 20MB and ( 1 of ( $x* ) or ( 1 of ( $sa* ) and 1 of ( $sb* ) ) ) and not uint8( 0 ) == 0x7bEn clair (Heuristique)
- Le fichier doit faire moins de 20MB (garde-fou peu coûteux qui écarte les gros fichiers).
- Au moins 1 motifs de ( $x* ) doivent être trouvés.
- Au moins 1 motifs de ( $sa* ) doivent être trouvés.
- Au moins 1 motifs de ( $sb* ) doivent être trouvés.
Tester cette règle dans votre navigateur
Déposez un fichier pour le scanner avec cette règle grâce à YARA-X compilé en WebAssembly. Rien n’est envoyé.
Licence et attribution
Auteur : Florian Roth
Dépôt source : Signature Base (Florian Roth / Nextron) @ 94a1c48d7a
Licence : Detection Rule License 1.1 (licence du dépôt)
Reprise via YARA Forge 20260927, qui préfixe les noms de règles par la source et ajoute des champs meta normalisés.
Identifiant de règle: f64fa37b-8445-554a-8442-bd2d42a6643b
Tags:FILE
Règles liées
- 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