Visual Basic Keygening
The Power 1.0 fr
Tutorial by ACiD BuRN [Immortal Descendants]
(September 30th, 1999)
Contents:
Introduction
ESSAY
Coding a Keygen!
------------------------------------------------------------------------------------
Volatility's Note: Source code for this essay is available Here
------------------------------------------------------------------------------------
Introduction:
this tutorial is on a VB Serial only protection.
the serial is based on the hard drive number...
we will study how the the valid serial is calculated , and how does
the prog calcul the valid serial ...
all this , to make a little keygen!
enough blablabla , let's start ...
btw :
tools of the trade are :
- Smart check 6 : must be well configured
- Visual Basic to code the keygen
- a lil brain
- the app: http://www.ifrance.com/vbandjava
ESSAY:
Fire up smart check , and run our target with it.
now you must see a msgbox saying us : "the power est un shareware...."
this mean : the power is a shareware , blablabla...
so , this is only a little nag , click on OK button , and now you must
see , an input box , with some text...
lemme traduce you it , we see :
"Le numero de votre disque (celui a partir duquel vous avez lancé the power)
is : (your hard disk serial number here)
Si vous souhaitez vous enreistrez , notez ce numero et blablablabla"
In english :
"the hard disk number (the one of the computer where the prower has been run)
is : (your hard disk serial number here)
if you would like to register , writte down this number blablabla..."
so , now i think you start to understand , the programme ask you to writte down your
hard disk based number , and send it to the author for registering.
so , this programme will need a keygen coz , the valid serial of your computer won't work
on others computer...
now , u understand , enter a fake serial in the input box : 112233 and click on the OK button!
you got a msgbox saying us : "Vous vous etes trompé(e) blablabla"
this mean : "you did an error blablabla"...
so , close this little progy , or end the task in smart check , and now we have to look for
the algo!
In smart check , double click on : Form1_load
now , we are looking for something messing with our hard disk serial (the api the most used is
GetvolumeinformationA)
look down , and you see it !!
GetVolumeInformationA(LPSTR:00413BA4....)
2 lines under it you see : Right(VARIANT:Double:8.92936e+008,long:8)
well , this look nice , click on it and look the value in the right window
you see : 892935893 <== this is our hard disk serial
so "Right(VARIANT:Double:8.92936e+008,long:8)" is equal to:"Right(VARIANT:Double:892935893,long:8)"
wich means it take value from the right with longer:8
the 8th value from the right of 892935893 are 92935893 (it is the serial we see in input box)
Btw , all this value are different on each computer because it is hard disk based!
About 2 lines under , you see :
Len(String:"92935893")returns LONG:8
click on it , and in view menu , choose , show all events...
now you see something like this:
Mid$(String:"92935893",long:1,VARIANT:Integer:1)
....
String("9") --> Double (9)
Double (9) --> Integer (9)
......
Mid$(String:"92935893",long:2,VARIANT:Integer:1)
....
String("2") --> Double (2)
Double (11) --> Integer (11)
......
Mid$(String:"92935893",long:3,VARIANT:Integer:1)
....
String("9") --> Double (9)
Double (20) --> Integer (20)
......
Mid$(String:"92935893",long:4,VARIANT:Integer:1)
....
String("3") --> Double (3)
Double (23) --> Integer (23)
......
Mid$(String:"92935893",long:5,VARIANT:Integer:1)
....
String("5") --> Double (5)
Double (28) --> Integer (28)
......
Mid$(String:"92935893",long:6,VARIANT:Integer:1)
....
String("8") --> Double (8)
Double (36) --> Integer (36)
......
Mid$(String:"92935893",long:7,VARIANT:Integer:1)
....
String("9") --> Double (9)
Double (45) --> Integer (45)
......
Mid$(String:"92935893",long:8,VARIANT:Integer:1)
....
String("3") --> Double (3)
Double (48) --> Integer (48)
......
so , you must wonder how this value are calculated!!
lemme explain a little bit :
it take each char of the serial , and add the next char to the previous
result, like this :
0 + 9 = 9 (0 coz 9 is 1st char , so nothing to add)
9 + 2 = 11
11 + 9 = 20
20 + 3 = 23
23 + 5 = 28
28 + 8 = 36
36 + 9 = 45
45 + 3 = 48
so , you see how this value is calculated , i just think a bit to
find how it does...
anyway , just under :
Mid$(String:"92935893",long:8,VARIANT:Integer:1)
....
String("3") --> Double (3)
Double (48) --> Integer (48)
there is :
Hex(VARIANT:integer:19952)
__vbastrVarMove(VARIANT:String:"4DF0") ....
.....
so , it take the hex value of 19952 (4DF0)
and if you scroll down a little , you will find the final compare :
__vbaStrCmp(String:"4DF0",String:"112233") returns DWORD: FFFFFFFF
this is the Visual basic function the most used to compare
here it compares : 4DF0 with 112233
112233 = fake serial , we entered
4DF0 = the hexadecimal of the serial we saw , few lines above. it is also the
valid serial to enter..
so , how can we get , this "19952" ??
lets look again what we saw in smart check :
Mid$(String:"92935893",long:8,VARIANT:Integer:1)
....
Double (48) --> Integer (48)
Hex(VARIANT:integer:19952)
__vbastrVarMove(VARIANT:String:"4DF0") ....
hmm , lets add 48 and 19952, we obtain : 20000
so , it looks like the programme substract the value from the hd serial to 20000.
48 = value from hard disk
20000 = constant
20000 - 48 = 19952
And after this , it just converts the result in hexadecimal
19952(d) = 4DF0(h)
and we get the good serial !!! : 4DF0
this is for my comuter !
let's code a lil keygen!
Coding a Keygen:
well for this , you need to use Windows API to get the hard disk serial
and then do the rest of the calculation...
I joined complete source with this tutor , but i will just show the part of
code who do calculations on the serial we get from our hard disk!!
I used Visual basic 5 to code this keygen...
-----------------------------little cut of source---------------------------------
'Here is normaly the code to get the hard disk number, look the full source joined
serial = Right(Format$(lngVolumeSerialNumber), 8)
'serial = our 8 first digits from the right of the full hard disk serial
Label1.Caption = "The value from your hard drive is: " + serial
For i = 1 To Len(serial)
temp = temp + Val(Mid(serial, i, 1))
Next i
'this is the loop to calculate the value from our hard disk
Text1.Text = "Your personal unlocking code is :" + Hex(20000 - temp)
'here comes the final serial , in hexadecimal
'ACiD BuRN / ID
-------------------------end of little cut of source-------------------------------
Now , u got a full Keygenerator for The Power v1.0
i hope you have understood all this essay , and if you got any comments , or
questions , just mail me to : ACiD_BuRN@nema.com or acid2600@hotmail.com
you can find all of my tuts at :
Web page URL: http://acidburn2000.cjb.net
Greetings:
group greetings : ID - ECLiPSE - CiA - ODT - EXEC - TiTaNe - PWA - PC - UCF- CORE
Also greetingz to: (no specific order)
R!SC, ^Inferno^, AB4DS, Cyber Blade, Klefz, , Volatility, TORN@DO, T4D
Jeff, [Virus], JaNe , Appbusta , Duelist , tKC , BuLLeT , Lucifer48 ,
MiZ , DnNuke , Bjanes , Skymarshall , afkayas , elmopio , SiFLyiNG ,
Fire Worx , Crackz , neural_en , WarezPup , _y , SiONIDE , SKORPIEN
Lazarus , Eternal_Bliss , Magic Raphoun , DEZM , Bisoux , Carpathia ,
K17 , theMc , noos , Xmen , TeeJi , JB007 , Arobas , T0AD ,ytc , Kwai_lo , Killer_3K
TaMaMBoLo , gizmo , Gota , ExtaBrain , Alpine , WarezPup...
eheh , i bet i forget some peoples :-/ , sorry !!!
ACiD BuRN / Immortal Descendants