Port scanning with masscan (stealth)
The masscan
utility is the fastest Internet port scanner; in fact, it is capable of scanning the entire Internet in under 6 minutes. This obviously requires adequate hardware and network bandwidth. The masscan
utility runs using asynchronous transmission, which is what allows it to scan so quickly. One thing to be aware of with masscan is that it utilizes its own custom TCP/IP stack, so some care needs to be taken to avoid conflicts with the local TCP/IP stack. This specific recipe demonstrates how we can use the masscan
command to perform a TCP stealth scan.
Getting ready
To use the masscan
command to perform a stealth scan, you will need to have a remote system that is running network services over TCP. In the examples provided, an instance of Metasploitable2 is used to perform this task. For more information on how to set up Metasploitable2, refer to Chapter 1, Getting Started.
How to do it…
Follow along to stealth scan using the masscan
command:
- The
masscan...