Vulnerability scanning with Nmap

There are no security operating distributions without Nmap. So far, we have discussed how to utilize Nmap during active reconnaissance, but attackers don't just use Nmap to find open ports and services, but also engage Nmap to perform the vulnerability assessment. As of March 10, 2017, the latest version of Nmap is 7.40 and it ships with 500+ NSE scripts, as shown in the following screenshot:

Penetration testers utilize Nmap's most powerful and flexible features, which allow them to write their own scripts and also automate them to simplify the exploitation. Primarily, the NSE was developed for the following reasons:

  • Network discovery: The primary purpose that attackers utilize Nmap for is network discovery, as we learned in the active reconnaissance section in Chapter 3, Active Reconnaissance of External and Internal Networks.
  • Classier version detection of a service: There are thousands of services with multiple version details for the same service, so Nmap makes it  more sophisticated to identify the service.
  • Vulnerability detection: To automatically identify vulnerability in a vast network range; however, Nmap itself cannot be a full vulnerability scanner in itself.
  • Backdoor detection: Some of the scripts are written to identify the pattern of backdoors. If there are any worms infecting the network, it makes the attacker's job easy to narrow down and focus on taking over the machine remotely.
  • Vulnerability exploitation: Attackers can also potentially utilize Nmap to perform exploitation in combination with other tools such as Metasploit or write a custom reverse shell code and combine Nmap's capability with them for exploitation.

Before firing up Nmap to perform the vulnerability scan, penetration testers must update the Nmap script database to see whether there are any new scripts added to the database, so that they don't miss the vulnerability identification:

nmap --script-updatedb

Use the following to run all the scripts against the target host:

nmap -T4 -A -sV -v3 -d -oA Target output --script all --script-argsvulns.showall target.com
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.171.180