20. Vulnerability Scanning and Assessment
20.2 Manual Lookup: searchsploit and Exploit-DB
Chapter 19 chya -sV scan madhun aaplyakade versions aahet. Pratyek version sathi aapan known vulnerabilities shodhu shakto. Kali madhe Exploit-DB chi offline copy aahe, aani tyala shodhnyacha tool mhanje searchsploit.
searchsploit -u # update the local Exploit-DB copy
searchsploit vsftpd 2.3.4 # search by product and version
searchsploit apache 2.2.8
searchsploit samba 3.0.20
searchsploit -x unix/remote/49757.py # read an entry (path from the results)
searchsploit -m unix/remote/49757.py # copy it to the current folder to study
nmap -sV -oX msf2.xml 192.168.56.20 && searchsploit --nmap msf2.xml # search every version from a scan
For every service you find, make a row in your notes:
| Port | Service and version | Known issue | CVE | Source |
|---|---|---|---|---|
| 21 | vsftpd 2.3.4 | Backdoor in that release | CVE-2011-2523 | NVD, Exploit-DB |
| ... | ... | ... | ... | ... |
Never run exploit code you have not read
Code downloaded from the internet can contain mistakes or even malware that attacks you. Read it first, understand what it does, and run it only against your lab. In the next chapters we use Metasploit modules, which are reviewed and maintained.
Ravindra Bagale's Tip
searchsploit shows many results, so students just take the first one. Check that the version matches exactly – an exploit for "Apache 2.2" will not work on "Apache 2.4". And always confirm the CVE on NVD.
Ravindra Bagale's Tip – मराठी
searchsploit मध्ये खूप results येतात म्हणून students पहिलाच result घेऊन चालवतात. Version exactly match होतोय का ते बघा – "Apache 2.2" साठीचा exploit "Apache 2.4" वर चालणार नाही. आणि नेहमी NVD वर CVE confirm करा.
Ravindra Bagale's Tip – हिंदी
searchsploit में बहुत results आते हैं, इसलिए students पहला result लेकर चला देते हैं. देखो कि version exactly match हो रहा है – "Apache 2.2" वाला exploit "Apache 2.4" पर नहीं चलेगा. और हमेशा NVD पर CVE confirm करो.
Lab
Take the service list from your Chapter 19 scan of Metasploitable 2. For at least five services, search with searchsploit and look up the CVE on NVD. Fill in the table above with the CVSS score of each.