Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine physical MAC address - (not virtual)
Message
From
11/01/2012 20:58:44
 
 
To
11/01/2012 17:30:04
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01532748
Message ID:
01532763
Views:
43
Thank you for your response Al.

Essentially you said you can't tell virtual from real, which makes sense considering the purpose of virtualization. Time to figure another approach.

Thanks a lot.

Alex



>>Hi,
>>
>>For a number of years, in order to positively identify a machine we have used the MAC address of the network card. For this we have used code provided by Cetin and by Anatoliy, for which we give our heartfelt thanks. We use the MAC address and a hardware key to implement our software's security.
>>
>>As more clients use virtual machines and VPN software, the MAC address retrieved is often not physical but "virtual", meaning that it will not be the same among sessions, interfering with the security method.
>>
>>Does anyone know a way to determine the physical MAC address of the network cards in a machine, and differentiate it from any "virtual" MAC addresses reported?
>
>If your software is running in a VM, the only MAC address(es) you'll be able to see are those provided by the VM. You will not be able to see the MAC address of the physical card in the host computer.
>
>Even in a non-VM environment I'm not sure it's possible to distinguish between physical and virtual adapter MACs. These days, some physical adapters may have advanced driver stacks that might prevent retrieval of the physical MAC address i.e. virtualized MAC despite being physical hardware.
>
>If you insist on using MAC addresses, maybe you could enumerate ALL of the addresses and allow use of your software if 3 of 4 are present, 4 of 5, etc. I don't know if the code you already have can enumerate multiple MAC addresses but if not you could check download#9981 - old, I don't know if it works on current Windows OSs.
>
>One thing you could consider is to use the machine's NetBIOS name instead of a MAC address. You can get this as the first part of the return value of SYS( 0 ). This must be unique on a LAN or VLAN and in practice is a PITA to change once Windows is installed. An installed Windows OS on a VM must also have a unique NetBIOS name that will persist across starting or stopping that OS. There is a possibility of machines at completely separate sites having the same NetBIOS name, but that's surprisingly uncommon in practice, and if you can include a domain name you may be able to mitigate it.
>
>If you're using a hardware key, isn't most or all of this moot anyways?
Previous
Reply
Map
View

Click here to load this message in the networking platform