Adjust rate with nmap --max-rate 100 192.168.1.1
In this step, we will learn how to control the scanning rate of Nmap. Adjusting the scanning rate is crucial for avoiding detection and preventing network congestion. Nmap provides several options to control the rate at which it sends packets.
The --max-rate
option limits the number of packets Nmap sends per second. This can be useful for avoiding detection by intrusion detection systems (IDS) or for preventing network congestion, especially when scanning networks with limited bandwidth.
Let's perform a scan against a target IP address, limiting the maximum packet rate to 100 packets per second. For demonstration purposes, we'll use 192.168.1.1
as the target IP address. Please note that 192.168.1.1
is a placeholder. In a real-world scenario, you would replace this with the actual IP address of the target you are authorized to scan.
Open your Xfce terminal and execute the following command:
sudo nmap --max-rate 100 192.168.1.1
This command will initiate an Nmap scan against 192.168.1.1
, limiting the maximum packet rate to 100 packets per second. You will see Nmap's output in the terminal, showing the progress of the scan.
Example output (the specific output will vary depending on the target and network):
Starting Nmap 7.80 ( https://nmap.org ) at 2023-10-27 10:15 UTC
Nmap scan report for 192.168.1.1
Host is up (0.00028s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 2.50 seconds
Explanation:
sudo nmap
: Executes Nmap with superuser privileges, which may be required for certain scan types.
--max-rate 100
: Limits the sending rate to a maximum of 100 packets per second.
192.168.1.1
: Specifies the target IP address.
Other Rate Limiting Options:
Nmap offers several other options for controlling the scanning rate:
--min-rate <number>
: Specifies the minimum number of packets per second to send.
--scan-delay <time>
: Adjust amount of time Nmap waits after each probe it sends.
--min-rtt-timeout <time>
, --max-rtt-timeout <time>
, --initial-rtt-timeout <time>
: Controls probe timeout values.
Important Considerations:
- Network Conditions: The optimal scanning rate depends on the network conditions. If the network is congested, a lower rate may be necessary to avoid packet loss.
- IDS/IPS Evasion: Adjusting the scanning rate can help to evade detection by intrusion detection/prevention systems.
- Scan Time: Lowering the scanning rate will increase the overall scan time.