4

When I run nmap on different subnets it finds different hosts. They are identified by their ip and if they are one the same subnet as the scanning device also by their mac address. But how can I identify machines as one, that have different interfaces in different subnets?

6
  • If they have a sequential IP ID field, it's easy to tell. Last time I did this, Linux is sequential by default but Windows is not. This may have changed in recent years.
    – paj28
    Commented Nov 19, 2016 at 13:42
  • @paj28 : How would IP ID help in identifying different different interfaces of same computer? I can have wget to use wlan0 and firefox to use wlan1. Now the packets do not belong to same message and IP ID field of a packet will be meaningless. And even if different applications are not configured to use different interfaces, a single app will sends all its packets using only a single interface. For e.g firefox will never send half of its connection request packets through wlan0 and the other half through wlan1. So using IP ID in this case seems irrelevant to me.
    – 7_R3X
    Commented Nov 19, 2016 at 14:51
  • Correction: Windows is sequential and Linux isn't. Just checked on my box and Windows 7 with all patches is still sequential.
    – paj28
    Commented Nov 19, 2016 at 17:57
  • @7_R3X - The IPID is sequentially globally across all interfaces. You can spot the machines by similar IPID numbers returning around the same time. If you want to know more, I suggest you try this out - it's easy enough to spin up a VM with mulitple interfaces.
    – paj28
    Commented Nov 19, 2016 at 17:58
  • ID them by hostname via dns or dhcp
    – KDEx
    Commented Nov 20, 2016 at 19:51

2 Answers 2

1

There are lots of interesting techniques that others are covering in their answers. Many of these are also discussed in Michal Zalewski's book Silence on the Wire. But the easiest method with Nmap is to use the duplicates NSE script. This uses various methods such as SSL certificates, SSH host keys, and MAC addresses to identify addresses that could be on the same system. It's not foolproof, but nothing really is. New techniques may be added in the future as well. Note that this only works if both addresses are scanned in a single Nmap scan.

1
  • I just browsed through the TOC of Zalewski's book and couldn't find anything on identifying duplicates. Any hint? :)
    – Lester
    Commented Apr 19, 2017 at 6:02
0

Layers Of Networking

Nmap manual page says

Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics.

I believe that nmap cannot detect them as single machine because nmap host discovery is a layer 3 scanning(Nmap uses raw IP Packets in novel...) and MAC addresses are embedded at layer 2 of OSI Model.

EDIT:

The only identity of a computer on a network is its MAC address and IP address. Trying a luck with these two in your case is meaningless. One possible way that I see is that you make the user interact with a web server and plant some cookie on it. These cookies could be useful for identifying a user. But if the user uses a new browser or clears the cookies, you'd loose you tracking.

You can also write a client-side script to create a file with some randomly generated number at some particular directory in the computer to track the user. The random number can be matched against a DB for identification. But it has its own downsides like the permission issues to write and read data from user's PC. Also the client-side script is visible to user in source code of page. A user may just walk over and delete your file.

I don't believe that there's a straight forward way to achieve your intent but you could use the clubbed knowledge of the ways I mentioned and work your way up. Good Luck! Hope it helps.

2
  • thanks for your answer. i am not neccessarily looking for a solution using nmap. i just tried to describe my starting point: i have IPs and i want to map them to unique hosts without having direct access to the host to just print its interfaces.
    – Lester
    Commented Nov 19, 2016 at 11:28
  • @Lester : I edited the answer to include more details. Feel free to ask questions if you have any.
    – 7_R3X
    Commented Nov 19, 2016 at 13:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .