Skipping phases to speed up scans
Nmap scans are divided into phases. When we are working with many hosts, we can save time by skipping tests or phases that return the information we don't need or that we already have. By carefully selecting our scan timing and performance options, we can significantly improve the speed of our scans.
This recipe explains the process that takes place behind the curtains when scanning, the performance and timing configurations that can be adjusted, and how to skip certain phases to speed up scans.
How to do it...
- To perform a full port scan with the timing template set to aggressive (
-T4
), and without reverse DNS resolution (-n
) or ping (-Pn
), use the following command:# nmap -T4 -n -Pn -p- <target>
- Note the scanning time at the end of the report:
Nmap scan report for 74.207.244.221 Host is up (0.11s latency). Not shown: 65532 closed ports PORT   STATE SERVICE 22/tcp     open ssh 80...