Getting ready

  1. First, will use the services command to display the results from our previous nmap scan and filter for ports 139 and 445:
msf > services -c port,info -p 139,445 192.168.216.129

Services
========

host port info
---- ---- ----
192.168.216.129 139 Samba smbd 3.X - 4.X workgroup: WORKGROUP
192.168.216.129 445 Samba smbd 3.0.20-Debian workgroup: WORKGROUP

msf >
  1. Now that we know the version of the Samba daemon running, we can search for vulnerabilities and then use the search command to search for available exploits.
By doing some research online for Common Vulnerabilities and Exposures ( CVE) related to Samba 3.0.20 on https://www.cvedetails.com, we can find some vulnerabilities we can exploit.
  1. Using the search command and filtering by CVE, setting the type to display only exploits and the keyword samba, we get a couple of exploits that we might be able to use. Since we have an exploit with the rank of excellent we will check that first.