SUSP_JS_NPM_SetupScript_Nov25


Description

Detects suspicious JavaScript which exits silently and checks operating system

Query · yara

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)
Raw source SUSP_JS_NPM_SetupScript_Nov25 · YARA
Esc
Published by Neo23x0/signature-base ↗, licensed under Detection Rule License 1.1 ↗. Reproduced here unmodified.
rule SUSP_JS_NPM_SetupScript_Nov25 {
   meta:
      description = "Detects suspicious JavaScript which exits silently and checks operating system"
      author = "Marius Benthin"
      date = "2025-11-24"
      modified = "2025-12-15"
      reference = "https://www.aikido.dev/blog/shai-hulud-strikes-again-hitting-zapier-ensdomains"
      hash = "a3894003ad1d293ba96d77881ccd2071446dc3f65f434669b49b3da92421901a"
      score = 70
      id = "2d102efd-681a-5af1-b4fe-3489e5e7f8f2"
   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)
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.