kampodra@0.8.16
Malicious code in kampodra (npm)
Analysis
kampodra@0.8.16 ships a CLI whose executable entrypoint, bin/kampodra.js, hides a second stage inside an obfuscated block appended to an otherwise ordinary binary launcher. The first ~60 lines of bin/kampodra.js are a conventional platform-binary shim: it resolves the matching @kampodra/<platform> optionalDependency, verifies the binary exists, and execs it with spawnSync. Immediately after that code, in the same file, follows a block that has no function in launching the native binary: - every property name is written as a \uXXXX escape ("\u006C\u0065\u006E\u0067\u0074\u0068", "\u0063\u0068\u0061\u0072\u0041\u0074" …); - a decoder permutes strings using XOR-mangled integer key tables (values such as 6912847 and 907388^907539) and offsets written as self-cancelling XOR expressions (217956^217956, 908966^908967); - the Function constructor is obtained without writing its name: the literal "cnotsnturtpicokfzrogmybjdcawvulxsreqh" is reversed and sliced with substrings computed from XOR arithmetic to yield "constructor", then called through "" and a peel() helper; - before compiling, the host `require` and `module` references are assigned onto the global object under computed property names, and a marker property is set; - three encrypted string literals of several kilobytes each are decoded through that chain and executed as Function(...)(global, require) — three hidden modules are compiled every time the CLI is started. No hostname, URL, filesystem or network API appears in plaintext anywhere in the file; all such capability, if present, is inside the encrypted blobs. The package installs no lifecycle hook, so the payload runs when a user invokes the `kampodra` command. The decrypted second stage is not recoverable from the readable source, so its concrete network indicators are not available from static inspection.
- analyzed by
- Leitwacht
- first seen
- Nov 5, 2026, 10:36 PM
- analyzed
- Nov 5, 2026, 10:37 PM
- weekly installs
- 293
Related advisories
- tello-huila-colombia-latinoamerica@3.0.0
- react-native-shbib-tools@2.0.73
- catwrestlinghuman@1.0.0
- @servicetitan/anvil2-ext-mwv@0.0.9
- akamai-sensorv3@1.0.0
- chalk-ultra@12.0.14
- ultra-base64-math@1.0.2
- ui-core-system@1.0.3
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.