Home page logo

nmap-dev logo Nmap Development mailing list archives

Re[2]: nmap vs multiple IP address on one NIC
From: preacherandrew () mail ru
Date: Wed, 31 Oct 2007 09:41:27 +0300

On Tue, Oct 23, 2007, Fyodor wrote:
On Fri, Oct 19, 2007 at 04:36:45PM +0400, preacherandrew () mail ru wrote:
Hi, Fyodor.

My config:
Windows 2000; one NIC; in TCP/IP properties set multiple IP addresses

Hi Andrew.  Thanks for your report.  Maybe we need to move tne
entry->>intf_len assignment.  Would you please email your report to
nmap-dev () insecure org so that more people have a chance to look at it?

Hi Fyodor. I have send my report to nmap-dev () insecure org  But may be
problem is wider. I try to fix the problem moving
memset(entry, 0, sizeof(*entry));
from "_ifrow_to_entry" function and code fragment "set aliases" is
executed. But this fix don't help me in my case ("multiple IP addresses on one
network card").
Point is that nmap use only one from addresses
returned by GetIpAddrTable. Becase that nmap's rerults may be inadequate.

For example:
host has two IP adresses on one network card - and Default router -
1) I run "nmap --iflist".
2) GetIpAddrTable returns addresses is such order:,
2) Nmap take into account only first address returned by GetIpAddrTable-
3) Then nmap try verify default router using this address
( This results "WARNING: Unable to find appropriate interface for system
route to" (more precisely lot such warnings - for
almost each entry in "route print"). In reality, default router is ok - it is
reachable from host's other address (, but nmap doesn't take
into account other address.

IMHO this is design problem (at least in Windows version of nmap).
Several IP on one NIC is not problem for standard ping utility. But
this is the problem for nmap.


nmap prints out:
"WARNING: Unable to find appropriate interface for system route to ..."

I've downloaded sources of nmap and did some debugging.

In source intf-win32.c:
 427: entry->intf_len = sizeof(ebuf);
 428: _ifrow_to_entry(intf, &intf->iftable->table[i], entry);

and then inside function "_ifrow_to_entry":
 memset(entry, 0, sizeof(*entry));

In result field "entry->intf_len" is 0. Code fragment "set aliases"
(strings 153-158 in "intf-win32.c") threrefore cannot execute.

 Andrew.                          mailto:preacherandrew () mail ru

P.S. sorry for my English.

С уважением,
 preacherandrew                          mailto:preacherandrew () mail ru

Sent through the nmap-dev mailing list
Archived at http://SecLists.Org

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]