Course contentsShow
← Security
Lesson 341 of 3,0528. Network Security - ReconnaissanceFree lesson

UDP Scanning Techniques

Challenges of UDP scanning, ICMP unreachable responses, and identifying stateless services reliably.

UDP Scanning Techniques

What you'll learn: How UDP scanning differs from TCP, why it's unreliable, and how to identify stateless services despite its challenges.


Why UDP Scanning Is Hard

Unlike TCP with its three-way handshake, UDP is connectionless—there's no built-in acknowledgment that a port is open. You send a UDP packet and... often get nothing back. It's like shouting into a cave: silence could mean no one's there, or that someone is listening but chooses not to respond.

This makes UDP scanning slow and unreliable compared to the TCP techniques you've learned (Connect, SYN scans).


How UDP Scanning Works

When you send a UDP packet to a port:

  • Open or filtered port: Typically no response (the service receives your packet but doesn't reply to random data)
  • Closed port: Usually sends back an ICMP port unreachable message (the OS tells you "nothing is listening here")

The problem? Many firewalls block ICMP responses, making closed ports look identical to open ones. You also can't tell if your probe packet was lost in transit.


ICMP Unreachable Messages

The ICMP Type 3, Code 3 (Destination Unreachable, Port Unreachable) packet is your only reliable signal that a UDP port is closed. No response means the port might be open—or filtered, or the packet was dropped.


Identifying Stateless Services

Some UDP services (like DNS on port 53, SNMP on port 161) will respond to properly formatted requests. By sending service-specific probes instead of empty packets, you can confirm if a service is actually running.

Key Takeaway:
UDP scanning is inherently unreliable due to lack of responses from open ports; you must rely on ICMP unreachable messages to identify closed ports and use service-specific probes to confirm live UDP services.