← Back to SOC feed Coverage →

Detects malicious JavaScript worm bun_environment.js

yara CRITICAL signature-base
florian-rothjs_npm
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 detection identifies the execution of a malicious JavaScript worm named bun_environment.js, which adversaries likely deploy to establish persistence and propagate lateral movement within cloud workloads. SOC teams should proactively hunt for this artifact in Azure Sentinel because its critical severity indicates a high risk of rapid infection across interconnected resources, necessitating immediate containment before the worm compromises sensitive data or disrupts service availability.

YARA Rule

rule MAL_JS_NPM_SupplyChain_Attack_Nov25 {
   meta:
      description = "Detects malicious JavaScript worm bun_environment.js"
      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 = "62ee164b9b306250c1172583f138c9614139264f889fa99614903c12755468d0"
      score = 80
      id = "11726cbe-48a7-577a-9694-8f38ffa746e1"
   strings:
      $sa1 = "npm publish"
      $sa2 = "NPM_TOKEN"
      $sa3 = "NPM_CONFIG_TOKEN"

      $sb1 = "GITHUB_"
      $sb2 = "GITLAB_"
      $sb3 = "TEAMCITY_"
   condition:
      filesize < 20MB
      and all of ($sa*)
      and 2 of ($sb*)
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 6 string patterns in its detection logic.

References

False Positive Guidance

Here are 5 specific false positive scenarios for the Detects malicious JavaScript worm bun_environment.js rule, including suggested filters and exclusions:

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