Welcome Guest.
No account yet? Register
Who's Online
We have 40 guests online

You are here: Home
 EH-Net
May 25, 2013, 10:56:22 AM
 News: Go back to The Ethical Hacker Network Online Magazine Home Page
 Show Posts Pages: [1]
 1 Columns / Heffner / Re: [Article]-Intro to Reverse Engineering - Part 2 on: August 25, 2011, 01:05:49 PM ;DThis is an amazing tutorial! I took the liberty to further simplify the second function in the Keygen section. the pseudo-code simplifies to:Code://salt = 2YOPB3AQCVUXMNRS97WE0IZD4KLFGHJ8165T//key = user-entered key 5segment e.g. 12345x=0for (keyIndex=0 ; <5: ++){  for (saltIndex=0; <36 ; ++){    if (salt[saltIndex]== key[keyIndex]){      x = saltIndex+ 36*x    }  }}mod = x%divisor;  // if 0 then GOOD! else goto BadCodeAnd if you do some math you'll see that You can reverse the algorithm for calculating x down to this mathematical expression:// Let matches[] be an array containing the values of saltIndex where there is a match (in order). Then matches[0] is the first match and matches[n] is the nth (and last) match. Looking at the code, we see:fn(1)=  Match1fn(2) = 36*fn(1)+ Match2fn(3) = 36*fn(2)+ Match3fn(4) = 36*fn(3) + Match4Simplifying we can get x:x = matches[n]*360+matches[n-1]*361+ ... + matches[0]*36n and then you just check the mod!
 Pages: [1]
Page created in 0.071 seconds with 22 queries.

Exclusive Deal

5% Off w/ Code: EHN_5

SANS Deals 4 EH-Netters
5% OFF Any SANS Course in Any Format!
Coupon Code: EHN_5 Including SANS Rocky Mountain 2013 & SANS Boston 2013
Polls
Compared to this year, 2013 will be:
 Great! Better. About the same. Little worse. FUBAR!

Recent Forum Topics
EH-Net News Feeds