LWA-2026-13879 MAL-2026-19143 ↗ confirmed malware

mock-data-sdk@1.0.1

Malicious code in mock-data-sdk (npm)

T1027 · Obfuscated Files or InformationT1027.013 · Encrypted/Encoded FileT1059.007 · JavaScriptT1082 · System Information DiscoveryT1105 · Ingress Tool Transfer

Analysis

mock-data-sdk@1.0.1 ships a hidden loader behind the API of a mock-transaction-data generator. `index.js` defines an XOR-obfuscated string table (`_0x1a2b`, eight arrays of hex character codes XOR-decoded into the identifiers Buffer, require, process, setTimeout, clearTimeout, try/catch) and an undocumented export `get_transfer_data`. When a consumer calls the documented `getTransactions()`, the package calls that hidden function inside an empty try/catch: it reads the bundled `data/products_1.js` … `data/products_10.js`, concatenates the 4-character `mark` field of every fixture record (roughly 700 records) into one base64 blob — `data/_index.js` records the decoded length as 2008 bytes — base64-decodes it, and executes the result with `Function(Buffer, require, process, code)`, handing the decoded script full access to Buffer, require and process. The concatenated fragments decode to JavaScript source beginning `const os = require("os")`, i.e. a host-fingerprinting stage; the second stage is deliberately split into four-character chunks across the shipped data files so that no single file contains the payload. Nothing runs at install time — there is no lifecycle hook — so the loader only fires when the library's main API is called, and all errors from it are silently swallowed. Stage 1 contains no network literal; the network/process capability available to the decoded stage comes from the declared axios and python-shell dependencies, which `index.js` itself never uses. No C2 host or URL is observable in the readable layer of the package; the IOC set is structural: `index.js` (`get_transfer_data`), the XOR string table `_0x1a2b`, and the `mark` fragment carriers in `data/products_1.js`–`data/products_10.js`.

analyzed by
Leitwacht
first seen
Nov 10, 2026, 06:05 AM
analyzed
Nov 10, 2026, 06:09 AM

Related advisories

browse all confirmed advisories →

Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.