Repository navigation
Conversation
…sive mode) Adds 4 detection rules for the 2026-05-11 npm/PyPI supply chain campaign (GHSA-g7cv-rxg3-hmpx / CVE-2026-45321) into Phase 8 (Skill Supply Chain). - R7 (Claude Code settings hook injection — /proc/*/mem read pattern) - R8 (obfuscated payload heuristic — _0x patterns + crypto-decode) - R9 (auto-run persistence bridge — manifest-undeclared file referenced by hook or tasks.json runOn: folderOpen) - R12 (Session-protocol C2 deny-list — executable context only) All rules surface only under /cso --comprehensive with TENTATIVE marking; daily mode's 8/10 zero-noise contract is preserved. Closes Phase 8 gaps for IDE-config infection vectors that the existing generic-pattern matching (curl/wget/exfiltrat/IGNORE PREVIOUS) does not catch. No new skill, no new phase, no scope-flag changes (per garrytan#1011).
A static-string IOC match against the shell brace expression
seed{1,2,3}.getsession.org would search for that exact 25-char string
and miss the actual hosts (seed1.getsession.org, seed2.getsession.org,
seed3.getsession.org). Spell them out so comprehensive-mode Grep
hits the real campaign infrastructure.
SKILL.md is executable prompt code, not documentation — campaign attribution belongs in commit history and PR description, not in the timeless rule definitions. R7 rationale generalized; Tier 3 intro pruned of the campaign citation. Rule behavior unchanged.
- R7/R9: replace "user-global equivalents" shorthand with explicit ~/.claude/settings.json and ~/.claude/settings.local.json paths - R8: drop "Matches the campaign's obfuscation" prose (campaign-specific decoration) and rewrite the FP rationale as instruction - R9 (a): add node --require and node -e <inline-require> to the interpreter invocation patterns (covers indirect-require evasion) - R9 (b): replace ambiguous "lockfile integrity hash" with "installed locked-package artifacts" — lockfile integrity is per-package, not per-file, so the previous wording invited reviewer confusion Rule trigger surface unchanged for R7 (mem-read) and R12 (Session domains in executable context). R8's matching condition is unchanged (_0x density + crypto-decode call). R9 gains two indirect invocation patterns and clarified manifest wording.
The R7/R8/R9/R12 numbering reflected a 14-rule draft history where R10, R11, R13, R14 were dropped during review (hash-level IOCs and cloud-SDK false-positive risks). Renumbering closes the gaps so reviewers see four contiguous rules instead of wondering what R10/R11 were. Rule definitions and FP guards are unchanged. Self-ref in the FP guards section updated (R9 → R3).
|
Thanks for this. The patch targets obsolete files, and several proposed detections are not deterministically implementable or covered by malicious and benign fixtures. Rebase onto the current audit-phase template, use implementable primary-source indicators, regenerate output, and add fixtures proving comprehensive detection without changing daily mode. |
…lud-phase8 # Conflicts: # cso/SKILL.md # cso/SKILL.md.tmpl
Keep all four campaign rules but rework R2/R3 to match only on deterministic, primary-source indicators. R1 and R4 unchanged. - R2 (auto-run reference): drop the undecidable "not present in npm tarball / locked-package artifacts" negative-proof clause; keep the deterministic "listed in package.json files array" exemption as an FP guard. - R3 (packed-dropper): drop the _0x obfuscation pattern, the ">=3 occurrences" count threshold, and the subjective "ordinary minified bundle" exclusion. Fire only when an R2 auto-run file also contains a literal createDecipheriv/gunzip/inflate call. - Restore the GHSA-g7cv-rxg3-hmpx / CVE-2026-45321 primary-source anchor.
review) Prove comprehensive-mode detection without changing daily mode. - cso-tier3-malicious: /cso --comprehensive surfaces R1 (/proc/*/mem), R3 (auto-run payload that decrypts an embedded blob), and R4 (getsession.org) as TENTATIVE findings. - cso-tier3-benign: FP guards suppress doc-only IOC mentions and .vscode/extensions/ look-alikes — zero Tier 3 findings. - cso-tier3-daily: plain /cso keeps Tier 3 rules out (8/10 zero-noise). Negative assertions key on a TENTATIVE-finding proximity match, not bare word co-occurrence, so a correct zero-finding run can't false-fail. All three classified periodic (comprehensive-mode, non-deterministic).
|
@time-attack thanks for the review. Addressed all four points: 1. Obsolete files / rebase onto current audit-phase template. Merged 2. Deterministic, primary-source indicators. Kept four rules but reworked the non-deterministic ones:
3. Malicious + benign fixtures. Added three E2E cases in
4. Without changing daily mode. The daily 8/10 zero-noise gate is untouched (Tier 3 is comprehensive-only + TENTATIVE); Note on test tier: the three cases are classified |
…arrytan#592 garrytan#696 garrytan#1523 garrytan#1053) Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Thank you for this, @slash9494, and for the work that went into it. We reviewed it against current main and decided not to take it: Campaign-specific indicators go stale quickly and don't fit /cso's general methodology. Better to check that Phase 8's general hook and auto-run guidance catches these behaviors, with fixtures, than to add named campaign rules. Closing it with thanks; if the underlying problem still bites you, an issue describing it is very welcome. |
Summary
"mini-shai-hulud" npm/PyPI supply chain campaign
(GHSA-g7cv-rxg3-hmpx / CVE-2026-45321, severity critical, reviewed).
gate. Daily mode's 8/10 zero-noise contract is preserved (no rule fires
in daily mode).
obfuscated payloads under
.claude/**/.vscode/**, auto-run persistencebridges, Session-protocol C2.
("methodology depth over feature count").
Rules (Phase 8, comprehensive mode only)
R1 [TENTATIVE] — Any Claude Code settings file (
.claude/settings.json,.claude/settings.local.json,~/.claude/settings.json, or~/.claude/settings.local.json)hooks.*.commandfield containing a/proc/.*/memread pattern. Direct process-memory introspection from a Claude Code hook hasno legitimate use; it is a known credential-exfiltration technique against
runner processes.
R2 [TENTATIVE] —
.claude/**/*.{js,mjs,ts,cjs}or.vscode/**/*.{js,mjs,ts,cjs}containing both the_0x[0-9a-f]{4,}variable pattern (≥3 distinct occurrences) and at least one of
createDecipheriv,gunzip,gunzipSync,inflateRawSync,inflateSync. Do not alert on ordinary minified bundles or inlinesourcemap output unless both halves match.
R3 [TENTATIVE] — File under
.claude/**or.vscode/**where allthree hold: (a) referenced from any Claude Code settings file
(
.claude/settings.json,.claude/settings.local.json,~/.claude/settings.json, or~/.claude/settings.local.json)hooks.*.commandvianode|bun|python3?|bash|sh <path>,node --require <path>,node -e <inline-require>, or direct pathinvocation, OR from a
tasks.jsontask withrunOptions.runOn: "folderOpen"; (b) not present in package manifestevidence (
package.jsonfilesarray, npm tarball, or installedlocked-package artifacts); (c) not exempt by the Tier 3 FP guards below.
Auto-run persistence bridge in TTP form — renaming the payload file does
not evade.
R4 [TENTATIVE] — Strings
filev2.getsession.org,seed1.getsession.org,seed2.getsession.org, orseed3.getsession.orgappearing inside anexecutable context:
a
hooks.*.commandvalue, atasks.jsoncommand/argsfield, or afetch/http.get/axios/socket.connect/curl/nccall inside a.{js,mjs,ts,cjs,sh,py}file under.claude/**/.vscode/**.Documentation / README / IOC-note mentions do not fire.
FP guards (Phase 8 "FP rules" section)
~/.claude/skills/gstack/,~/.claude/skills/gstack-*/,~/.claude/hooks/when content matchesdistributed checksums.
.vscode/extensions/and inside any directory listedin the root
package.jsonworkspacesfield.Where this lands
All rules and FP guards are additive into the existing
### Phase 8: Skill Supply Chainsection ofcso/SKILL.md.tmpl(generated
cso/SKILL.mdupdated viabun run gen:skill-docs). No phaserenumbering, no scope-flag wiring changes, no
fingerprintschemachanges.
Test plan
/cso --comprehensive/csodaily mode (TENTATIVE-only routingconfirmed)
marketplaces,
--comprehensivemode.vscode/setup.mjsreferenced by atasks.jsonauto-run task —0 fire
Coordination
Detection-only. R3 (quarantine file or remove auto-run reference) and
R4 (quarantine the line) are mechanically auto-fixable once #1053
(
/cso --fix) lands. If #1053 merges first this PR is purely additive;different diff area.
References
https://safedep.io/mass-npm-supply-chain-attack-tanstack-mistral/
bypass)