The Way to Programming
The Way to Programming
Would you like to learn how to Disassemble and Reverse a software program – IDA-PRO?? Here is guide where you can understand how to do it.
Tools you will need : IDA – PRO the best Disassembler – Debugger Available, Hexplorer or any Hex Editor, Windows Notepad, and Some knowledge of Assembly Language.
I have recently posted 3 Programs on this Forum, and I can give detailed information as to how they were Reversed,
what was changed, and how the code to change was found.
I use IDA PRO VERSION 6.5 and IDA PRO is posted on this forum, and Hexplorer is available on Sourceforge.
How about starting with Creature Animation 1-62 Pro a 64 bit Program, and was very easy to crack, or maybe AppyGen 5-5 it’s a 32 Bit App and Game Creator for Mobile Phones, and was not a difficult program, taking less than an hour.
Gather up your tools, and Lets get started.
Selected the AppyGen program as the 1st example as it is a 32 Bit Program. Download, and Install the Program.
On 1st start by Clicking AppyGEN.exe you will see a message box saying: “Please Activate your AppyGEN Copy First”, Click OK, and TurboActivate.exe will be called by AppyGEN.exe for Activation, and will put up an Activation box.
Notice the 00685E6C cmp byte ptr [ebp-5], 0 as it's a Compare to Zero, and 0 is False, and at 00685E70 jz short loc_685E96 the jz is a JUMP IF ZERO to the LINE AT ADDRESS loc_685E96, NOTICE THE : 00685E8A mov edx, offset aAppygenActivat ; "AppyGEN Activated" The code is a MOVE TO REGISTER edx the Address of data label : aAppygenActivat - "AppyGEN Activated"
We want to run this code, and not jump. To not jump while running the program in the Debugger : move the mouse to the Next line of code, Right Click, and set the IP Address to that Instruction. IP is the Instruction Pointer Register which is a line Instruction counter.
AppyGEN, exe:00685E5C ; --------------------------------------------------------------------------- AppyGEN, exe:00685E5C AppyGEN, exe:00685E5C loc_685E5C: ; CODE XREF: AppyGEN, exe:00685E1Cj AppyGEN, exe:00685E5C cmp byte ptr [ebp-6], 4 AppyGEN, exe:00685E60 jnz short loc_685E6C AppyGEN, exe:00685E62 mov eax, offset aNoInternetConn ; "No Internet Connexion Found ! Please Co",,, AppyGEN, exe:00685E67 call near ptr unk_57F168 AppyGEN, exe:00685E6C AppyGEN, exe:00685E6C loc_685E6C: ; CODE XREF: AppyGEN, exe:00685E60j AppyGEN, exe:00685E6C cmp byte ptr [ebp-5], 0 AppyGEN, exe:00685E70 jz short loc_685E96 ; DON'T JUMP AppyGEN, exe:00685E72 mov eax, off_6E89E8 ; MOVE TO THIS LINE AND SET IP AppyGEN, exe:00685E77 mov eax, [eax+3C0h] AppyGEN, exe:00685E7D mov eax, [eax+288h] AppyGEN, exe:00685E83 xor edx, edx AppyGEN, exe:00685E85 call near ptr unk_56BAC4 AppyGEN, exe:00685E8A mov edx, offset aAppygenActivat ; "AppyGEN Activated" MESSAGE DISPLAYED - BOTTOM PROGRAM WINDOW AppyGEN, exe:00685E8F call near ptr unk_56BA20 AppyGEN, exe:00685E94 jmp short loc_685EE0 AppyGEN, exe:00685E96 ; ---------------------------------------------------------------------------
In the Next Lesson we will learn how to locate the code that needs to be changed, and how to change it.
text:00685DA4 ; =============== S U B R O U T I N E ======================================= text:00685DA4 text:00685DA4 ; Attributes: bp-based frame text:00685DA4 text:00685DA4 ; int __fastcall Unit1::softwareactivate(Unit1 *__hidden this) text:00685DA4 @Unit1@softwareactivate$qqrv proc near ; CODE XREF: _TForm1_FormCreate:loc_6861ECp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ LEFT OUT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text:00685E6C loc_685E6C: ; CODE XREF: Unit1::softwareactivate(void)+BCj text:00685E6C cmp [ebp+isActivated], 0 text:00685E70 jz short loc_685E96 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~LEFT OUT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ text:00685E8A mov edx, offset aAppygenActivat ; "AppyGEN Activated" text:00685E8F call @Vcl@Comctrls@TStatusPanel@SetText$qqrx20System@UnicodeString ; text:00685E9B call @Vcl@Dialogs@ShowMessage$qqrx20System@UnicodeString ;cl::Dialogs::ShowMessage(System::UnicodeString) text:00685EA0 push 1 ; wchar_t * text:00685EA2 push offset dword_686144 ; wchar_t * text:00685EA7 push offset dword_686144 ; wchar_t * text:00685EAC lea eax, [ebp+var_18] text:00685EAF mov ecx, offset aTurboactivate_ ; "TurboActivate,exe"
The jump that we didn’t do is not the code that needs to be changed to Activate the Program
SEE CODE BELOW :
The mov al, 1 is a MOVE 1 = NUMBER 1 to REGISTER al THE NEXT INSTRUCTION IS MOVE THE 1 IN Register AL TO VARIABLE isActivated
text:00685E0F mov al, 1 text:00685E11 loc_685E11: ; CODE XREF: Unit1::softwareactivate(void)+69j text:00685E11 mov [ebp+isActivated], al
text:0066A12D loc_66A12D: ; CODE XREF: Turboactivateunit::TurboActivate::IsGenuine(uint,uint,bool,bool)+54j text:0066A12D ; Turboactivateunit::TurboActivate::IsGenuine(uint,uint,bool,bool)+60j ... text:0066A12D mov [ebp+var_D], 2
USE THE F8 KEY, or F9 KEY TO RUN THE PROGRAM TO RETURN TO THE LINE BELOW BREAK-POINT WHERE THE CALL WAS ENTERED
text:00685DF1 call @Turboactivateunit@TurboActivate@IsGenuine$qqruiuioo ; TurboActivate::IsGenuine text:00685DF6 mov [ebp+var_6], al ; al was set = 2 in the call above, but we want it to = 1 text:00685DF9 cmp [ebp+var_6], 0 ; PLACE YOUR MOUSE OVER AL OR VAR_6 and YOU WILL SEE IT'S = 2 text:00685DFD jz short loc_685E0F ; WE WANT TO GO HERE text:00685DFF cmp [ebp+var_6], 1 text:00685E03 jz short loc_685E0F text:00685E05 cmp [ebp+var_6], 4 text:00685E09 jz short loc_685E0F text:00685E0B xor eax, eax ; XOR sets Register EAX = ZERO, al is the Low byte Register of EAX text:00685E0D jmp short loc_685E11 ; DON'T JUMP WE DON'T WANT TO GO THERE -------------------------------------------------------------------------------------- ; HEX CODE FROM THE HEX VIEW-A TAB OF IDA 00685E0D EB 02 B0 01 88 45 FB 33 C0 5A 59 59 64 89 10 EB --- EB 02 B0 01 88 45 FB 33 C0 5A 59 59 64 89 10 EB 00685E0D EB 00 - B0 01 88 45 FB 33 C0 5A 59 59 64 89 10 EB CHANGE THE EB 02 to EB 00 - Don't jump --------------------------------------------------------------------------------------- text:00685E0F text:00685E0F loc_685E0F: ; CODE XREF: Unit1::softwareactivate(void)+59j text:00685E0F ; Unit1::softwareactivate(void)+5Fj ... text:00685E0F mov al, 1 ; WE WANT AL TO BE = 1 text:00685E11 text:00685E11 loc_685E11: ; CODE XREF: Unit1::softwareactivate(void)+69j text:00685E11 mov [ebp+isActivated], al ; NOW isActivated = 1 or TRUE It's ACTIVATED text:00685E14 xor eax, eax text:00685E16 pop edx text:00685E17 pop ecx text:00685E18 pop ecx text:00685E19 mov fs:[eax], edx text:00685E1C jmp short loc_685E5C ; JUMPS, AND COMES TO CODE THAT WE ORIGINALLY DIDN'T JUMP AT text:00685E1E ; --------------------------------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .text:00685E6C loc_685E6C: ; CODE XREF: Unit1::softwareactivate(void)+BCj .text:00685E6C cmp [ebp+isActivated], 0 .text:00685E70 jz short loc_685E96
IN THE NEXT LESSON WE WILL LEARN HOW TO CHANGE THE CODE WITH A HEX EDITOR
CHANGE 1 :
text:00685E0D jmp short loc_685E11 ; DON'T JUMP WE DON'T WANT TO GO THERE -------------------------------------------------------------------------------------- ; HEX CODE FROM THE HEX VIEW-A TAB OF IDA 00685E0D EB 02 B0 01 88 45 FB 33 C0 5A 59 59 64 89 10 EB EB 02 B0 01 88 45 FB 33 C0 5A 59 59 64 89 10 EB 00685E0D EB 00 - B0 01 88 45 FB 33 C0 5A 59 59 64 89 10 EB CHANGE THE EB 02 to EB 00 - Don't jump
CHANGE 2:
text:0066A12D mov [ebp+var_D], 2 ; jumptable 0066A070 default case ----------------------------------------------------------- 0066A12D C6 45 F3 02 8A 45 F3 8B E5 5D C2 08 00 8B C0 55 C645F3028A45F38BE55DC208008BC055 0066A12D C6 45 F3 01 - 8A 45 F3 8B E5 5D C2 08 00 8B C0 55 -----------------------------------------------------------
Congratulations, you have Reversed your 1st Program, and it only took 2 bytes !
Sign in to your account