473,419 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

How to retrieve serial number of OS or CPU for copy protection?

In order to protect software from being copied without licence, I would like
to use something like a key, which fits only to the current system. The
serial number of the CPU or the current operating system would be
appropriate. However, I do not know how to retrieve the information.

Could you help?
Klaus

Nov 16 '05
55 2821
"Klaus Bonadt" <Bo****@hotmail.com> wrote:

Do you know whether or not, this activation signature is changed when
hardware configuration is modified?
Yes, it is. There is a description of the activation signature process on
Microsoft's licensing web site. There are about 10 hardware configuration
items included in the signature. Some small number of them be modified
without invalidating the signature.
Furthermore, what about OS upgrades? When Longhorn will be installed over
XP, is the activation signature affected?


Service packs and hotfixes do not affect the signature, but a brand-new
operating system (assuming that Longhorn is not release as XP SP4) will
probably have a new activation scheme.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc
Nov 16 '05 #51
I tried on two machines (Win2k and XP), both gave the following result:
Hardware ID:
UUID : FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
Vendor :
Name :
IdentifyingNumber :
Feedback:

UUID : not valid
Vendor : empty
Name : empty
IdentifyingNumber : empty
Regards,
Klaus
Nov 16 '05 #52
Hmmm, It's very interesting. We have about 50 computers on our network, 20
of them are running WinXP or Win2000 (the rest is NT4). 15 are brand PCs, 5
are noname. All of them have this kind of hardware information.
"Klaus Bonadt" <Bo****@hotmail.com> wrote in message
news:un**************@TK2MSFTNGP15.phx.gbl...
I tried on two machines (Win2k and XP), both gave the following result:
Hardware ID:
UUID : FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
Vendor :
Name :
IdentifyingNumber :
Feedback:

UUID : not valid
Vendor : empty
Name : empty
IdentifyingNumber : empty
Regards,
Klaus

Nov 16 '05 #53
I wondered if you would consider using the MAC address for this?

http://www.codeguru.com/Cpp/I-N/netw...cle.php/c5451/
"Kazi" <no****@please.com> wrote in message
news:eC**************@TK2MSFTNGP11.phx.gbl...
I'm researching this problem heavily, and maybe I have found a better
solution. There is a Win32_ComputerSystemProduct class in WMI, which may
contain the information what we need.

http://msdn.microsoft.com/library/en...temproduct.asp
I have created a simple little app (WMI and .Net 1.1 runtime needed), which displays this info and I have run it on several computers. The result a bit surprising to me, almost every computer have this kind of hardware
identification information. The application contains two separate section:
the first section displays the computer identification data (HardwareID),
the second contains the result of checking the data (Feedback).

I would like to ask everybody run my attached app, and please post the
result back to this newsgroup. The result must be on of the following:

-- 1. -------------------------
UUID : ok
Vendor : ok
Name : ok
IdentifyingNumber: ok

-- 2. -------------------------
UUID : not valid
Vendor : ok
Name : ok
IdentifyingNumber: ok

-- 3. -------------------------
UUID : ok
Vendor : empty
Name : empty
IdentifyingNumber: empty

-- 4. -------------------------
The HardwareID not found!

So you can see, the feedback section of my app does not contain any
confidential data. It would be nice to see lot of feedback to get to know,
does it really works.

Thanks in advance:
Kazi

"Klaus Bonadt" <Bo****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Kazi,

Do you know whether or not, this activation signature is changed when
hardware configuration is modified?
Furthermore, what about OS upgrades? When Longhorn will be installed over XP, is the activation signature affected?

Thanks and regards,
Klaus


Nov 16 '05 #54
Off the top I would like to say I am a beginner in C# and was not able to
understand your code from your previous posting for protecting my software. I
am trying to add this security to my C# windows form software.

Such as:
1) What is in the foreach statement mean? Could you tell me how this
actually would be written as if I am adding it to my software?
2) Also I assume after adding this method to my main class, how does it
actually prevent the copying? Does this mean that I need to actually check
each customers OS ID and customize it to the OS:
a. Get users OS ID
b. Set key to OS ID so it can only be loaded to that computer.
If so how does this work if I have no direct access to my customers?

Appreciate All your help,

Kidus.
"Kazi" wrote:
The number one problem of a copy protection algorithm is identifying
machines. Is there a number that uniquely identify a computer? Let’s call
this number as "Serial Number" (SN).

What are the requirements for a Serial Number? There are two:

1. A Serial Number must be different on different computers.
2. A Serial Number must be the same on the same computer.

Today’s PCs do not contain such a hardware id which meet these requirements.
Because of this, we should loosen these hard requirements. I’ve modified the
second requirement this way:

2. The Serial Number must be the same on the same computer, but if somebody
successfully changes the serial number on a computer, it involves serious
consequences.

I think, there is such a "Number" in Windows XP, it’s the following value in
the registry:

HKEY_LOCAL_MACHINE\SYSTEM\WPA\SigningHash-*...*\SigningHashData

It’s a byte array and it contains the Windows Product activation signature.
It’s hard to overwrite (the kernel protects it), but it isn’t worth to
overwrite, because the attacker can’t reactivate his copy of Windows again.

You can read that value in C# in the following way:

public static byte[] GetHardwareIdBytes()
{
using(RegistryKey rk = Registry.LocalMachine.OpenSubKey(@"SYSTEM\WPA",
false))
{
foreach(string subkey in rk.GetSubKeyNames())
{
if(subkey.IndexOf("SigningHash") == 0)
{
using(RegistryKey rk1 = rk.OpenSubKey(subkey))
{
return (byte[])rk1.GetValue("SigningHashData");
}
}
}
}
// It should never happen:
throw new Exception("There is no hardware id on this computer!");
}

This solution has two disadvantages:
1. It works only on Windows XP (or later)
2. The SN changes, when the user reinstalls the operating system.
Kazi
"Klaus Bonadt" <Bo****@hotmail.com> wrote in message
news:ue****************@TK2MSFTNGP10.phx.gbl...
In order to protect software from being copied without licence, I would

like
to use something like a key, which fits only to the current system. The
serial number of the CPU or the current operating system would be
appropriate. However, I do not know how to retrieve the information.

Could you help?
Klaus


Nov 17 '05 #55

"Kidus Yared" <Ki********@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
Off the top I would like to say I am a beginner in C# and was not able to
understand your code from your previous posting for protecting my
software. I
am trying to add this security to my C# windows form software.

Such as:
1) What is in the foreach statement mean? Could you tell me how this
actually would be written as if I am adding it to my software?
2) Also I assume after adding this method to my main class, how does it
actually prevent the copying? Does this mean that I need to actually check
each customers OS ID and customize it to the OS:
a. Get users OS ID
b. Set key to OS ID so it can only be loaded to that computer.
If so how does this work if I have no direct access to my customers?

Appreciate All your help,

Kidus.

I would suggest you learn the C# language before you start asking yourself
about copy protection.
I also suggest you don't cross-post to non relevant NG.

Willy.

Nov 17 '05 #56

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

79
by: Klaus Bonadt | last post by:
In order to protect software from being copied without licence, I would like to use something like a key, which fits only to the current system. The serial number of the CPU or the current...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.