From owner-freebsd-security@FreeBSD.ORG Wed Jun 16 18:39:20 2004 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 96A2E16A4CE; Wed, 16 Jun 2004 18:39:20 +0000 (GMT) Received: from out011.verizon.net (out011pub.verizon.net [206.46.170.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FACD43D2F; Wed, 16 Jun 2004 18:39:20 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] ([68.161.84.3]) by out011.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040616183919.IDVL18566.out011.verizon.net@[192.168.1.3]>; Wed, 16 Jun 2004 13:39:19 -0500 Message-ID: <40D093CE.6020603@mac.com> Date: Wed, 16 Jun 2004 14:39:10 -0400 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Alex Povolotsky References: <20040616220533.2ec0bc9c@tarkhil.over.ru> In-Reply-To: <20040616220533.2ec0bc9c@tarkhil.over.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out011.verizon.net from [68.161.84.3] at Wed, 16 Jun 2004 13:39:18 -0500 cc: freebsd-security@freebsd.org cc: eik@FreeBSD.org Subject: Re: nmap not scanning networks? X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Security issues [members-only posting] List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2004 18:39:20 -0000 Alex Povolotsky wrote: > Attempt to scan a network with any method except plain ping results in an error: > > truss nmap -sT -p 21 '172.19.17.*' I can confirm the problem, anyway, although I'm not sure it's germane to freebsd-security. :-) > [...] > sendto(0x4,0x8094200,0,0x0,{ AF_INET 172.19.17.0:0 },0x10) ERR#49 'Can't assign > requested address' > [...] > > What's strange that man on send(2) doesn't state that EADDRNOTAVAIL can ever be returned from sendto(). nmap interprets the wildcard character in a network address to include the all-zeros "base network address" and the all-ones "network broadcast address". I seem to recall that some systems won't let you send traffic to the all-zeros address which might explain the EADDRNOTAVAIL, although my explanation is not entirely satisfactory as there are still problems: Consider trying "nmap -sT -p 21 '172.19.17.1-255'", only it results in similar behavior: # nmap -sT -p 21 '10.1.1.1-10' Starting nmap 3.50 ( http://www.insecure.org/nmap/ ) at 2004-06-16 14:29 EDT sendto in send_ip_raw: sendto(4, packet, 28, 0, 10.1.1.1, 16) => Can't assign requested address Sleeping 15 seconds then retrying -- -Chuck PS: I would suggest CC'ing the port maintainer of nmap about this and maybe moving the discussion to freebsd-ports...?