Node.js Pre or Post-Install Script Execution
This rule detects the execution of Node.js pre or post-install scripts. These scripts are executed by the Node.js package manager (npm) during the installation of packages. Adversaries may abuse this technique to…
Description
This rule detects the execution of Node.js pre or post-install scripts. These scripts are executed by the Node.js package manager (npm) during the installation of packages. Adversaries may abuse this technique to execute arbitrary commands on the system and establish persistence. This activity was observed in the wild as part of the Shai-Hulud worm.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 5 ATT&CK techniques it maps to.
- Log source category
- event_index
MITRE ATT&CK mappings
1 exclusive technique.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| www.elastic.co/blog/shai-hulud-worm-2-0-updated-response | Only this detection cites it |
| www.elastic.co/blog/shai-hulud-worm-npm-supply-chain-compromise | 12 |
| www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack | 17from 2 sources |
From the source
- At source
- Open at source
- Upstream identifier
- 0871a5d8-6b5f-4a12-a568-fd7bc05bd8db
- Tagged by the source as
- Data Source: CrowdstrikeData Source: Elastic DefendData Source: SentinelOneDomain: EndpointNoise: MediumOS: LinuxOS: macOSPerformance: NormalPlatform: LinuxPlatform: macOSProfile: RecommendedResources: Investigation GuideRule Type: Event Correlation (EQL)Tactic: Defense EvasionTactic: ExecutionTactic: PersistenceThreat: Script-Based ExecutionThreat: Supply ChainUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 29, 2026
- Version
- 4