Reporting vulnerability checks performed during a scan

Nmap can be turned into a vulnerability scanner by using NSE scripts. The library vuln manages and unifies the output of the vulnerability checks performed by the Nmap Scripting Engine.

This recipe will show you how to make Nmap report the vulnerability checks that are performed.

How to do it...

Launch the NSE scripts in the vuln category against your target, by using the following command:

nmap -sV --script vuln <target>

If you are lucky, you will see a vulnerability report:

PORT     STATE SERVICE REASON
306/tcp open  mysql   syn-ack
 mysql-vuln-cve2012-2122:
   VULNERABLE:
   Authentication bypass in MySQL servers.
     State: VULNERABLE
     IDs:  CVE:CVE-2012-2122
     Description:
 When a user connects to MariaDB/MySQL, ...

Get Nmap 6: Network Exploration and Security Auditing Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.