Solved

Processor Serial Number

Posted on 2000-03-25
21
494 Views
Last Modified: 2010-04-10
How can catch the manufacture serial number built in the microprocessor?
I want a complete code in C or C++.  
If I accept an answer I’ll rise the points.
0
Comment
Question by:newbuilder
  • 6
  • 6
  • 3
  • +3
21 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 2656984
This of course depends on the processor we are talking about.  What processor?

I have to warn you that no processor that I know of (in particular non of the x86 family or the 68xxxx family have a the serial number "built in" to the processor. In fact it is extremely unlikely that ANY processor does.  The serial number is just stamped on the back.

The intel processors have a CPUID instruction, that returns information about the procssor that includes its stepping, but it is not an ID, there are literally millions of processors with the same stepping.
0
 
LVL 2

Expert Comment

by:DarrinE
ID: 2657382
Nietod is right - there is no serial number for the CPU - but so we can maybe help a little more - what did you want to the serial number for ? Unique identification ? Use the HDD Serial # or the MAC address - post a seperate question to get the complete answer
0
 

Author Comment

by:newbuilder
ID: 2657957
nietod and drrinE
Mainly I want a unique number, can be handle form Microprocessor, CPUID or any one.
This is very good in Building the copyrights of the systems. When you make an application and it must execute in one machine (By name), your code can handle the CPUID and then execute.
I have no enough experiments in assembly language, give me complete code, executed successfully and take the points.  
0
 

Author Comment

by:newbuilder
ID: 2657981
To nietod and drrinE

No need the processor exactly, but a unique number form the PC,
I’m sorry, I was not meant the CPUID, because it is not a unique.  
Sorry again.
0
 
LVL 2

Expert Comment

by:DarrinE
ID: 2658043
give Neitod the points because he has answered your question - post a sperate question with exactly what you need

DarrinE
0
 
LVL 22

Expert Comment

by:nietod
ID: 2658154
200 points is a lot to spend on a useless, though correct, answer.  I'll withdraw my answer if DarreE wants to suggest a way of getting another unique ID.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2659344
MS do this when generating GUID (globbally unique identifiers).

According to the docs on it includes

"The truly globally unique IEEE machine identifier, obtained from a network card (the implementation does not require a network card; if no network card is present, a machine identifier can be synthesized from highly variable machine states and stored persistently)
"

maybe this would help you?
0
 
LVL 22

Expert Comment

by:nietod
ID: 2660503
That is what DarrenE is proposing.
0
 
LVL 4

Expert Comment

by:pellep
ID: 2664407
The Pentium III processors actually DO have a unique serial number, but not their predecessors. I recall a rather huge debate when rumors indicated that the new versions of MS office might include 'hidden' functions that stamped word-documents, outlook emails etc with this number. I recently downloaded a small utility from Intel which extracted the serial number from PIII processors. Access to this serial number can be switched on/off by software means. I suggest looking at Intels website for a utility called
'Intel Processor Serial Number utility'. However, it only works with Intel PIII processors.

Another approach would be to tie your software to the MAC-address of your network-card. It would not be unique to a computer, but to a network card. That address is guaranteed to be unique.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2667379
OK .. didn't relise the MAC address was the name for the unique id of the network card.

Perhaps you can try getting a GUID and using (part of) that.  Part of the GUID comes from the unique machine id, and part from the current date/time.  You may need to reverse engineer the GUID content unless you can find some info on it (I'm pretty sure there was some docs around a long time ago on the GUID internal format .. not sure).
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Expert Comment

by:nietod
ID: 2669228
I'd like to know what happened to newbuilder and DarrinE.  You there guys?
0
 

Author Comment

by:newbuilder
ID: 2669894
I'm listening.
But I want a code  
0
 
LVL 2

Expert Comment

by:DarrinE
ID: 2679719
In this situation - what is wrong with the HDD # ?? Its unique and very useable
0
 
LVL 2

Expert Comment

by:DarrinE
ID: 2679731
BTW - sorry for the delay but I was on Holidays <s> for a week !!!!
0
 
LVL 22

Expert Comment

by:nietod
ID: 2679804
How do you get the HDD #.  (Note that the volume serial number is available, but not really good for this.)
0
 
LVL 2

Expert Comment

by:DarrinE
ID: 2680210
I dont use the serial # for the HDD - but I'll look for the code anyway - I use the volume serial number as you've identified.

What I think this fella (or girl) really wants to try to complete is a security system to prevent his software from being copied - if I am right the the HDD "Volume serial" # is OK - I have been using it now successfully for several years (about 4 or 5) with little if no requests for "new" licenses based upon that number.

I can post the code but its "huge" - I would prefer that I make the code into a DLL and email it to everyone that wants it - there is really nothing special in it because the encryption used in it is proprietory and simply cant be hacked without some sort of extra ordinary effort - deleting a license file or the associated bits in the registry locks the program and renders it useless after 30days.

If anyone is interested I would enviseage having the code ready in about 30days - work permitting - points will be a key factor in how much is given away <s>

Otherwise I can walk you though the steps and simply give you the encryption code

Nietod - send me a private email on this subject for some more info (dwe@primus.com.au)
0
 
LVL 22

Expert Comment

by:nietod
ID: 2680368
The problem with the volume serial number is that the user has the ability to change it.  That would not be adequate for copy prevention security since the user could simply change the serial number of the machine running the copy so it matches the original.

Why is the code huge?  The volume number is available with GetVolumeInformation().
0
 
LVL 2

Expert Comment

by:DarrinE
ID: 2680389
The code that encrypts the information and then makes the license file.

How do you change the serial number ? I've never heard of that before
0
 
LVL 4

Expert Comment

by:pellep
ID: 2693861
The CPUID mentioned earlier will for PIII pocessors contain, in addition to the normal processor information, the unique serial number of the processor (see my earlier comment).
0
 
LVL 1

Expert Comment

by:Toad224
ID: 2719658
I believe the only processor which it is possible to do that on is Intel's Pentium III.  All other processors it is not possible to retrieve the serial number.  Secondly, the default for the P III serial number is off.  It will need to be turned on in the BIOS before it is accessable to software.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 200 total points
ID: 2733370
Here is code that should do what you want (by the prolific P.J.Naughter)

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=3&txtCodeId=174

>>>
A freeware dll to provide the basis for network copy registration PJSECURE is a simple C style dll which can be used as the basis for a network copy registration for your products. The program is freeware, meaning you are free to use it in anyway you like so long as you do not redistribute the source code with your product. The functions in pjsecure retrieves 2 pieces of information which can be used to uniquely identify a computer. The first function retrieves the NIC address of an installed network card. This 12 digit number is guaranteed unique by network card manufacturers. The second function returns the serial number associated with the "C" drive on your computer. With these 2 values you can build your own registration mechanisms on top. The enclosed zip file contains the PJSECURE source code (as a VC 5 workspace) and a simple console based application which exercises the dll.

PJ Naughter at http://indigo.ie/~pjn/index.html 
>>>

download from
http://www.planet-source-code.com/upload/ftp/CODE_UPLOAD1614.zip

Hope this helps !!

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now