ater got these UUIDs, then need to come up with a key to protect my software..
- Machine Finger Print - The Right and Efficient Way
- How to Get the BIOS UUID
- Creating a Unique String Using a UUID
- Developing RPC Windows Applications
- How to solve Link Error on call to ::UuidToString()?
- Compiler cannot find .lib file
- rpc.h linking issue
- Create a Windows Service Application Using the Boost.Application Library
- Searching for a Reliable Hardware ID
- Searching for a Reliable Hardware ID
- denisbrodbeck / machineid
- The Best Way To Uniquely Identify A Windows Machine
- The Best Way To Uniquely Identify A Windows Machine
- How to uniquely identify windows machine
Protecting your work - use the right way to identify your client machine
Get a unique identifier for a computer The BIOS UUID is a unique number tied to the motherboard and if you changed your motherboard, you can safely say you changed your computer. From my point of view, it is a better method of identifying your hardware and, as I'll show you in this tip, it is very easy to implement.
A small function to either accept or create a UUID* and return a CString
You will have to #include rpcdce.h into your code and link rpcrt4.lib into your program in order for this to work. If you don't have either of these files, download the latest *release* version of the Platform SDK. I've taken the liberty of showing you the contents of the two files I created to make it a little simpler. If you create a CPP and an H file, and then copy/paste these two sections into the approriate files, you won't have to do anything other than adding the files to your project (and installing the SDK of course), and then doing a build.
When you want to use the functions included in rpc.h, you can use two ways like as follows:
1. Click Project -> Properties -> Linker -> General -> Additional Library Directories, add the directorie of Rpcrt4.lib to this box, the Rpcrt4.lib always locate in the path: %Program Files%\Microsoft SDKs\Windows\v6.0A\Lib; and then, add Rpcrt4.lib to Linker-> Input ->Additional Dependences. In your program, just use "#include
2. Just use the following code in your program:
#include
on my laptop, it is located at :C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib
machineid provides support for reading the unique machine id of most host OS's (without admin privileges)
1. Cross-Platform (tested on Win7+, Debian 8+, Ubuntu 14.04+, OS X 10.6+, FreeBSD 11+) 2. No admin privileges required 3. Hardware independent (no usage of MAC, BIOS or CPU — those are too unreliable, especially in a VM environment) 4. IDs are unique1 to the installed OS
Function: ID() (string, error) Returns original machine id as a string.
Function: ProtectedID(appID string) (string, error) Returns hashed version of the machine ID as a string. The hash is generated in a cryptographically secure way, using a fixed, application-specific key (calculates HMAC-SHA256 of the app ID, keyed by the machine ID).
What you get This package returns the OS native machine UUID/GUID, which the OS uses for internal needs. All machine IDs are usually generated during system installation and stay constant for all subsequent boots. The following sources are used:
Windows uses the MachineGuid from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography
Unique Key Reliability Do note, that machine-id and MachineGuid can be changed by root/admin, although that may not come without cost (broken system services and more). Most IDs won't be regenerated by the OS, when you clone/image/restore a particular OS installation. This is a well known issue with cloned windows installs (not using the official sysprep tools).
A machine ID uniquely identifies the host. Therefore it should be considered "confidential", and must not be exposed in untrusted environments. If you need a stable unique identifier for your app, do not use the machine ID directly.
A reliable solution is to hash the machine ID in a cryptographically secure way, using a fixed, application-specific key.
That way the ID will be properly unique, and derived in a constant way from the machine ID but there will be no way to retrieve the original machine ID from the application-specific one.
On Windows:
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography /v MachineGuid
or
Open Windows Registry via regedit Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography Take value of key MachineGuid
wmic csproduct get UUID
wmic bios get name,serialnumber,version
wmic cpu get name,CurrentClockSpeed,MaxClockSpeed
wmic cpu get name,CurrentClockSpeed,MaxClockSpeed /every:1
get-wmiobject Win32_ComputerSystemProduct | Select-Object -ExpandProperty UUID
No comments:
Post a Comment