Add New ChainDrop NPM Supply-Chain Attack Rules - #6219
Open
harshthakur6293 wants to merge 1 commit into
Open
Conversation
Adds 7 emerging-threat rules covering the ChainDrop worm (Mini Shai-Hulud variant) reported 2026-08-04, which compromised the keyv/cacheable package families and self-propagated to 444 packages across 2,212 versions. Existing Shai-Hulud (2025) and TanStack (2026) packs do not fire on this wave: they key on bun_environment.js, tanstack_runner.js, the literal strings Shai-Hulud/SHA1HULUD, and a hard-coded Nov-2025 package list, all of which ChainDrop replaced. "node setup.mjs", the lead hunting query in both the Microsoft and Elastic reports, was not present in any detection logic in the repository. Coverage: - proc_creation (lnx/win): dropper, Bun ingress, payload execution - proc_creation (lnx/win): cloud token harvesting and runner memory scrape - file_event (lnx/win): payload drop and .claude/.vscode persistence - dns_query: exfiltration and EtherHiding fallback infrastructure Bun-download and credential-access selections are gated on ParentImage so that legitimate Bun installs and interactive cloud CLI use stay silent. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Welcome @harshthakur6293 👋
It looks like this is your first pull request on the Sigma rules repository!
Please read the SigmaHQ conventions to ensure your contribution adheres to best practices and includes all the necessary elements for a successful review.
Also check CONTRIBUTING.md for more information on how to contribute to the Sigma rules repository, specifically proper testing and validation of your rules.
Thanks again, and welcome to the Sigma community! 😃
If you want to engage more with the community for official support, general discussions or announcements:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds 7 rules for the ChainDrop npm supply-chain worm (Mini Shai-Hulud variant) reported on 2026-08-04, which compromised the keyv and cacheable package families and spread to 444 packages across 2,212 versions.
Placed in
rules-emerging-threats/2026/Malware/ChainDrop/, following the layout of the TanStack pack from #6008. Purely additive, no existing files changed.Why existing rules do not cover this
The repo already has Shai-Hulud (2025) and TanStack (2026) packs. I checked each against the ChainDrop artefacts and none of them fire, because every selector keys on something this wave replaced:
..._shai_hulud_malicious_node_bun_executionkeys onbun_environment.jsandbun.sh/install. ChainDrop usesMath_Symbol.js/math_init.jsand pulls Bun v1.3.13 from the GitHub releases URL...._shai_hulud_indicatorkeys onShai-Hulud/SHA1HULUDin the command line. In this wave those strings only appear in attacker repo descriptions, never on a command line...._shai_hulud_malicious_npm_package_installationkeys on a hard-coded Nov-2025 package list. ChainDrop hitkeyv@6.0.0,flat-cache@6.1.24,file-entry-cache@11.1.6and others...._shai_hululd_exfiltrationkeys on the oldwebhook.siteURL. ChainDrop posts tonpm-cache.com:443/router.file_event_lnx_mal_shai_hulud_workflowkeys on.github/workflows/shai-hulud-workflow.yml. ChainDrop persists via.claude/and.vscode/instead...._tanstack_supply_chainkeys ontanstack_runner.jsand.claude/router_runtime.js.dns_query_win_malware_tanstack_supply_chain_c2keys ongit-tanstack.com.Worth flagging:
node setup.mjsis the lead hunting query in both the Microsoft and Elastic write-ups, and it is not in any detection block in this repo today. It appears in the TanStack rule description text only.Rules
proc_creation_{lnx,win}_malware_chaindrop_execution.ymlproc_creation_{lnx,win}_malware_chaindrop_credential_access.ymlfile_event_{lnx,win}_malware_chaindrop.yml.claude/.vscodepersistence,gh-token-monitordns_query_win_malware_chaindrop_c2.ymlLinux and Windows counterparts are cross-linked with
related:.Detection chain
On an infected host the chain is:
npm installruns thepreinstallhook, which runsnode setup.mjs, which downloads Bun into abun-dl-temp dir and executesMath_Symbol.jsunder it. That payload then shells out togh auth token,az account get-access-tokenand similar, writes.claude/setup.mjsfor persistence, and exfils tonpm-cache.com.The execution rule covers the first three steps, the credential access rule the fourth, the file event rule the fifth, and the DNS rule the last. A hit on the dropper alone tells you a lifecycle hook ran an unexpected script. A hit on the payload or credential selections alongside it means the second stage detonated and tokens need rotating.
False positive handling
The Bun download and credential access selections are gated on
ParentImage. This matters because the download URL is the official Bun release URL andgh auth tokenis an ordinary command. The signal is the parent, not the command:curl -fsSL .../bun-v1.3.13/bun-linux-x64-baseline.zipnodebashcurl -fsSL https://bun.sh/install | bashbashgh auth tokenbunbashaz account get-access-tokenbunshCredential access is gated on behaviour rather than filename on purpose. This campaign has already renamed its payload twice (
bun_environment.js, thentanstack_runner.js, nowMath_Symbol.js), which is why the older packs miss it, so a rule keyed on the Bun parent should survive the next rename.Three published IOCs are deliberately left out because in these log sources they would be false positive generators, not detections:
.github/workflows/codeql_analysis.ymlis a normal filename. The malicious part is the injected${{ toJSON(secrets) }}content, whichfile_eventcannot see..claude/settings.jsonand.vscode/tasks.jsonare written constantly by Claude Code and VS Code. Again the malice is in the contents.eth.llamarpc.com,go.getblock.io,eth-mainnet.nodereal.io) are legitimate infrastructure. Only confirmed attacker apexes are in the DNS rule.SHA256 hashes from the reports are in
referencesrather than as selectors, since there is no usable hash field here and they do not survive a payload rebuild.Testing
An earlier revision raised two
SigmahqTagsTechniquesWithoutTacticsIssuefindings on the file_event rules, sinceT1546andT1543.002map to both Persistence and Privilege Escalation. Fixed by addingattack.privilege-escalation.I also ran the selectors against a synthetic event set built from the published telemetry: 32 events covering every documented artefact across the five reports were each matched by at least one rule, and 20 benign developer and CI events produced no hits, including the paired cases in the table above plus
bun runfromnode_modules, legitimate.vscode/tasks.jsonand.claude/settings.jsonwrites, a CodeQL workflow file, an ordinarymathjs/lib/math.js, andregistry.npmjs.orgDNS.References
Happy to split this up, adjust tags, or tighten the
setup.mjsselector if you prefer. Theattack.t1003tag on the Linux credential access rule covers the/proc/<pid>/memscrape and can be dropped ift1552.001is enough.