Skip to content

Latest commit

 

History

History
93 lines (44 loc) · 3.67 KB

Vulnerability assessment using Metasploit.md

File metadata and controls

93 lines (44 loc) · 3.67 KB

Linux machine metasploitable2

image

ifconfig

image

Scanning the machine with nmap

For scanning the machine we use the command nmap -sV <ip>

image

We can see that there many services let's take any two and try to exploit it.

First go with vsftpd 2.3.4 lets search in metasploit database using the search command

image

So there is exploit for this lets select that exploit

image

We have selected the payload let see the options

image

After setting the host, running the command we were able to get root shell access into the metasploit system

image

Samba is running on port 139 and 445 so we will use a samba based exploit next

image

image

selected the exploit, now to adding the RHOST

image

image

After the running exploit we get a root shell

image

So we can see that we are in the target machine a we have full access

Windows 10 Machine

This the target windows machine

image

Let's try get access to that machine using a reverse shell when get executed in the windows machine will give reverse connection to attacker machine.

image

created a payload.

Sending the payload by addigd it in the html directory under /var/www/html/

image

image

So we downloaded file target machine let's setup the listener We use exploit multi hander to interact with payload

image

image

We have to set the LHOST that is the ip of the attacker machine

image

Run the payload2.exe file after turning on the listener in attacker machine.

image

image

Now as you can see we got access to the victim machine.