Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ CreateGUID no longer including hardware MAC?

CreateGUID no longer including hardware MAC?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Fiendish   USA  (2,541 posts)  Bio   Global Moderator
Date Sat 01 Dec 2018 03:24 PM (UTC)

Amended on Sat 01 Dec 2018 03:45 PM (UTC) by Fiendish

Message
This is either a documentation issue, an OS version issue, or a Wine issue, but my calls to CreateGUID do not produce values ending in a MAC address.


According to
https://docs.microsoft.com/en-us/windows/desktop/api/combaseapi/nf-combaseapi-cocreateguid
https://docs.microsoft.com/en-us/windows/desktop/api/rpcdce/nf-rpcdce-uuidcreate
https://docs.microsoft.com/en-us/windows/desktop/api/rpcdce/nf-rpcdce-uuidcreatesequential

CoCreateGuid calls UuidCreate which was changed to not include MAC information. To get MAC info you need to use UuidCreateSequential instead.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 02 Dec 2018 03:51 AM (UTC)
Message
I think we can treat this as a documentation problem, don't you? Having your actual MAC in the string could leak information about you (if you made it public) whereas it seems at present that you just get a GUID.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,541 posts)  Bio   Global Moderator
Date Reply #2 on Sun 02 Dec 2018 06:44 AM (UTC)

Amended on Sun 02 Dec 2018 06:53 AM (UTC) by Fiendish

Message
Maybe. I found this because I was actually looking for a way to find the MAC for something. If someone just wants a large random number, there are much better formats for that than hex strings.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #3 on Sun 02 Dec 2018 07:34 AM (UTC)
Message

It was more that you wanted a unique number. Two people could easily generate the same random number.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,541 posts)  Bio   Global Moderator
Date Reply #4 on Sun 02 Dec 2018 08:18 AM (UTC)

Amended on Sun 02 Dec 2018 08:23 AM (UTC) by Fiendish

Message
Non-hardware-based GUIDs are really nothing more than big random numbers[0]. It's all a house of cards. GUID/UUIDs are only probably unique, not guaranteed to be so.

[0] - https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Fiendish   USA  (2,541 posts)  Bio   Global Moderator
Date Reply #5 on Sun 02 Dec 2018 03:07 PM (UTC)
Message
Anyway, it's possible to call UuidCreateSequential directly via the rpcrt4.dll and Lua/LuaJIT's FFI so I'm fine going either way on this. MAC randomization[0] might make knowing MAC addresses less useful in the future anyway.

[0] - https://support.microsoft.com/en-us/help/4027925/windows-how-and-why-to-use-random-hardware-addresses

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #6 on Sun 02 Dec 2018 08:24 PM (UTC)
Message

I’m not convinced MAC addresses are actually unique anyway, so any advantage of using them for uniqueness is lost.

See Wikipedia - MAC address

Although intended to be a permanent and globally unique identification, it is possible to change the MAC address on most modern hardware. Changing MAC addresses is necessary in network virtualization. It can also be used in the process of exploiting security vulnerabilities. This is called MAC spoofing.

On the Arduino, for example, you specify your desired MAC address in software. I’ve also seen, I think, configuration settings on PCs where you can choose a different MAC address if you want.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fiendish   USA  (2,541 posts)  Bio   Global Moderator
Date Reply #7 on Mon 03 Dec 2018 12:32 AM (UTC)
Message
Quote:
I’m not convinced MAC addresses are actually unique anyway, so any advantage of using them for uniqueness is lost.

That's also true.

https://github.com/fiendish/aardwolfclientpackage
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #8 on Mon 03 Dec 2018 09:33 PM (UTC)
Message
I've modified the documentation to remove references to the MAC. The online documentation is updated immediately, the documentation that ships with the client will change on the next release.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


24,721 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.