← Back to SOC feed Coverage →

Detects suspicious JavaScript which exits silently and checks operating system

yara HIGH signature-base
backdoorflorian-roth
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at signature-base →
Retrieved: 2026-08-06T11:00:00Z · Confidence: medium

Hunt Hypothesis

This rule detects adversary behavior where malicious scripts perform environment reconnaissance by querying OS details while suppressing output to evade standard logging visibility. Proactive hunting for this pattern in Azure Sentinel is critical because silent execution combined with OS checks often indicates an early-stage post-exploitation phase, allowing the SOC team to identify stealthy threats before they establish persistence or exfiltrate data.

YARA Rule

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

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 4 string patterns in its detection logic.

References

False Positive Guidance

Here are 5 specific false positive scenarios for the rule “Detects suspicious JavaScript which exits silently and checks operating system,” along with recommended filters or exclusions:

Original source: https://github.com/Neo23x0/signature-base/blob/main/yara/mal_npm_supply_chain_nov25.yar