Metasploit Lab
Metasploit Lab
TP
1) The recognition stage:
1-1 At this stage, the pentester attempts to find IP addresses, domain names, DNS,
In our lab, we will find only the IP of the vulnerable machine (Metasploitable) using the
Command:> ifconfig
1-2 Now we have the @ IP, we will test the connectivity between Kali Linux and the test machine.
At this stage, we focus on open ports and the services used, then we move on to the analysis of
Vulnerability if you have Nessus you will use it otherwise if there is no internet connection
We will just use nmap, the famous tool, with a simple script just to understand it.
Methodology.
1-1 Launch the command > nmap -sS @ip which will execute quickly and allows
the scanner:
1-2 After analyzing the open ports and the services used, we will execute the command
Nmap -script vuln allows you to see some risks that could harm the machine.
1-3 We choose the vulnerability that will allow us to penetrate the system
The use of Nessus allows us to quickly identify the most dangerous vulnerability.
1-1) Start metasploit by typing: > msfconsole. (this may take a few minutes)
1-3) The research will present us with some exploits to use, so we choose the exploit:
N.B :
Payload – the code to be executed on the system once the vulnerability has been exploited.
1-4) Know the payloads that I can use with the exploit I have chosen. Type:
> Showpayloads
Exploit
Now we are in the vulnerable machine to know our position we launch the
command: > whoami
4) The privilege escalation stage: