projectdiscovery / naabu

A fast port scanner written in go with a focus on reliability and simplicity. Designed to be used in combination with other tools for attack surface discovery in bug bounties and pentests
https://projectdiscovery.io
MIT License
4.59k stars 537 forks source link

UDP Open Ports Not Displayed in naabu Scan #1014

Open raffaele-forte opened 5 months ago

raffaele-forte commented 5 months ago

Naabu version:

Version: 2.3.0
Operative System: linux
Architecture: amd64
Go Version: go1.21.7
Compiler: gc
Privileged/NET_RAW: Ko
Config file "/home/ubuntu/.config/naabu/config.yaml" Read => Ok
Config file "/home/ubuntu/.config/naabu/config.yaml" Write => Ok
TCP IPv4 connectivity to scanme.sh:80 => Ok
TCP IPv6 connectivity to scanme.sh:80 => Ko (dial tcp6 [2400:6180:0:d0::91:1001]:80: connect: network is unreachable)
UDP IPv4 connectivity to scanme.sh:80 => Ok
UDP IPv6 connectivity to scanme.sh:80 => Ko (dial udp6 [2400:6180:0:d0::91:1001]:80: connect: network is unreachable)

Current Behavior:

When using the naabu command with the specified options to scan for open UDP ports (naabu --host scanme.nmap.org -Pn -p u:68,u:123), the tool fails to display UDP open ports as expected. Even when running the command with sudo, the issue persists.

Expected Behavior:

PORT    STATE         SERVICE
68/udp  open|filtered dhcpc
123/udp open          ntp

Steps To Reproduce:

  1. Run the command 'naabu --host scanme.nmap.org -Pn -p u:68,u:123'
  2. Check the output for UDP open ports.

Expected Behavior: The naabu tool should accurately detect and display open UDP ports specified in the command.

Actual Behavior: UDP open ports are not displayed in the output, despite specifying them in the command.

jesusprubio commented 4 months ago

I think you need to use the flag -s with the value c.

From the help:

 -scan-type, -s string            type of port scan (SYN/CONNECT) (default "s")

Please notice that most UDP services does not reply to empty probes. More details: