Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/exploit/multi/misc/nodejs_v8_debugger.md
Views: 11784
Vulnerable Application
Current and historical versions of node (or any JS env based on the V8 JS engine) have this functionality and could be exploitable if configured to expose the JS port on an untrusted interface.
Install a version of node using any of the normal methods:
Distro:
sudo apt-get install nodejs
Alternately, use standard node docker containers as targets:
(Others at https://hub.docker.com/_/node/)
Tested on Node 7.x, 6.x, 4.x
Verification Steps
Run a node process exposing the debug port
Exploit it and catch the callback:
(If using docker hosts as targets for testing, ensure that LHOST addr is accessible to the container)
Note that in older Node versions (notably 4.8.4), the debugger will not immediately process the incoming eval message. As soon as there is some kind of activity (such as a step or continue in the debugger, or just hitting enter), the payload will execute and the handler session will start.
Scenarios
Example Run (Node 7.x)
Victim:
Attacker: