0

I am new to nmap and its usage. I am trying to perform a UDP scan for ports for a local IP address.

Approach 1:

# sudo nmap -T4 -Pn -sU -p 54 192.a.b.c -vv
...
Nmap scan report for 192.a.b.c
Host is up.

PORT   STATE         SERVICE
54/udp open|filtered xns-ch


# sudo nmap -T4 -Pn -sU -p 512,59 192.a.b.c -vv
Nmap scan report for 192.a.b.c
Host is up.

PORT    STATE         SERVICE
512/udp open|filtered biff
59/udp  open|filtered priv-file

As shown, some ports revealed about the services that they are running. Hence to get a complete list of all the services on the port, I tried executing the following:

Approach 2:

# nmap -T4 -n -Pn -sU -p- 192.x.x.x -vv
...
Nmap scan report for 192.x.x.x
Host is up, received user-set.
All 65535 scanned ports on 192.168.232.2 are open|filtered because of 65535 no-responses

I was of the opinion that a complete(ports 1-65535) UDP scan(as in Approach 2) will give me the list of all services over the ports. However this was not the case.

Can anyone tell me, what have I misunderstood or done incorrect?

0
0

From the output you showed i believe that your full UDP scan is giving you the same results as the single/multiple port scan. The output from your full scan says "All 65535 scanned ports on 192.168.232.2 are open|filtered because of 65535 no-responses". The other scan identified both ports also as "open|filtered". This means that nmap wasn't able to figure out if those ports were trully open, or if they were being filtered, for example by a firewall.

To get more information about the scan, you can use the flag -d. This enabled the debuging output, although it produces an huge amount of lines.

6
  • why does the full scan do not reveal any services similar to individual port scan revealed? – gst Jun 18 '20 at 8:53
  • Can you detail what you target is? Is it a VM? And does it has any firewall running ? – slipz Jun 22 '20 at 12:57
  • 1
    Anyway, when you give a specific port on you target, NMAP will show the state of that port (printing what you want). Show the state does not mean that a service is running on that port. Try the following: choose a port that you know you don't have any service using that port. Then, do scan specifying that port. Nmap will show you the protocol that usually uses that port, but the stated will be closed. Or, in you case, it will show open|filtered because you probably have a firewall running on that target – slipz Jun 22 '20 at 14:04
  • The target is an Android emulator running on Ubuntu host machine. – gst Jun 23 '20 at 13:02
  • What output do you get when you scan a port that you know that is closes? You get the "open|filtered" and the service name? You can try, for example port 43 – slipz Jun 23 '20 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.