Lost Password?


Go Back   CodeCall Programming Forum > Software Development > Tutorials > Security Tutorials

Security Tutorials Tutorials on how to protect your software against crackers.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-24-2007, 11:33 AM
TcM's Avatar   
TcM TcM is offline
Code Warrior
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 8,332
Rep Power: 68
TcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of lightTcM is a glorious beacon of light
Default Algorithms - The Basics (PART 2)

Please Read Part 1 First:
Algorithms - The Basics (PART 1)

Now, that you are satisfied with your algorithm and instructions it is time to generate results according to your algorithm, so in this case I am going to pick up random numbers and assign each one a letter, of course not B, as that will be the result.

Now let’s take these as examples:

A=1234
C=550
D=3412

And apply that formula on these numbers:

((((1234 + 3412 ) – 550) / 2 ) * 5 ) ^ 2 = 104857600

Now let’s not forget that for the program to accept this serial we added some instructions, the program will only take the 2nd, 3rd,4th,5th and 6th numbers, so in our case B would be 048576, if you omit the 0, still the program will not accept it! So download the program and test this, enter the following values as follows:



And press ‘Register’ (this will not register anything, this will just check if the values given match the algorithm!) and it should accept it! If you are too lazy to work out this algorithm yourself you are free to press the ‘Generate Key’ button and then the ‘->’ button to transfer the values from the generation part to the validation part, as follows:



Now if you really want to test if this really works, write purely random numbers in all 4 text boxes and it will not work!



So of course the more complicated and the more mathematical functions your algorithm will have the harder it will be to break! And the additional steps of instructions would make it even more secure and harder for the user to crack and detect the whole algorithm (including the instructions), because if he discovers your formula and gets a result of 500898 (for example) he will have to figure out that the algorithm accepts only a few numbers of that number!

You can for example accept only the 1st,3rd,5th and so on, or you can apply another formula to that result! So you get a result from the first algorithm/formula, and than to that result you can add another formula. So it will be even harder for the user to crack! All you need to do is just know how to make this into your program, therefore you do need some good programming skills to achieve this, because perhaps the mathematical function can be made easily, but the instruction part might be difficult. And remember having a complicated algorithm is always better than having a simple one, so don’t be lazy, make the best you can, once the algorithm is done at least you can have a more hard to crack application, but as always it is not hack proof, and besides that read my Cracking tutorial here:
Cracking an Application Method One (PART 1)
So you can make an even better application, because it will be useless having a very complicated algorithm and then not having a secure application! Because with a simple process it can be cracked easily without the need of knowing the algorithm!

Now just to help you out this is a simple pseudo code, might help you when it comes to implement it into your program:

Code:
Number1 = Get Value of First Text box
Number2 = Get Value of Second Text box
Number3 = Get Value of Third Text box
Number4 = Get Value of Fourth Text box
Result = ((((Number1 + Number4) - Number3) / 2) * 5) ^ 2 //This is the formula, plain and simple
Result = Get The Result of the formula, Then Get the 2nd,3rd,4th,5th and 6th values of  it
If Result = Number2 Then 
MsgBox "Correct Registration Code"
Else MsgBox "Incorrect Registration Code”
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Algorithms - The Basics (PART 1) TcM Security Tutorials 0 11-24-2007 11:24 AM


All times are GMT -5. The time now is 06:50 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads