Why UDP Port Scans Are Slower and Less Reliable
Network administrators and security professionals frequently observe that UDP port scanning takes significantly longer and produces less definitive results than TCP scanning. This disparity stems from fundamental architectural differences between the two protocols: while TCP relies on a deterministic, connection-oriented handshake, UDP is connectionless and stateless. As a result, UDP scans must deal with absent responses, ambiguous port states, strict operating system rate limits on error messages, and network packet loss.
The Connectionless Nature of UDP
TCP establishes a session via a three-way handshake (SYN, SYN-ACK, ACK). When a scanner sends a TCP SYN packet to an open port, the target responds immediately with a SYN-ACK, providing definitive proof that the port is listening.
UDP does not use handshakes or sessions. When a UDP packet is sent to a listening port, the target application is not required by the protocol to send an acknowledgment. Unless the scanning tool sends application-specific probe data (payload) that the service recognizes and chooses to answer, an open UDP port typically remains completely silent.
Reliance on ICMP Error Messages
Because open UDP ports often do not reply, scanners infer port status primarily through negative feedback. If a UDP packet reaches a closed port, the host operating system’s network stack generates an ICMP (Internet Control Message Protocol) Type 3, Code 3 error message, designated as “Destination Unreachable, Port Unreachable.”
This mechanism introduces two core scanning problems: * The
“Open|Filtered” Ambiguity: If a scanner sends a UDP packet and
receives no response, it cannot distinguish between two scenarios: the
port is open and ignored the packet, or a firewall/network issue dropped
the packet. Consequently, scanners must label these results as
open|filtered, reducing overall reliability. *
Firewall Interference: Firewalls frequently block
outgoing ICMP error messages. If ICMP responses are blocked, every
closed port appears silent, leading the scanner to falsely identify
closed ports as open or filtered.
Operating System ICMP Rate Limiting
The primary reason UDP scans are notoriously slow is ICMP rate limiting. To mitigate Denial of Service (DoS) and reconnaissance attacks, modern operating systems restrict the frequency of outgoing ICMP error messages.
For example, standard Linux kernels limit ICMP Destination
Unreachable responses to a specific threshold per second (often managed
via icmp_ratelimit), while systems like Windows apply
similar internal throttling. When a scanner sends thousands of UDP
packets across a port range, the target OS generates ICMP errors for the
first few closed ports and silently discards the rest. To avoid missing
these responses and misidentifying closed ports, scanning tools must
introduce artificial delays, often waiting hundreds of milliseconds
between probes and stretching scan times from seconds to hours.
Packet Loss and Retransmission Overhead
Unlike TCP, UDP provides no native flow control, error recovery, or packet delivery verification. On congested or unstable networks, standard packet drops are indistinguishable from dropped firewall traffic or silent open ports. To compensate for potential packet loss, scanning engines must implement timeouts and retransmit probes multiple times for each non-responsive port, multiplying total scan duration.