Does NMAP need ICMP for accurate UDP state

This is a discussion on Does NMAP need ICMP for accurate UDP state within the Linux Security forums, part of the System Security and Security Related category; An Nmap scan on my server reports open states on ports 137:139. But I know they are not open ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-10-2003
Dusty
 
Posts: n/a
Default Does NMAP need ICMP for accurate UDP state

An Nmap scan on my server reports open states on ports 137:139. But I know
they are not open because I am dropping INPUT packets on those ports in the
firewall rules, and definitely can't connect to those ports from the outside
using an smbclient or nmbstat command. That said, samba is running on the
machine for use internally.

My question... what would give Nmap a "false positive"? I read that nmap
needs an destination-unreachable icmp packet, and the absence of one would
be interpreted as "open". I think I'm outputting that icmp type. Are there
any other possibilities? Or is any udp packet explicity dropped in iptables
going to show as "open" to nmap?


Reply With Quote
  #2 (permalink)  
Old 07-10-2003
Eirik Seim
 
Posts: n/a
Default Re: Does NMAP need ICMP for accurate UDP state

On Wed, 9 Jul 2003 22:41:24 -0400, Dusty wrote:
> An Nmap scan on my server reports open states on ports 137:139. But I know
> they are not open because I am dropping INPUT packets on those ports in the
> firewall rules, and definitely can't connect to those ports from the outside
> using an smbclient or nmbstat command. That said, samba is running on the
> machine for use internally.
>
> My question... what would give Nmap a "false positive"? I read that nmap
> needs an destination-unreachable icmp packet, and the absence of one would
> be interpreted as "open".


This is true.

> I think I'm outputting that icmp type.


You are using REJECT then, not DROP?

# tcpdump -vvvni <external interface> icmp and src <your ip address>

run this while scanning from the outside, and you'll see exactly what
ICMP packets you send.

> Are there
> any other possibilities? Or is any udp packet explicity dropped in iptables
> going to show as "open" to nmap?


It's the way UDP works, really.

Normally, there are only two ways a host will _not_ recieve either an
icmp 'unreachable' or an icmp 'time exceeded': a) the packet is accepted
by an application (open), or b) the packet dies a horrible death in some
packet filter (filtered). Neither Nmap, nor any bad guys can tell the
difference.


- Eirik
--
New and exciting signature!

Reply With Quote
  #3 (permalink)  
Old 07-10-2003
Tutaepaki
 
Posts: n/a
Default Re: Does NMAP need ICMP for accurate UDP state

"Dusty" <Spamb_bull@yahoo.com---No Spam> wrote in
news:vgpkgjan98h0a1@corp.supernews.com:

> An Nmap scan on my server reports open states on ports 137:139. But I
> know they are not open because I am dropping INPUT packets on those
> ports in the firewall rules, and definitely can't connect to those
> ports from the outside using an smbclient or nmbstat command. That
> said, samba is running on the machine for use internally.
>
> My question... what would give Nmap a "false positive"? I read that
> nmap needs an destination-unreachable icmp packet, and the absence of
> one would be interpreted as "open". I think I'm outputting that icmp
> type. Are there any other possibilities? Or is any udp packet
> explicity dropped in iptables going to show as "open" to nmap?
>
>
>


Yes, nmap does need the unreachable icmp to show the port as closed. If you
are silently dropping the packets, then nmap reports open.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:25 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0