Andy Mal
Andy is offline · heartbeat 61d ago

← all versions of 9remote

[email protected]

suspicious   confidence 62%   action isolate   analyzed 2026-09-20 21:31 UTC by dsv41-flash in 25 tool calls, with lab detonation

Summary

postinstall (dist/install.cjs) is benign: it creates ~/.9remote/runtime and spawns `npm install [email protected]` there (lab: blocked offline by a cert error; only ~/.9remote/runtime/package.json was written). The real risk is the package's purpose: the CLI (bin dist/cli.cjs) starts a local server, a cloudflared quick tunnel and pairs to the vendor relay (worker URL default https://dev.9remote.cc, dist/cli.cjs:74), then rewrites autostart entries (LaunchAgents plist / ~/.config/autostart / systemd user unit, dist/cli.cjs:19/74) and installs notify hooks into ~/.codex/config.toml while reading ~/.codex/sessions (dist/server.cjs:178/339/341). Install only inside a throwaway sandbox without credentials, and never run the `9remote` bin on a host that holds agent keys.

Intent

9remote is a real (and genuinely large) remote-access product — "your dev machine in your pocket" — not a disguised stealer: it exposes a shell/screen/file workspace to a phone through a Cloudflare tunnel plus the vendor's relay. What it really ships is a full unattended remote-control agent: login persistence, screen capture and input injection, clipboard, and code that rewrites other AI coding agents' configuration (~/.codex/config.toml notify hook) and reads their session history. Nothing in it proved credential theft or hidden payloads, but the capability set is far beyond "npm install me" and requires isolation.

persistence agent_config_tamper network_egress credential_access download_execute obfuscation reconnaissance clipboard_screen code_execution crypto_theft

Findings

postinstall writes outside the package and spawns npm (benign) low dist/install.cjs:3
dist/install.cjs:3 does `spawnSync("npm",["install","[email protected]","--no-save"],{cwd:~/.9remote/runtime})` after writing ~/.9remote/runtime/package.json, then chmods the tray binary. This is the standard 'fetch a helper binary via npm' pattern; no credentials, no exfiltration. Lab: exit 0, offline npm failure warned about, only /home/andy/.9remote/runtime/package.json created.
Package's purpose is unattended remote shell access through a vendor relay high dist/cli.cjs:74, dist/cli.cjs:193, dist/cli.cjs:198-199
The CLI starts a local HTTP server on 127.0.0.1:2208, spawns `cloudflared tunnel --url http://localhost:2208` (dist/cli.cjs:193) and pairs clients through a worker URL that defaults to https://dev.9remote.cc (dist/cli.cjs:74, overridable via NREMOTE_WORKER_URL). Anyone who completes pairing (permanent key / one-time key / `9remote approve <socketId>`) gets a PTY, file access, screen and clipboard on the host. Encryption (X25519 hostKey.json) is real, but the default routing host is a vendor *dev* endpoint.
Self-installing login persistence medium dist/cli.cjs:19,50,74
The CLI/daemon writes autostart artifacts without an interactive prompt: macOS LaunchAgents plist, Linux ~/.config/autostart entry or a systemd --user unit plus `systemctl --user enable` (dist/cli.cjs:19, dist/cli.cjs:50, dist/cli.cjs:74 writes z.darwin/z.linux/z.linuxSystemd and reloads the daemon). Windows uses HKCU\...\Run. README advertises a 'persistent PTY daemon' but not autostart-at-login, so this exceeds the documented behaviour.
Rewrites another AI coding agent's configuration and reads its sessions high dist/server.cjs:178, 339, 341, 432
dist/server.cjs installs/removes a `notify` hook in ~/.codex/config.toml pointing at a 9remote-notify.sh script (dist/server.cjs:339 E4e(Fn.codex(),...), :341 b4e() strips `# 9Remote-saved: notify` and `notify = [...9remote-notify.sh...]` lines) and reads ~/.codex/sessions/**/*.jsonl plus the Codex SQLite session DB (dist/server.cjs:178, :432) to render 'agent artifacts'. Modifying agent config and consuming agent conversation history is the agent-supply-chain pattern that matters even when nothing is stolen.
Full remote-control capability set shipped as dependencies/vendor binaries medium package.json:33-60, dist/vendor/scrcpy-server-v3.1, dist/bin/desktop-elevate.cs
node-screenshots, @hurdlegroup/robotjs (input injection), node-pty, multicast-dns, plus a vendored scrcpy-server-v3.1 (dist/vendor/scrcpy-server-v3.1), dist/bin/desktop-bridge.cs and dist/bin/desktop-elevate.cs (Windows elevation helper) and dist/assets/tray.ps1. Only active when the user enables remote desktop / mobile emulator, and it matches the product description ('Remote Desktop', 'Live Remote Emulator'), but it makes the package a complete RAT toolkit once installed.
Deliberately obfuscated shipped UI bundles low package.json:69, dist/ui/assets/index-CgmlJ9gQ.js
The Vite UI bundle dist/ui/assets/index-CgmlJ9gQ.js is built with the devDependency vite-plugin-javascript-obfuscator (package.json:69). I found no eval()/new Function()/atob() in it, so there is no evidence of a hidden payload, but shipping obfuscated front-end code hampers review for no functional reason. The many 'obfuscation' hits elsewhere are ordinary minified Next.js/webpack chunks.
Lab report read-through info lab report
andy_detonate ran both hooks offline: postinstall exit 0 (npm install of systray2 failed with DEPTH_ZERO_SELF_SIGNED_CERT), entry require() failed because optional dependency node-pty is not installed in the lab. Only DNS name contacted: registry.npmjs.org. One connect() to 127.0.0.1:53 (the package replaces dns.lookup with Cloudflare/Google resolvers, dist/cli.cjs:11). /home/andy/.gitconfig was read, but no 'gitconfig' string exists anywhere in the package, so that is npm's own read, not the package's.
Prescreen false positives ruled out info dist/web/icons/file-types/pdf.svg
dist/web/icons/file-types/pdf.svg 'long_encoded_blob/browser_theft' is an embedded base64 PNG icon; the 'ransomware'/'crypto_wallet' tags on Next.js chunks (KaTeX, xterm, monaco) are word matches in minified vendor code; no mnemonic/seed-phrase/keystore logic exists anywhere in the package.

Lab evidence

Install hooks ran in the isolated lab. Processes spawned: 8. Hooks: postinstall (exit 0), require (exit 0).

DNS names requested: registry[.]npmjs[.]org

Direct connections: socket 127[.]0[.]0[.]1:53

Canary credential files read: /home/andy/.gitconfig

Files written outside the package: /home/andy/.9remote/runtime/package.json