From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Oct 2 04:30:07 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C58616A41A for ; Tue, 2 Oct 2007 04:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1046713C47E for ; Tue, 2 Oct 2007 04:30:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l924U6RE025550 for ; Tue, 2 Oct 2007 04:30:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l924U6ex025549; Tue, 2 Oct 2007 04:30:06 GMT (envelope-from gnats) Date: Tue, 2 Oct 2007 04:30:06 GMT Message-Id: <200710020430.l924U6ex025549@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: "Mark D. Foster" Cc: Subject: Re: ports/116778: security/nmap ping-scan misses some hosts X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Mark D. Foster" List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 04:30:07 -0000 The following reply was made to PR ports/116778; it has been noted by GNATS. From: "Mark D. Foster" To: Daniel Roethlisberger Cc: bug-followup@FreeBSD.org Subject: Re: ports/116778: security/nmap ping-scan misses some hosts Date: Mon, 01 Oct 2007 21:22:53 -0700 Daniel Roethlisberger wrote: > Can you verify that it's actually nmap that is either not sending all > the ICMP Echo Requests you'd expect, or not correctly registering all > returning ICMP Echo Replies, using tcpdump on all the involved boxes? > > Also, please compare what you see on the wire with what nmap claims to > be doing (enable verbose mode and packet tracing). > > It seems that despite specifying -PE nmap is solely relying on ARP to determine who is up or not. Also it is not seeing the ARP replies when a range is used. I'm attaching tcpdump output for just when a range is used. (e.g. tcpdump -s0 -n -w /tmp/sonar.pcap host 192.168.1.1 or host 192.168.1.2 or host 192.168.1.3) /usr/local/etc/dansguardian root@sonar>nmap -sP -n -PE --packet-trace 192.168.1.1 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:04 PDT SENT (0.0290s) ARP who-has 192.168.1.1 tell 192.168.1.11 SENT (0.1300s) ARP who-has 192.168.1.1 tell 192.168.1.11 RCVD (0.0300s) ARP reply 192.168.1.1 is-at 00:0F:B5:1F:89:D2 Host 192.168.1.1 appears to be up. MAC Address: 00:0F:B5:1F:89:D2 (Netgear) Nmap finished: 1 IP address (1 host up) scanned in 0.825 seconds /usr/local/etc/dansguardian root@sonar>nmap -sP -n -PE --packet-trace 192.168.1.3 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:04 PDT SENT (0.0290s) ARP who-has 192.168.1.3 tell 192.168.1.11 SENT (0.1300s) ARP who-has 192.168.1.3 tell 192.168.1.11 RCVD (0.0300s) ARP reply 192.168.1.3 is-at 00:B0:D0:7E:6C:7E Host 192.168.1.3 appears to be up. MAC Address: 00:B0:D0:7E:6C:7E (Dell Computer) Nmap finished: 1 IP address (1 host up) scanned in 0.825 seconds /usr/local/etc/dansguardian root@sonar>nmap -sP -n -PE --packet-trace 192.168.1.1-3 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:04 PDT SENT (0.0290s) ARP who-has 192.168.1.1 tell 192.168.1.11 SENT (0.0290s) ARP who-has 192.168.1.2 tell 192.168.1.11 SENT (0.0290s) ARP who-has 192.168.1.3 tell 192.168.1.11 SENT (0.1300s) ARP who-has 192.168.1.1 tell 192.168.1.11 SENT (0.1300s) ARP who-has 192.168.1.2 tell 192.168.1.11 SENT (0.1300s) ARP who-has 192.168.1.3 tell 192.168.1.11 RCVD (0.0290s) ARP reply 192.168.1.2 is-at 00:B0:D0:47:76:48 Host 192.168.1.2 appears to be up. MAC Address: 00:B0:D0:47:76:48 (Dell Computer) Nmap finished: 3 IP addresses (1 host up) scanned in 0.834 seconds NOTE: If you examine sonar.pcap you will see that all 3 hosts replied, not just 192.168.1.2 ~ root@franco>nmap -sP -n -PE --packet-trace 192.168.1.1 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:11 PDT SENT (0.0150s) ARP who-has 192.168.1.1 tell 192.168.1.3 SENT (0.1240s) ARP who-has 192.168.1.1 tell 192.168.1.3 RCVD (0.0150s) ARP reply 192.168.1.1 is-at 00:0F:B5:1F:89:D2 Host 192.168.1.1 appears to be up. MAC Address: 00:0F:B5:1F:89:D2 (Netgear) Nmap finished: 1 IP address (1 host up) scanned in 0.439 seconds ~ root@franco>nmap -sP -n -PE --packet-trace 192.168.1.2 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:11 PDT SENT (0.0140s) ARP who-has 192.168.1.2 tell 192.168.1.3 SENT (0.1150s) ARP who-has 192.168.1.2 tell 192.168.1.3 RCVD (0.0140s) ARP reply 192.168.1.2 is-at 00:B0:D0:47:76:48 Host 192.168.1.2 appears to be up. MAC Address: 00:B0:D0:47:76:48 (Dell Computer) Nmap finished: 1 IP address (1 host up) scanned in 0.430 seconds ~ root@franco>nmap -sP -n -PE --packet-trace 192.168.1.3 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:11 PDT Host 192.168.1.3 appears to be up. Nmap finished: 1 IP address (1 host up) scanned in 0.013 seconds ~ root@franco>nmap -sP -n -PE --packet-trace 192.168.1.3 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:11 PDT Host 192.168.1.3 appears to be up. Nmap finished: 1 IP address (1 host up) scanned in 0.013 seconds ~ root@franco>nmap -sP -n -PE --packet-trace 192.168.1.1-3 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:11 PDT SENT (0.0140s) ARP who-has 192.168.1.1 tell 192.168.1.3 SENT (0.0140s) ARP who-has 192.168.1.2 tell 192.168.1.3 SENT (0.1230s) ARP who-has 192.168.1.1 tell 192.168.1.3 SENT (0.1230s) ARP who-has 192.168.1.2 tell 192.168.1.3 RCVD (0.0140s) ARP reply 192.168.1.2 is-at 00:B0:D0:47:76:48 Host 192.168.1.2 appears to be up. MAC Address: 00:B0:D0:47:76:48 (Dell Computer) Host 192.168.1.3 appears to be up. Nmap finished: 3 IP addresses (2 hosts up) scanned in 0.479 seconds NOTE: franco's IP is 192.168.1.3. Examine franco.pcap you will see that the other 2 hosts gave ARP reply. Here is the output from linux. root@monk:~# nmap -sP -n -PE --packet-trace 192.168.1.1-3 Starting Nmap 4.20 ( http://insecure.org ) at 2007-10-01 21:20 PDT SENT (0.0230s) ARP who-has 192.168.1.1 tell 192.168.1.9 SENT (0.0230s) ARP who-has 192.168.1.2 tell 192.168.1.9 SENT (0.0230s) ARP who-has 192.168.1.3 tell 192.168.1.9 RCVD (0.0230s) ARP reply 192.168.1.2 is-at 00:B0:D0:47:76:48 RCVD (0.0230s) ARP reply 192.168.1.3 is-at 00:B0:D0:7E:6C:7E RCVD (0.0240s) ARP reply 192.168.1.1 is-at 00:0F:B5:1F:89:D2 Host 192.168.1.1 appears to be up. MAC Address: 00:0F:B5:1F:89:D2 (Netgear) Host 192.168.1.2 appears to be up. MAC Address: 00:B0:D0:47:76:48 (Dell Computer) Host 192.168.1.3 appears to be up. MAC Address: 00:B0:D0:7E:6C:7E (Dell Computer) Nmap finished: 3 IP addresses (3 hosts up) scanned in 0.204 seconds Hope this helps. -- Said one park ranger, 'There is considerable overlap between the intelligence of the smartest bears and the dumbest tourists.' Mark D. Foster, CISSP http://mark.foster.cc/