Sigma rule: Shai-Hulud Malicious Bun Execution - Linux

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-7ec75d988527, updated 2025-11-25T00:00:00.000Z.

Rule

Title
Shai-Hulud Malicious Bun Execution - Linux
Status
experimental
Level
high
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Date
2025-11-25
File
rules-emerging-threats/2025/Malware/Shai-Hulud/proc_creation_lnx_mal_shai_hulud_malicious_node_bun_execution.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

Detects the execution of `bun_environment.js` via the Bun runtime, a behavior associated with the Shai-Hulud "Second Coming" NPM supply chain attack.
The malware uses a `setup_bun.js` script to install the Bun runtime if not present, and then executes the malicious `bun_environment.js` payload.

Log source

product
linux
category
process_creation

Detection

selection_parent:
    ParentImage|endswith: '/node'
selection_child_bun:
    Image|endswith: '/bun'
    CommandLine|contains:
        - 'bun_environment.js'
        - 'https://github.com/actions/runner/releases/download/v2.330.0'
selection_child_setup_curl:
    CommandLine|contains|all:
        - 'curl '
        - '-fsSL'
        - 'https://bun.sh/install'
        - 'bash'
selection_child_path_reload:
    CommandLine|contains|all:
        - 'bash -c "source '
        - '&& echo'
condition: selection_parent and 1 of selection_child_*

False positives (as the rule lists them)

  • Legitimate but uncommon use of files named `bun_environment.js` could trigger this rule.

Tags

  • attack.t1195.002
  • attack.t1203
  • attack.execution
  • attack.initial-access
  • detection.emerging-threats

MITRE ATT&CK ids this rule names

Related rules

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-emerging-threats/2025/Malware/Shai-Hulud/proc_creation_lnx_mal_shai_hulud_malicious_node_bun_execution.yml

Sources and licences

  • SigmaHQ

    "Shai-Hulud Malicious Bun Execution - Linux" by Swachchhanda Shrawan Poudel (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-emerging-threats/2025/Malware/Shai-Hulud/proc_creation_lnx_mal_shai_hulud_malicious_node_bun_execution.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Shai-Hulud Malicious Bun Execution - Linux",
entity page, dataset version ref-7ec75d988527, updated 2025-11-25T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/eb827bbd-670a-4d58-8446-c464d8ac2323 (accessed 2026-11-03).
Underlying source: SigmaHQ rule eb827bbd-670a-4d58-8446-c464d8ac2323, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.