LWA-2026-13696 MAL-2026-18738 ↗ confirmed malware

kampodine@0.8.0

Malicious code in kampodine (npm)

T1059.007 · JavaScriptT1027 · Obfuscated Files or InformationT1140 · Deobfuscate/Decode Files or InformationT1195.002 · Compromise Software Supply Chain

Analysis

kampodine@0.8.0 ships a hidden code loader inside its CLI entrypoint, cli.js, which is the package's `bin` target and therefore runs on every invocation of the `kampodine` command. The file looks like an ordinary command dispatcher until, immediately before its usage/dispatch logic, a ~2.5KB minified block executes at top level: it rebuilds identifiers from character-permuted strings (for example "c^mejb^tro" is decoded to the member name "constructor", and a further decode yields the literal string "constructor", used to reach the JavaScript `Function` constructor), then decrypts two large encoded blobs and compiles and runs them via `Function("", decryptedSource)`. This decrypt-then-execute chain is invoked with `global` and `require` passed into it, so the concealed stage has full CommonJS access to node modules (child_process, fs, http/https), the process environment and the filesystem. A 6-element integer key set, written as xor expressions such as `907388^907539`, is used for the character/byte permutation; the encoded blobs are stored inline after the command table. Every documented feature of this tool is implemented in plainly readable shell scripts under scripts/ (deploy.sh, bluegreen.sh, vm-prepare.sh, etc.), so the encrypted stage serves no part of the advertised functionality, and no plain-text URL, host or IP appears anywhere in the readable code — all outbound logic is confined to the concealed payload, which is decrypted only at run time.

analyzed by
Leitwacht
first seen
Nov 5, 2026, 07:05 PM
analyzed
Nov 5, 2026, 07:06 PM

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.