# Live malware in Shai-Hulud detector test files (G DATA: Testing with live malware)

> G DATA reported that test files shipped with a detector for the Shai-Hulud npm worm exhibited real malicious behavior, including scripts that delete user directories and upload data to real threat actors. Users browsing the program folder could execute them by accident. The maintainer neutralized the files on 2026-02-17.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-01T06:06:15Z
- **Last updated:** 2026-12-01T06:06:15Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7138
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7138.png
- **ID:** TL-2026-7138
- **Severity:** LOW
- **Category:** MALWARE
- **Status:** RESOLVED
- **Detections:** 9 (1 shown free below) · **IOCs:** 20 (3 shown free below)

## Description

On 2026-02-16 G DATA Software published a blog post, 'Testing with live malware: Good Intentions, Problematic Execution', after a customer submitted test files from an open-source detector for the Shai-Hulud npm worm and described them as false detections. G DATA analyzed the files and concluded they were not false positives. The files contained scripts that, if executed, would delete user directories and upload data to real threat actors. One PowerShell test file carried the header '# SIMULATED MALICIOUS SCRIPT - PowerShell destructive patterns'. Its comments describe the actions as simulated, but the commands would really run. Per the post's image caption, the file reads credentials from environment variables and the .npmrc file and includes recursive file deletion.

G DATA stated it cannot assume malicious intent by the maintainer. The detector checks files for specific patterns (such as certain internet addresses), and the test files are not run during normal use; they exist to be detected by the scanner. The risk is that a user browsing the program folder could double-click a file and run it, causing data loss or credential/data exfiltration. G DATA's recommendations: add test cases to .gitignore and do not distribute them, run tests involving live malware only in a sandbox, and review AI-generated results manually before release. Update 2026-02-17: the project maintainer neutralized the test files, so there is no longer a risk of accidentally downloading, executing or detecting malware through them.

Evidence limits: the G DATA post does not name the detector, its maintainer or repository, and gives no hashes, domains, URLs or file names beyond the PowerShell header. This record does not attribute the incident to any specific repository. The public Cobenian/shai-hulud-detect project surfaced in search results, but its README tells contributors not to include actual malware in fixtures, and nothing retrieved confirms it is the detector G DATA examined. The IOCs listed are indicators of the Shai-Hulud worm itself (from Unit 42 and CISA) for context and hunting; they are not indicators extracted from the test files.

Background on the worm the detector targets: Shai-Hulud is a self-replicating npm worm first seen in September 2025 (500+ packages per CISA). It steals .npmrc npm tokens, GitHub PATs and AWS/GCP/Azure keys, exfiltrates to an attacker endpoint (webhook.site) and a public GitHub repository named 'Shai-Hulud', then uses the stolen npm token to publish trojanized versions of other packages. Shai-Hulud 2.0 (November 2025) moved execution to pre-install and added a destructive fallback that overwrites and deletes writable files in the user's home directory. This is the behavior class the test files reproduced.

## MITRE ATT&CK

- T1195.002 Compromise Software Supply Chain
- T1059.001 PowerShell
- T1059.004 Unix Shell
- T1204.002 Malicious File
- T1027 Obfuscated Files or Information
- T1552.001 Credentials In Files
- T1567 Exfiltration Over Web Service
- T1485 Data Destruction

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**Shai-Hulud 2.0 Loader / Payload / TruffleHog Execution via Node Runtime** (`TL-2026-7138-SPL-001`)

Behaviour-first detection of the Shai-Hulud npm worm (TL-2026-7138 context, Unit 42 / CISA): process creation referencing the Shai-Hulud 2.0 pre-install loader setup_bun.js or the obfuscated bun_environment.js payload, or TruffleHog launched by node, bun or npm to harvest secrets. Covers supply-chain execution of trojanized npm packages.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1195.002, T1204.002, T1027
- **Data sources:** sysmon, splunk:XmlWinEventLog:Microsoft-Windows-Sysmon/Operational, DeviceProcessEvents
- **Severity:** high
- **Confidence:** high

### Splunk SPL

```spl
index=sysmon sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 earliest=-24h
  (CommandLine="*setup_bun.js*" OR CommandLine="*bun_environment.js*" OR ParentCommandLine="*setup_bun.js*" OR ParentCommandLine="*bun_environment.js*"
   OR (Image="*trufflehog.exe" AND (ParentImage="*node.exe" OR ParentImage="*bun.exe" OR ParentImage="*npm.cmd")))
| eval indicator=case(match(CommandLine,"(?i)setup_bun[.]js") OR match(ParentCommandLine,"(?i)setup_bun[.]js"),"shai-hulud-2.0-loader-setup_bun.js", match(CommandLine,"(?i)bun_environment[.]js") OR match(ParentCommandLine,"(?i)bun_environment[.]js"),"shai-hulud-2.0-payload-bun_environment.js", match(Image,"(?i)trufflehog"),"trufflehog-spawned-by-node-runtime", true(),"parent-chain-match")
| stats count min(_time) as first_seen max(_time) as last_seen values(CommandLine) as command_lines values(ParentImage) as parent_images values(ParentCommandLine) as parent_command_lines by host User indicator
| convert ctime(first_seen) ctime(last_seen)
```

### Microsoft KQL

```kql
DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine has_any ("setup_bun.js", "bun_environment.js")
    or InitiatingProcessCommandLine has_any ("setup_bun.js", "bun_environment.js")
    or (FileName in~ ("trufflehog.exe", "trufflehog") and InitiatingProcessFileName in~ ("node.exe", "node", "bun.exe", "bun", "npm.cmd", "npm"))
| extend Indicator = case(
    ProcessCommandLine has "setup_bun.js" or InitiatingProcessCommandLine has "setup_bun.js", "ShaiHulud2-Loader-setup_bun.js",
    ProcessCommandLine has "bun_environment.js" or InitiatingProcessCommandLine has "bun_environment.js", "ShaiHulud2-Payload-bun_environment.js",
    "TruffleHog-from-node-runtime")
| project Timestamp, DeviceName, AccountName, Indicator, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA256
| order by Timestamp desc
```

### Sigma

```yaml
title: Shai-Hulud 2.0 Loader, Payload or TruffleHog Execution via Node Runtime
id: 7d1c0a52-3b6e-4f1a-9c58-2e4a8b7d6c11
status: experimental
description: Detects execution of the Shai-Hulud 2.0 setup_bun.js loader or bun_environment.js payload, or TruffleHog spawned by a Node, Bun or npm parent (credential harvesting by the npm worm).
references:
    - https://blog.gdatasoftware.com/2026/02/38370-malware-in-test-files
    - https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem
    - https://unit42.paloaltonetworks.com/npm-supply-chain-attack/
author: Threadlinqs Team
date: 2026/12/01
tags:
    - attack.initial-access
    - attack.t1195.002
    - attack.execution
    - attack.t1204.002
    - attack.defense-evasion
    - attack.t1027
logsource:
    category: process_creation
    product: windows
detection:
    selection_loader:
        CommandLine|contains:
            - 'setup_bun.js'
            - 'bun_environment.js'
    selection_parent:
        ParentCommandLine|contains:
            - 'setup_bun.js'
            - 'bun_environment.js'
    selection_trufflehog:
        Image|endswith: '\trufflehog.exe'
        ParentImage|endswith:
            - '\node.exe'
            - '\bun.exe'
            - '\npm.cmd'
    condition: 1 of selection_*
falsepositives:
    - Security researchers analysing Shai-Hulud samples in an instrumented lab
    - Developers legitimately running TruffleHog from an npm script in CI
level: high

```

**Known false positives:**

- Security researchers detonating Shai-Hulud samples in an instrumented lab
- Developers or CI jobs that legitimately run TruffleHog from an npm script
- Detector test fixtures that merely contain the file names as strings

**Tuning notes:** Scope to developer workstations and CI runners. Allow-list sanctioned TruffleHog CI pipelines by host and parent command line, using a NOT clause before the stats command. Extend the file-name list as new Shai-Hulud variants are published.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- Shai-Hulud Payload / Loader File and Hash Match (locked: unlock with TL Creds)
- npm [indicator] Token File Read or Staged via Command Line (locked: unlock with TL Creds)
- Script Runtime HTTP Egress to [indicator] (locked: unlock with TL Creds)
- Detector Test File Executed - SIMULATED MALICIOUS SCRIPT PowerShell Header (locked: unlock with TL Creds)
- Destructive Home Directory Deletion (Shai-Hulud 2.0 Fallback Class) (locked: unlock with TL Creds)
- Shai-Hulud 2.0 Self-Hosted Runner Registration (SHA1HULUD) (locked: unlock with TL Creds)
- PowerShell [indicator] Credential Access with Recursive Deletion (locked: unlock with TL Creds)
- [indicator] DNS Lookup from Script Runtime (Shai-Hulud Exfiltration) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 20)

Defanged, TLP:CLEAR.

- Domain: `webhook[.]site`
- File hash: `46faab8ab153fae6e80e7cca38eab363075bb524edd79e42269217a083628f09`
- File hash: `b74caeaa75e077c99f7d44f46daaf9796a3be43ecf24f2a1fd381844669da777`

Full set of 20 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [Testing with live malware: Good Intentions, Problematic Execution (G DATA)](https://blog.gdatasoftware.com/2026/02/38370-malware-in-test-files)
- [CISA: Widespread Supply Chain Compromise Impacting npm Ecosystem](https://www.cisa.gov/news-events/alerts/2025/09/23/widespread-supply-chain-compromise-impacting-npm-ecosystem)
- [Palo Alto Networks Unit 42: npm Supply Chain Attack (Shai-Hulud)](https://unit42.paloaltonetworks.com/npm-supply-chain-attack/)
- [Cobenian/shai-hulud-detect (public Shai-Hulud detector; not confirmed as the tool in G DATA's post)](https://github.com/Cobenian/shai-hulud-detect)
- [Checkmarx: Inside Shai-Hulud's Maw - how the npm worm exploits and propagates](https://checkmarx.com/zero-post/inside-shai-huluds-maw-how-the-npm-worm-exploits-and-propagates/)
- [GitLab: GitLab discovers widespread npm supply chain attack](https://about.gitlab.com/blog/gitlab-discovers-widespread-npm-supply-chain-attack/)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7138
