July 3rd, 2004, 11:18 AM
Based on a given IP is there any possibility to retrieve that IP holder's MAC add? I believe Nessus has something about it in the scans, but I am interested in a concept that could be applied regardless of the target OS [Google gave me some answers, but most of the in the form of source code, in Win for Win].
I have searched AO but the only thing I've found was in relation to local [subnet] computers and their MACs. Is it simply impossible to identify a remote MAC of a router or linux box, let's say? [I've chanced across some code for using the NetBIOS method, though the specifications were not clear whether it would work locelly only].
I was thinking of setting up a small personal server at home [for personal files, backup etc] and just thought that an extra level of security would be to only allow my [or other specific] MACs to connect. But since this is a 'summer project' for me I was thinking of giving a shot to trying to code the thing myself [? maybe ] Anyway, all being done over the Internet, would there be anything out there to help me?
Thank you in advance.
July 3rd, 2004, 01:32 PM
Not all IP devices have a MAC address. MAC addresses are for Ethernet *only*, and don't apply to devices that don't have any ethernet interfaces (for example, PCs connected with dialup).
You can only obtain the MAC address of a machine on the same lan as you, as MAC addresses are nothing to do with IP and should never be transported over it (by any sane protocol). The easy way of finding the mac address of a box on the lan is:
- Ping the machine (doesn't matter whether it responds)
- Look at your box's arp cache with the "arp" command and see what the machine's MAC is
However, I should point out that this *only* works on a LAN, NOT over a router, because obviously it's nothing to do with IP and should never be transported over the internet (it's pretty irrelevant anyway).