CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Join Date
    Sep 2003
    Location
    Bangladesh
    Posts
    38

    Is it possible to uniquely identify a PC by means of hardware?

    Does any hardware of the PC have unique number/address except the network card address, so that the computer can be uniquely identified? If so how to obtain that address. Can I make my application copy protected in this way?

  2. #2
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244
    Well, this is a real difficult question.
    There are a lot similar questions in this forum and many of the answers
    suggest use CPUID assembly instruction to get the CPU serial number.
    Also there is a WMI function (don't know which one) that returns a "CPU serial number".
    Just I want warn you to gain time: the actual AMD/Intel microprocessors do not support
    the serial number feature
    Take a look in this thread:
    http://www.codeguru.com/forum/showth...390#post706390
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  3. #3
    Join Date
    Jul 1999
    Posts
    15

    Use the harddisk serial number


  4. #4
    Join Date
    Dec 2001
    Location
    ROMANIA
    Posts
    30

    my way...

    another way is (and i'm using that) to read the motherboard loading program (that is a program ROM-BootStrap i guess) that executes what you saw when you restart your computer...

    this program starts at 0x000fe000 in physical memory, and should contain in it and the motherboard serial number (because it is showed on computer startup)

    so you can build a CRC on this and...there you have it...

    also, you can combine this with another method, but currently i'm using this and i'm pretty satisfied...

    DANI

    PS : salut Ovidiu, eu sunt din Bucuresti
    Last edited by iq0; September 2nd, 2003 at 05:47 PM.

  5. #5
    Join Date
    Aug 2001
    Location
    Sydney, Australia
    Posts
    813

    Re: my way...

    Originally posted by iq0
    this program starts at 0x000fe000 in physical memory, and should contain in it and the motherboard serial number (because it is showed on computer startup)
    Could you guide me on how I can do that please? What instructions do I use, which header/lib etc?
    Microsoft LVP - Least Valuable Professional

    Please rate this post... Pleeeeeeaaassee!!!

  6. #6
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    This question is asked occasionally in this forum but when it is asked it usually gets many answers and grows quite large. So if you can find previous answers you will have plenty to read.

    There is not an easy solution. Programmers have been attempting to protect their code since before the original IBM PC existed. The PC environment has still not developed a useful and practical solution. There might be something being developed by Microsoft and other companies but I forget the name of the project.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  7. #7
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    Originally posted by Sam Hobbs
    There might be something being developed by Microsoft and other companies but I forget the name of the project.
    You probably mean TCPA / Palladium, an initiative by the M$ / Intel Mafia which is currently heavily discussed...

    Another frequently used method (for machines with an ethernet adapter) is using the worldwide unique MAC address.

  8. #8
    Join Date
    Dec 2001
    Location
    ROMANIA
    Posts
    30

    here is something...

    i guess that this protection method is pretty interesting...
    here is what i was thinking of :

    the program must be build to be registered or unregistered
    in unregistered mode it does not had some functionality, but witch is still in the exe, the programmer simply passing over it...that part of the program should use a structure with some structure with some vital data, witch is encrypted...

    and now comes the interesting part...
    the user that want to register, selects an option and builds a file that contains the motherboard loading program (Rom BOOTSTRAP)...the programmer has that structure that i was talking early unencrypted, and with the file that he is receiving, he builds a CRC of some sort, then encrypts the structure with that CRC in a nasty way...then sends the ".KEY" file to the user, witch places that file in the program directory...
    the program must be build in such way, that searches for that file on every startup, so it knows it should be registered or not...when he sees the ".KEY" file, then it loads the file, reads the same motherboard loading program, builds the same CRC on it, decrypts with this key the file, and enables all the functionality that was not active...when the user is using that functionality, if the ".KEY" file is not good, then the program would use some other data than it should be...so it falls down...

    i know that it can be cracked (i don't know how easy because i'm not good at all in that stuff), but with some ugly algorithms...whi knows...

    i hope this is useful to somebody...

    aaa....i almost forgot...there is a link to a post of mine that contains a program with source to read that data for win9x/me/2k/nt/xp...
    the only limitation is that on NT/2K/XP platforms, the program should be started with an administrator account...you'll see...

  9. #9
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    The problem with protections like that is that someone with some time on his hands can either:
    1. try to figure out how your keys are generated (which, in many cases is not that difficult) and then generate a valid key himself
    2. look for the protection code in your program's executable and replace it by something like mov ax, 1 (indicating that the license is valid) and ret to exit the function.


    To guard against 1) is the first step, so you want to have a pretty difficult key generator. Many protection systems already fail there. To guard against 2) is pretty much impossible, you can only make it very very hard for someone uniniated.

    For the OP's question, you can also use the MAC address of the network card, of course, provided the computer has a network card attached. This being said, generating an unlock key based on the current hardware configuration can be very annoying to users. If your harddisk fails and you have to replace it, you'll get a new HD serial number and hence you will have to prove to the software manufacturer that you are actually using the software laffully and that they should give you a second unlock code. I had a problem like that when I bought a student version of Mathematica and upgraded my computer one component at a time over a year (I didn't want to spend too much money, so I just upgraded as necessary). Asking them for a new code again and again wasn't easy nor were they being very helpful, since they probably assumed that I was trying to install it on tenty different computers
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

  10. #10
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Wink Not free but excellent

    One efficient and widely used solution for software protection can be found here:
    http://www.ealaddin.com/hasp/default.asp?cf=tl
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  11. #11
    Join Date
    Aug 2001
    Location
    Sydney, Australia
    Posts
    813

    Re: Not free but excellent

    Originally posted by ovidiucucu
    One efficient and widely used solution for software protection can be found here:
    http://www.ealaddin.com/hasp/default.asp?cf=tl
    You see, ovidiucucu, I'm a complete cheapskate and it would be nice if I could find a really good way thats completely free.

    I'm serious.
    Microsoft LVP - Least Valuable Professional

    Please rate this post... Pleeeeeeaaassee!!!

  12. #12
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    Isn't that a dongle ?

    Dongles are pretty good both at protecting software and infuriating customers who can't install the drivers correctly
    Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
    Supports C++ and VB out of the box, but can be configured for other languages.

  13. #13
    Join Date
    May 1999
    Location
    Southern California
    Posts
    12,266
    Originally posted by Yves M
    Isn't that a dongle ?
    I have heard the (strange) terms "dongle" and "hasp" used in the same contexts and I see the URL has "hasp" in it.
    "Signature":
    My web site is Simple Samples.
    C# Corner Editor

  14. #14
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    HASP = Hardware Against Software Piracy

  15. #15
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244
    Originally posted by Yves M
    Isn't that a dongle ?

    Dongles are pretty good both at protecting software and infuriating customers who can't install the drivers correctly
    Almost 100% right but it seems being a typing error: one single word is missing:

    Dongles are pretty good both at protecting software and infuriating unauthorized customers
    who can't install the drivers correctly
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured