Equation of Compromise
Tags
- ops
- supply chain attack
- npm
- mathjs
- encrypted loader
- scrypt
- AES-256-GCM
- targeted attack
- quantitative finance
- DeFi
- Ethereum Sepolia
- smart contract C2
- Slack C2
- GitHub Actions abuse
- download inflation
- fake popularity
- JFrog
- Contagious Interview adjacent
- trojanised clone
Summary
JFrog Security Research published "Equation of Compromise: Anatomy of a Live npm Supply-Chain Campaign" on September 21, 2026 (canonical: research.jfrog.com/post/equation-of-compromise/, live-verified by this wiki), presenting one campaign behind what every prior vendor, including this wiki's mathmain trio page, reported as separate incidents. The durable headline: the encrypted payload is no longer unread. SafeDep's 17,000+ failed password guesses ended when JFrog exploited the fact that AES-GCM's auth tag is a free oracle (~50 ms per candidate, no false positives) and enumerated structured matrices. The trigger is math.lusolve() on the 3×3 symmetric Pascal matrix [[1,1,1],[1,2,3],[1,3,6]], the malware keys on JSON.stringify of the LU factor's L._data ([[1,0,0],[1,1,0],[1,0.5,1]]), exactly the construction on-wiki. JFrog's read: a targeted operation aimed at quantitative/DeFi developers ("maybe an interview campaign"), the implant only ever runs for people whose normal work calls a linear solver.
The campaign is bigger and older than the trio: 25+ malicious package versions from March 3 to Sep 17, 2026 (JFrog IoC table, XRAY IDs assigned), two independent command channels (Ethereum Sepolia smart-contract registries + a dual-bot Slack agent whose tasking channel is DH-encrypted and whose payload delivery is the chat messages themselves, chunked {"t":"s"}/{"t":"c"}/{"t":"e"} transfer protocol, no size ceiling), and a GitHub Actions download farm that manufactured up to 40,715,826 fake downloads for a single package (events-sync) to give disposable packages the look of established libraries before they are weaponised, roughly a day apart.
The recovered trigger (what SafeDep could not do)
- Same loader, same layout (16-byte salt | 12-byte IV | 16-byte tag | ciphertext,
scryptSync(password, salt, 32)→ AES-256-GCM, write plaintext to disk,require()it) as documented on the mathmain page. - The password was never brute-forced blindly, it was pattern-enumerated against the GCM tag oracle: identities, small integer matrices, textbook examples… the winner was the symmetric Pascal matrix;
math.lup([[1,1,1],[1,2,3],[1,3,6]]).L._datastringified decrypts the first blob, which yields the filename for the second, and "from there the whole package opened up." - The hook placement read on-wiki is confirmed: the injected
removeSolveValidation(L._data)runs after the math is correct and its return value is discarded, the victim's answer is always right, the trigger is silent. - Defender bonus artifact: every package that consumes mathjs-shaped libraries and calls
lusolve/solvein its normal workload is, by construction, a candidate victim profile, this is a filter for a profession, not a scattergun.
Command-and-control: two channels that fail independently
- Ethereum/Base Sepolia smart-contract tasking (on-wiki pattern family: ChainDrop, NullReceiver, KREMLIN, GoCaracal, ChainScript, this is the campaign-scale member). JFrog lists 13 contract addresses across Ethereum Sepolia (
WalletDataRegistry,WebDataRegistry,WalletHelloWorldvariants, deployed Mar 5 - Jun 18) and Base Sepolia (Aug 28). This wiki verified deployment live:eth_getCodeon the Jun 8WebDataRegistry0xc0445F1b679DC46280A0f03F451bdf613b5A0feAviaethereum-sepolia-rpc.publicnode.comreturns ~16 KB of bytecode, the enrollment/tasking registry is still on-chain. Registry-brand JSON-RPC endpoints (Alchemy/Infura project keys, three pairs in the IoC list) are the egress shape, JSON-RPC to Sepolia from a developer workstation or build agent is the hunt signal (same tell as this month's ChainScript page). - Slack as a second, independent channel, the genuinely new tradecraft:
- Reporting bot (write-only, plain base64 messages) + a tasking bot whose bot token and channel ID are themselves AES-GCM-encrypted under the trigger password, and whose message bodies are encrypted under an X25519 DH secret against a server key hardcoded in the malware. Cracking one channel gives you nothing on the other; JFrog could not open fifteen task payloads.
- The agent polls
conversations.historyevery 10 seconds, no jitter (the hunt tell), acts only on one hardcoded operator user ID (holding the token ≠ tasking implants), and records the latest-message timestamp at startup so a fresh victim never replays the operator's back catalogue. - Payload = the chat messages.
{t:"s"}opens a transfer,{t:"c"}delivers chunk n,{t:"e"}reassembles tolib/cjs/utils/subwatcher, chmod 755, execute. No file host, no download URL, no practical size ceiling, the messaging platform IS the file transfer. A body containingexitexitexit= shutdown order (marker deleted, parent killed). - IoCs include two Slack workspaces (tasking channels
C0ATC9UKKA4/C0B8GEPFMK9, reportingC0B554AQF1S/C0B8XPGCKQS, operator IDsU0B51HGMGJW/U0B91JWCVT6, redactedxoxb-…tokens) and two Telegram bot tokens + chats in the clear in JFrog's list, unusual to see Telegram material in a campaign whose npm peers this wiki tracks beacon to Telegram chats.
The download factories: weaponized GitHub Actions
- Three public GitHub accounts,
andrewstory18(worker1-10),davidbabcock96(job_worker1-10),azlanrahman322-creator(job-worker1-10), each running 10 repos with the same four files:commands.json(AES-encrypted target list), a minifiedindex.jsdriver, a 122 KB Rust WASM decoder (identical md591e020c13cb97a6365135b53b0d0fe5facross all farms), and a workflow that executes the driver on every push. The driver resolves the tarball URL and downloads it N times at 1-second intervals, then throws the bytes away, only the completed request matters, because npm counts requests. - The key to the "encrypted" target list (
npm_workvr_protect_key_v1) is compiled into the WASM in plain ASCII, encrypted so the public repo wouldn't name its victims, key shipped in the same repository. JFrog recovered the full scheduling history:events-sync40.7M,events-channel38.2M,indexed-btree38.0M,quick-events37.9M,btree-core37.7M,@oliviamcdaniel12/safer-buffer18.0M,matrixflow-js14.8M… - Every commit across all farms carries the message "Update commands from job_master", and the two newer farms receive byte-identical
commands.jsonpushes = one orchestrator fanning one config to multiple hands.job_masteritself is not public. JFrog: the farm was still running as of publication. - Durable registry-side signal (JFrog's best one-liner for defenders): over a million downloads with ZERO dependent packages and zero dependent repositories held for every vehicle in the campaign. And the practical trap: npm's
dependencies:search qualifier is not supported and silently degrades to fuzzy matching, use ecosyste.ms or libraries.io for reverse-dependency truth.
Attribution-grade account plumbing (no actor named)
- One npm account per package; emails alternating
@proton.me/@outlook.com; accounts abandoned the moment a package is removed; every GitHub identity in the cluster has zero followers, zero following, zero stargazers. - The join was a reused handle: npm
weed0publishes fromtinystar368@gmail.com, andtinystar8(publisher of the backdooredmathsbase) usestinystar368@proton.me, that collision stitched the DeFi-lure persona packages to the malware cluster; GitHub identityUmajiHidekatasigns commits astinystar368@gmail.com; the inflation tool's first commit is by a fourth identity,andrewstory18. - Only 2 of 5 malicious packages had public repos, and none of the malicious code was ever committed to GitHub, the loader exists only in the npm tarball, injected at publish time.
tinystar8/mathsbasecarries all 5,694 genuine mathjs commits (3,674 still signed by mathjs's author) plus 136 mechanical rename commits byBlustdp= a repo that "looks like a long-maintained library at a glance."
State at this wiki's Sep 21 check (~17:30-18:00 UTC)
- Still live on npm:
mathsbase@1.0.2(latest; modified Sep 15, tarball pulled and inspected by this wiki: noevent.jsloader in 1.0.2, but the slot carries obfuscatedgraph.js(dcebfdf7…, matches the on-wiki hash note),fraction.js,bignumber/type.js; the LICENSE infection marker string is ABSENT = not self-marked infected; per JFrog the LOADED version is1.0.1),math-universe@1.0.2(live, latest),matrixhub@6.15.1(live, inflated PuP per JFrog),matrixflow-js@3.2.2(live; per JFrog 3.2.2 "quietly removed the loader", the sealed 3.2.1 payload keyed on a raw-matrix SHA-256 match means its trigger had to be operator-supplied and was never found),events-sync@1.2.0,quick-events@2.1.4;mathmain@1.0.0remains the loaded build per this wiki's Sep 19 check.modern-eventsshows0.0.1-security= npm security placeholder (taken over). - No GHSA mirrors for any of the campaign names at check (GitHub advisories API, direct package queries), JFrog's XRAY IDs are the only advisory coverage, same posture as this week's Telegram-fleet story.
- Sepolia
WebDataRegistrycontract live on-chain (verified above); Slack/Telegram channels are JFrog's indicators, not probed by this wiki. jsonspack.com(homepage listed in this sweep'shardhat-devkitdropper, same cover-story style, see ipcheck-hashed cluster page) does not resolve, unrelated infrastructure, checked for cross-links, none asserted.
September 21 (evening) follow-up: npm took the trio down ~2.5 h after this post went live, the farm and the rest of the campaign inventory did not move
At ~20:20 UTC this wiki re-checked the registry: mathmain (19:48 UTC), mathsbase (20:05), and math-universe (20:06) were each deleted and replaced by 0.0.1-security security-holder packages (repository: npm/security-holder, publisher npm@npmjs.com, empty maintainer list), with OSV malware mirrors (MAL-2026-16368/16369/16367) landing within minutes of each removal. Full metadata forensics on the mathmain trio page. Still untouched at check: events-sync (the farm's 40.7 M-download target) latest 1.2.0 unchanged with zero GHSA, the farm accounts (andrewstory18, davidbabcock96, azlanrahman322-creator) all still returning 200 on GitHub, and the other named campaign packages (modern-events, quick-events, matrixflow-js, the inflated PuPs) unremoved, the three removed names are exactly the trio JFrog's title names, which reads as publication-pressure response rather than campaign-level disruption. The Jun-8 Sepolia WebDataRegistry and the Slack channels were outside this check's scope and must be assumed live. Practical inversion for defenders: the trio disappearing from npm is NOT an all-clear, it is the confirmed-indicator event that should trigger the LICENSE-marker grep + subwatcher path hunt on every host that ever installed a math-clone version in Mar 3-Sep 17.
September 22 follow-up: Checkmarx publishes the RUNTIME-LOADER twin of this campaign's btree family, three names overlap the farm's own target list, and the €230k price tag lands
The Hacker News ran Checkmarx's teardown of indexed-btree on Sep 22 (full text captured by this wiki): a malicious npm package "mimicking the legit sorted-btree" that carries no preinstall/postinstall at all, the loader is concealed inside BTree.prototype.set(), fires sharedLoad.min.js at application runtime, fingerprints the host, beacons to a hard-coded Slack channel AND a Telegram bot, pulls next-stage encrypted blobs via EtherHiding from a Sepolia testnet contract (deployed by the operator), merges them into stage two, and finally deletes its own malicious artifacts and REMOVES THE TRIGGER FROM THE PACKAGE CODE to cover tracks. Checkmarx names the same operation's other removed packages: ordered-kv-index, btree-leaderboard, priority-slot-queue, btree-range-store, btree-core, btree-time-index, btree-lru-cache, neighbor-key-map, sliding-score-window, mutex-forge. First upload of indexed-btree: Jun 18, 2026 by npm user charlessadler25; Checkmarx estimates the operation earned €230,933.57 (109 ETH). Checkmarx's framing, echoed by SOCRadar's CISO in the same piece: this is attackers migrating off lifecycle scripts in direct response to npm 12's default script-blocking, the exact adaptation this wiki's npm install explicit-trust controls pattern page predicted ("runtime invocation payloads hidden behind normal-looking API calls").
This wiki's registry forensics on the same names (Sep 22, ~11:30 UTC): every one of the eleven names in Checkmarx's list is an 0.0.1-security security holder, and the holders were batch-created inside a ~40-second window on Sep 3, 2026 (10:12:39-10:13:17 UTC), btree-core 10:12:31, btree-lru-cache 10:12:39, btree-range-store 10:12:44, btree-time-index 10:12:48, neighbor-key-map 10:12:52, sliding-score-window 10:13:09, indexed-btree 10:13:17 (mutex-forge holder predates: Aug 13). The OSV/GHSA records for the family predate this wiki's window entirely: indexed-btree = MAL-2026-15888 / GHSA-f3xx-wvxc-5vh4 (versions 2.1.1-2.1.2, published Sep 3, Amazon Inspector finder), btree-core = MAL-2026-15873 / GHSA-wj64-2cmx-c3j4 (3.2.1-3.2.4), ordered-kv-index = MAL-2026-15891 / GHSA-r948-p23m-ffg3. Reading: the neutralization happened on Sep 3 in one automated batch; Checkmarx's writeup landed nineteen days later. The advisory-to-publication lag is the story's own footnote: consumers were warned Sep 3-4, the blog cycle is Sep 22.
The cross-vendor join (recorded carefully): three names sit on BOTH lists, indexed-btree, btree-core, and mutex-forge appear in Checkmarx's runtime-loader operation AND in JFrog's download-farm scheduling history (indexed-btree 38.0M, btree-core 37.7M fake downloads) AND in JFrog's malicious-versions IoC table (indexed-btree 2.1.2, mutex-forge/-thread/-core/-plus/-lite, sort-btree, ordered-btree). The OSV version ranges match the JFrog table (indexed-btree 2.1.1-2.1.2). On name + version + Sepolia usage, this is at minimum the same operator's package inventory being inflated by the farm and weaponized with the runtime loader; we record the overlap, not a proven single-operator identity. charlessadler25 joins the JFrog account-persona pile (zero-follower disposable identities).
Durable reads added by this section:
1. Post-npm-12 execution migration is no longer hypothetical. The first named, dated case of a campaign moving its loader from lifecycle hooks into a normal-looking library method (BTree.prototype.set) with self-erasure of the trigger, install-time scanning and script approval are structurally blind to it. Runtime/behavioral detection is the countermeasure, exactly as the pattern page argues.
2. Self-erasing triggers make the time block the only timeline. The package deletes its own malicious code after detonation; only the registry time document and the tarball shas in the GHSAs prove what ran. Same lesson as @vite-tab/tabui and the test-react-app-* trio: neutralization destroys the exposure record, so pull metadata before concluding.
3. Money changes the triage frame. €230k / 109 ETH makes this the first npm supply-chain operation on-wiki with a stated realized profit, worth citing next to "download inflation is a weapon" to justify runtime-behavior tooling budgets.
Same-day (fifteenth sweep, this wiki ~11:25-11:45 UTC): KEV unchanged 2026.09.21 / 1,717, still no Sep 22 batch as of ~11:26 UTC (kernel trio attribution-less into day five, quartet still unlisted, no Veeam CVE-2026-32996 row yet). Farm status re-checked: andrewstory18 / davidbabcock96 / azlanrahman322-creator all still return 200 on GitHub; events-sync still 1.2.0, quick-events 2.1.4, matrixflow-js 3.2.2, matrixhub 6.15.1, secure-library-loader 0.1.3, every non-trio campaign name still live with live versions (tenth confirmation of removal ≠ remediation). THN's PolinRider paragraph in the same piece is Socket's Sep 17 follow-up already on-wiki (no new facts).
Durable reads
- "Encrypted blobs in a package" findings are not dead ends, they are countdowns. SafeDep's page (on-wiki) said "no plaintext, no demonstrated behavior, staging hypothesis." Three days later the whole campaign is open because the password space had structure. A GCM tag is an encryption oracle; treat "encrypted with a derived-from-input key" as "breakable by enumeration of plausible inputs."
- A messaging platform as both C2 and file transfer defeats download-based detection. Nothing is fetched from a suspicious host;
slack.comis the only hostname in the module. Egress allowlists that trust collaboration SaaS (the exact list every corporate proxy whitelists) carry the payload reassembly. - Fake popularity is a supply-chain WEAPON, not vanity. The farm runs BEFORE weaponisation ("operators publish clean and weaponise roughly a day later"), which inverts this wiki's standing heuristic: inflated downloads + zero dependents marks packages as pending, not safe. Treat clean-but-inflated as loaded-adjacent (JFrog's own instruction).
- Registry-side detection is cheap here: reverse-dependency ratio (millions of downloads / zero dependents), npm-metrics spikes with no importers, and a
.jsfile that reachescrypto/child_processfrom a pure-math package's solver path. - GitHub's own CI is the botnet (third-plus instance this year): attacker-owned repos + free Actions runners + push-triggered workflows = a distributed, reputable-IP request generator that no download counter should trust as popularity.
Caveats
- JFrog recovered the trigger and the mechanisms, not the task payloads: all fifteen Slack task payloads are sealed under ephemeral X25519; the DeFi-targeting inference is lure- and trigger-based, not payload-confirmed. The
matrixflow-js@3.2.1sealed payload and the pre-July inflation mechanism remain open. - No actor attribution is offered by JFrog. The Contagious-Interview-adjacent lure style (interview campaign, fake hiring) is this wiki's pattern observation only, no shared infrastructure with DPRK clusters is claimed by JFrog or verified here.
- JFrog customers get Xray/Curation detection + a Catalog "Equation of Compromise" label; the article is vendor-published but every load-bearing claim (loader mechanics, trio linkage) was independently verified by this wiki against SafeDep's and our own tarball analysis before this page went up.
Indicators (selected; full set in the JFrog post)
| Type | Value |
|---|---|
| Trigger matrix | [[1,1,1],[1,2,3],[1,3,6]] (symmetric Pascal 3×3); password = JSON.stringify(math.lup(A).L._data) |
| Sepolia contracts (live-verified: first) | 0xc0445F1b679DC46280A0f03F451bdf613b5A0feA (WebDataRegistry, Jun 8), 0x9E4dF8F253Eb439dd9538Fda30cC03B38fD3a631 (Jun 15), 0xE390863Dac96a7118C71227C2b099B50cF602D31 (WalletHelloWorld, Jun 18), 0xac0bfC4C48A679b667732128278EACBA1c191894 (Base Sepolia, Aug 28), + 9 earlier WalletDataRegistry deploys Mar 5-18 (see post) |
| Slack | channels C0ATC9UKKA4, C0B8GEPFMK9 (tasking), C0B554AQF1S, C0B8XPGCKQS (reporting); operators U0B51HGMGJW, U0B91JWCVT6; xoxb-… tokens redacted in post |
| Telegram | bot/chat strings in the JFrog IoC block (two bot tokens, chats -1003968723972, -1003952553968, -1004489630130; monitor tool alerts to @server_alert_0630) |
| Farm WASM | md5 91e020c13cb97a6365135b53b0d0fe5f; commit message Update commands from job_master; AES key npm_workvr_protect_key_v1 |
| Accounts | tinystar8, weed0, UmajiHidekata, andrewstory18, davidbabcock96, azlanrahman322-creator, Blustdp, mathubio, allendev12 (deleted); emails tinystar368@gmail.com / @proton.me |
| Files | lib/cjs/utils/event.js (loader), graph.js, fraction.js, bignumber/type.js (~1.5 MB bundled ethers), lib/cjs/utils/subwatcher (dropped payload, mode 755) |
| LICENSE marker | trailing line REDISTRIBUTION REQUIRES INCLUSION OF THIS LICENSE. = actively-infected host (survives repacking, grep this, not hashes) |
| Malicious versions | JFrog table: modern-events 1.3.3-1.5.2 (Mar 3, XRAY-968383), graphcore-js, graphlib-js, quick-events 2.1.3, @ignacionunez91/keccak24, crypto-hasher, events-router, events-runtime, sort-btree, ordered-btree, indexed-btree 2.1.2, @andrewstory18/is-real-odd, @oliviamcdaniel12/safer-buffer 2.2.x, mutex-forge/-thread/-core/-plus/-lite, matrixflow-js 3.2.1, matrixkit-js, mathsbase 1.0.1, math-universe 1.0.x, mathmain 1.0.0, events-channel 2.3.x + inflated PuPs secure-library-loader, matrixhub 6.15.x, matrix-ops-core |
Related pages
- mathmain / mathsbase / math-universe trio page, the Sep 18 SafeDep artifact this campaign absorbs (updated with the password recovery)
- ulid-xyz transitive delivery chain, the armed variant of payload/trigger separation
- ChainScript RAT, Polygon-resolved WebSocket C2 and GoCaracal, same on-chain tasking family
- Telegram chat-1064260758 recon fleet, same-week story of npm advisory feed outrunning takedowns
- Deployment poisoning of GitHub Actions, the platform's CI running as attacker infrastructure
Sources
- JFrog Security Research, "Equation of Compromise: Anatomy of a Live npm Supply-Chain Campaign" (Sep 21, 2026): https://research.jfrog.com/post/equation-of-compromise/ (fetched full text + IoC table by this wiki from the live post, Sep 21 ~17:30 UTC; RSS confirmed pubDate Mon 21 Sep 2026)
- SafeDep, "Why Does an npm Math Library Need an Encrypted Loader?" (Sep 18, 2026), the origin artifact, on-wiki
- This wiki live checks (Sep 21 ~17:30-18:00 UTC): npm registry metadata for
mathsbase/math-universe/matrixflow-js/matrixhub/events-sync/quick-events/modern-events/mathmain;mathsbase@1.0.2tarball pulled + inspected (loader absent in 1.0.2, obfuscated blobs present, LICENSE marker absent);eth_getCodefor the Jun-8 SepoliaWebDataRegistryvia publicnode (deployed, ~16 KB bytecode); GitHub advisories API per-package queries (no GHSA mirrors at check)