Add verbosity with nmap -v --randomize-hosts 192.168.1.0/24
In this step, we will add verbosity to our Nmap scan while still randomizing the host order. Verbosity provides more detailed information about the scan process, which can be helpful for troubleshooting or understanding Nmap's behavior.
The -v
option in Nmap increases the verbosity level. Using it once provides more information than the default output. Using it twice (-vv
) provides even more detail.
To add verbosity and randomize the host order, execute the following command in your Xfce terminal:
sudo nmap -v --randomize-hosts 192.168.1.0/24
You will be prompted for your password. Since the labex
user has sudo
privileges without a password, simply press Enter
.
This command will scan the 192.168.1.0/24 subnet, randomizing the host order, and providing more verbose output.
The output will now include details about the scan process, such as the probes being sent, the ports being scanned, and the reasons for certain decisions.
Example output (the actual output will vary depending on your network):
Starting Nmap 7.80 ( https://nmap.org ) at 2023-10-27 10:15 UTC
Initiating Ping Scan at 10:15
Scanning 256 hosts [2 ports/host]
Completed Ping Scan at 10:15, 0.72s elapsed (256 total hosts)
Initiating Parallel DNS resolution of 256 hosts. at 10:15
Completed Parallel DNS resolution of 256 hosts. at 10:15, 1.81s elapsed
Initiating SYN Stealth Scan at 10:15
Scanning 256 hosts [1000 ports/host]
Discovered open port 22/tcp on 192.168.1.1
Discovered open port 80/tcp on 192.168.1.100
Completed SYN Stealth Scan at 10:16, 3.21s elapsed (256 total hosts)
Nmap scan report for 192.168.1.1
Host is up (0.00020s latency).
PORT STATE SERVICE
22/tcp open ssh
Nmap scan report for 192.168.1.100
Host is up (0.00030s latency).
PORT STATE SERVICE
80/tcp open http
Nmap done: 256 IP addresses (2 hosts up) scanned in 5.74 seconds
The output now shows more information about the scan process, such as the timing of the ping scan and the DNS resolution. This can be helpful for understanding how Nmap is working and for troubleshooting any issues.