Click here to Skip to main content
16,003,873 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Preventing Brute Force Pin
Nish Nishant28-Mar-02 1:36
sitebuilderNish Nishant28-Mar-02 1:36 
GeneralRe: Preventing Brute Force Pin
Tomasz Sowinski28-Mar-02 1:42
Tomasz Sowinski28-Mar-02 1:42 
GeneralRe: Preventing Brute Force Pin
alex.barylski28-Mar-02 2:16
alex.barylski28-Mar-02 2:16 
GeneralRe: Preventing Brute Force Pin
Tomasz Sowinski28-Mar-02 5:31
Tomasz Sowinski28-Mar-02 5:31 
GeneralRe: Preventing Brute Force Pin
Jon Newman31-Mar-02 11:08
Jon Newman31-Mar-02 11:08 
GeneralRe: Preventing Brute Force Pin
Jon Hulatt28-Mar-02 2:57
Jon Hulatt28-Mar-02 2:57 
GeneralRe: Preventing Brute Force Pin
Jon Newman31-Mar-02 11:07
Jon Newman31-Mar-02 11:07 
GeneralRe: Preventing Brute Force Pin
Chris Losinger28-Mar-02 5:53
professionalChris Losinger28-Mar-02 5:53 
as a defense against that, you can do a CRC on your EXE. if that fails, you know someone has tweaked your app. yes, they can disable the CRC code too, but they probably won't even know it's doing a CRC until their first few crack attempts fail.

and, if you're clever, you can use the CRC check to do subtle failures; don't just pop up a message box and quit, do something strange - allocate huge (100MB) chunks of memory for no reason, put a random delay in a message pump, disable random controls - make it look like the crack attempt has broken something vital inside the app. you don't have to worry about annoying valid users - at this point you know the app has been tampered with somehow - either by a virus or a cracker.

the way they're going to discover the CRC is to watch the files that your EXE opens (by intercepting file open calls to the OS). so, make sure your EXE reads itself a lot, for many different reasons. also only do the CRC once in a while (only on odd-numbered days or something). there's no point in making it easy to discover.

beside CRC, you can use the results from your key checking code as vital parts of your app's functionality. encrypt important numbers (like the number of days in a year, the value of pi, or something else your app uses a lot) in your user keys - use the value from the key. that way, without decrypting a valid key, the app won't work as planned.

do the key check in many places.

don't use a function to do it. write a macro. this way, there isn't a single place to break, they have to find every place you've used the macro. even better, write many different macros that all do the test in a different way, and use them all. this adds yet another step they have to go through to crack your app.

as everyone is going to say , you can't really stop people. but you can try to make them give up in frustration.

use public key encryption if you can. it's easy to find the encryption keys in your code, so all they have to do is find the keys and start testing the key in various symmetric ciphers till they find the one that gives the same results as your app. then it's just a matter of arranging user data to get a keygen. this ain't gonna happen with public key encryption.

-c



Ah, but a programmer's reach should exceed his grasp, or what are late nights for?

Smaller Animals Software, Inc.

GeneralRe: Preventing Brute Force Pin
Jeremy Falcon28-Mar-02 7:35
professionalJeremy Falcon28-Mar-02 7:35 
GeneralRe: Preventing Brute Force Pin
Chris Losinger28-Mar-02 7:43
professionalChris Losinger28-Mar-02 7:43 
GeneralRe: Preventing Brute Force Pin
Paul M Watt28-Mar-02 9:07
mentorPaul M Watt28-Mar-02 9:07 
GeneralRe: Preventing Brute Force Pin
Neville Franks30-Mar-02 23:58
Neville Franks30-Mar-02 23:58 
GeneralRe: Preventing Brute Force Pin
Neville Franks31-Mar-02 0:03
Neville Franks31-Mar-02 0:03 
GeneralRe: Preventing Brute Force Pin
Russell Robinson31-Mar-02 11:00
Russell Robinson31-Mar-02 11:00 
GeneralProblem with loading a gray image file.. Pin
Neha28-Mar-02 0:07
Neha28-Mar-02 0:07 
GeneralRe: Problem with loading a gray image file.. Pin
Jack Handy28-Mar-02 0:08
Jack Handy28-Mar-02 0:08 
GeneralRe: Problem with loading a gray image file.. Pin
Tomasz Sowinski28-Mar-02 0:17
Tomasz Sowinski28-Mar-02 0:17 
GeneralRe: Problem with loading a gray image file.. Pin
Neha28-Mar-02 0:19
Neha28-Mar-02 0:19 
GeneralRe: Problem with loading a gray image file.. Pin
Tomasz Sowinski28-Mar-02 0:15
Tomasz Sowinski28-Mar-02 0:15 
GeneralRe: Problem with loading a gray image file.. Pin
Neha28-Mar-02 0:17
Neha28-Mar-02 0:17 
GeneralRe: Problem with loading a gray image file.. Pin
Tomasz Sowinski28-Mar-02 0:22
Tomasz Sowinski28-Mar-02 0:22 
GeneralRe: Problem with loading a gray image file.. Pin
Christian Graus28-Mar-02 1:21
protectorChristian Graus28-Mar-02 1:21 
GeneralRe: Problem with loading a gray image file.. Pin
Jon Hulatt28-Mar-02 3:01
Jon Hulatt28-Mar-02 3:01 
QuestionHow to use the point points to baseclass member to point to inherited class member? Pin
Feng Qin27-Mar-02 23:33
Feng Qin27-Mar-02 23:33 
AnswerRe: How to use the point points to baseclass member to point to inherited class member? Pin
Feng Qin27-Mar-02 23:38
Feng Qin27-Mar-02 23:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.