dcsimg
Results 1 to 10 of 10

Thread: Need code/advice on password protecting VB6 program

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    Need code/advice on password protecting VB6 program

    Hi there,

    I am selling my program online (advertised online, I post VB6 CD to user, not online sales) and I want my VB6 program to retrieve the customer's hardware ID number, then they email me there hardware ID number, then I enter there hardware ID number into an algorithm program at my end and I email them back a password (based on their algorithm). The password I email them allows them access to my program and prevent users from making pirate copies for other users because it only works on one computer per hardware ID number.

    Any advice, links, ideas etc is appreciated...

    Simon

  2. #2
    PowerPoster
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    2,580

    Re: Need code/advice on password protecting VB6 program

    How the user will use his licensed program in different hardware? e.g. desktop and laptop!



  3. #3
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,966

    Re: Need code/advice on password protecting VB6 program

    Hello,

    I think that this question would be better asked in the main VB6 forum, so going to move it there.

    Thanks

    Gary

  4. #4
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Need code/advice on password protecting VB6 program

    What is a 'hardware ID number'? Do you mean the Serial Number of the Disk Drive on which the Program is installed ?

    There may be an issue depending on your algorithm, the Customer will know their 'hardware ID number' and the Password you derive from it. They could possibly reverse engineer the Password back to the ID Number and hence discover your algorithm.

    Presumably you one-way encrypt the ID number in some way to create the password and then your application one-way encrypts the ID it's running on and compares the two. That would mean that your algorithm is already in the Program and potentially could be de-compiled or the instructions to perform the test could be NOP'd out.

    Software protection is a nightmare and often not worth the 'costs' in terms of time to implement, beyond something reasonably simple.

    Your method has some practical 'drawbacks' I can see:

    1. The Customer trusting you to send him a working Password (Would I part with my hard earned cash to buy your program, based on a promise that you'd send me a Password so I could use it ? - bear in mind I've never met you and know nothing about you - I'm not implying in any way, shape or form that you might be dishonest by the way, just being Devil's Advocate )

    Presumably, if the Customer didn't have an e-mail address, you'd have to send the password by post which is fraught with risks (at least in this county it is !).

    2. There's an assumption that the Customer can find their 'hardware ID number' (or do you provide something that finds it for them ?)

    3. How will you cope with the Program being installed on a Network Drive / Terminal Server accesible to tens or perhaps hunderds of users via a LAN?

    4. When the Customer changes their PC, or wants to re-install the program on a different drive, they will have to ask you for another Password. How will you know that the request has come from the original Customer ?(they might say that their e-mail / postal address has changed so you couldn't use those as verification) If you used the old ID Number then they could have told anyone what that was and hence you could be duped.
    Last edited by Doogle; May 28th, 2013 at 02:03 AM.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    Re: Need code/advice on password protecting VB6 program

    These are all good points and I appreciate everyone's feedback.

    Ideally I don't want to implement serial key etc because its quicker if I sell my program now but I don't want to "give" my program away for free. *example* I don't want a user to make 10 copies of my program, and that user gives it to ten of his mates for free.

  6. #6
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Need code/advice on password protecting VB6 program

    Dont bother with a hardware id. When the software is installed just generate a random serial number that is stored somewhere in the file system and that is displayed in the program's about box. When the user buys your software then he tells you his serial number and you generate an activation code that matches that serial number. If he installs the software on more than one computer then each will generate a different serial number so the activation code wont work.

    Its very simple and all of the points mentioned by other posters about shortcomings in such a system are valid. Its not a secure system. But dont worry about it.

    Activation codes etc are just meant to deter reasonably honest users from installing on multiple machines or giving a copy to their friend. Its not going to deter a hacker. So accept that and dont spend any time trying to make a rock solid system. You wont.

    My method is very simple and within 24 hours of me releasing a new product version the crakz and warez sites have keygens for it. Do i care? No i dont. If someone is going to steal software then i want them to steal mine. After all, he wasnt going to pay for software anyway so i didnt actually lose anything by letting him steal it. Even stolen software generates interest and site traffic.

    Although i will ask you why you want to deploy a CD? Give the user a free trial download with good tech support and you'll have more success when it comes to the customer sending money to a complete stranger.
    Last edited by IanS; May 28th, 2013 at 04:34 PM.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    Re: Need code/advice on password protecting VB6 program

    I was following this tutorial but you said "Don't bother with hardware ID/hard drive serial number.

    http://www.vbforums.com/showthread.p...tration-Scheme

  8. #8
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Need code/advice on password protecting VB6 program

    Use any number you want. I used to use the drive serial number but i sell to some large companies who build cloned work stations and laptops which they then issue to their employess. They all have the same drive serial number. I found out that they were moving my software around using the same activation codes. Not because they were intentionally stealing it but just because they couldnt be bothered taking the time to fill in a form for their buyer to buy another license. I switched to the random number method and that solved that problem.

    Some people use other ID such as the ethernet MAC address. With Intel processors you can get the processor ID. But if the user installs a new network card or changes whatever hardware you're ID'ing then he's going to be inconvenienced and he wont like you much.

    Personally i like my random number method. The user can change almost any of his hardware without being inconvenienced by having to re-activate. Its not a very secure system but it does what i want.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Posts
    206

    Re: Need code/advice on password protecting VB6 program

    Can hackers/coders etc use reverse engineering or programs to view my program's code? If I hard-code a 'random number method' serial generator into the first form of my program, can someone use a program to view the form(s) in my code and find out what my serial key generator algorithm is? Once anyone cracks my serial key algorithm, my programs defence is worthless. I opened my program .EXE file using notepad and most of it was 'gobbledygook', except for 10-20% of the text. Most of the readable text was from forms in my program (text boxes, descriptions etc), not actual code. I'm not trying to be super paranoid or anything about this ....

  10. #10
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    739

    Re: Need code/advice on password protecting VB6 program

    VB6 programs are harder to 'crack' than .net but if somebody wants to crack it they'll go into assembler. You have no defense against a determinined cracker who uses a dissambler into Assembler programming language.

    Just stop being so paranoid. You will never have 100% protection.

    You will always find hacked versions of Microsoft Windows and MS office. Dont you think with all of their money Microsoft could afford to protect their products? They can't because its not possible.


    If you want that then you need to reconsider your career options.
    Last edited by IanS; Jun 2nd, 2013 at 04:07 AM.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width