Quantcast
Channel: d0wn
Viewing all articles
Browse latest Browse all 73

Create a simple reverse shell using bash

$
0
0

In some cases you need to send to a distant person or computer a shell.

For example, I have trouble getting a Cisco router to work correctly. And know somebody that will find and fix the issue for you .

The trouble is, I’m behind a nat firewall and he can’t connect to me.  We could use some remote desktop program like TeamViewer or Chrome remote desktop. But there is a cooler way!

we could use a bash functionality to send him a shell. Often called a reverse shell.

First on your client computer , the one that will receive the shell you must start listening on a tcp port of your choice.

For this, we will use the netcat utility

On your server computer, the one with the shell that you want to give access to a remote computer

Type this command,:

 

that will send the shell to the ip 1.2.3.4 on the port 2222
You can launch the command followed by a disown so you can close your terminal.

Note that the traffic is not going to be encrypted , this is not ssh


Viewing all articles
Browse latest Browse all 73