₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,143 members, 8,420,533 topics. Date: Thursday, 04 June 2026 at 11:50 PM

Toggle theme

Assembly Tutorial 2: Reverse Engineering. - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingAssembly Tutorial 2: Reverse Engineering. (1557 Views)

1 Reply

Assembly Tutorial 2: Reverse Engineering. by Nobody: 3:12pm On Sep 12, 2015
Okay Hi and Good Evening everyone.

Today i have wanted to present all of you with my second Assembly tutorial but many people on here been itching for Reverse Engineering , hence i decided to be generous enough to release some little tutorials about it. I am sorry i wont be going into much details like cracks and the rest. Just teach some little reversal , other things you could try for yourself after studying assembly.

Now Lets begin.
First of all What is Reverse Engineering? so many definitions would come up but by googles definition, we have it as

reverse engineering
noun
noun: reverse engineering
the reproduction of another manufacturer's product following detailed examination of its construction or composition.


Here we would be needing something simple to do this work

1. A Debugger (Ollydbg)
2. Knowledge of ASM
3. Time
4. A Brain smiley

So lets continue.

First of all i would like to show you this . So lets begin

Have a Look at this Code


#include "stdafx.h"
#include <Windows.h>
#include <stdio.h>
#include <stdlib.h>

int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MessageBoxA(NULL,"Hi am a MessageBox","",MB_OK);
return 0;
}


Hence i use Visual Studio , its a Win32 Windows Application and it looks like this inside the IDE

https://s16.postimg.org/sj45wj72t/image.png

Now I compile it and it Runs like this

https://s14.postimg.org/6qs36rl9t/result.png

Now thats that.

Now As we talked we gonna have to run the code in a Debugger to see how it does look like for this tutorial i choose to use Ollydbg. Instead of IDA or Immunity debbugger smiley

So lets open our Ollydbg

I made it to a shortcut so i can see it well

https://s4.postimg.org/sp63y4hkd/olly.png

When you run it it should look like this
https://s18.postimg.org/6ro232qg9/ollyopen.png

Now its in your hands. As you can see its blank then try running your code inside the debugger. As you can see its blank so When you run your executable inside your debugger you should have something that has so many ASM codes , so many push esp , mov esp epb and the rest like in the image below

https://s1.postimg.org/7enj4y3kv/swax.png

Okay dont be scared hit F2 on yur system to run the debugging. and Lets see What follows.

https://s11.postimg.org/68qn0mxhf/zlatan.png

Taada!! Now you see what happens , i reversed it back to Assembly code. to read it and work on it. You see that the code makes a call to the Function MessageBoxA and that displays the ASCII Characters as shown in the IDE .

This begins the tutorial for Reverse Engineering Basics. Will update Soon. My next tutorial will show how to Edit inside the debugger and change operations and others . Till then , You have Fun. Comments and critics are Welcome. smiley

Happy Coding. grin
Re: Assembly Tutorial 2: Reverse Engineering. by nembudziya(m): 8:15am On Sep 13, 2015
I am waiting for the next tut, thank u kindly. I am more interested on the part of reverse engineering trial version program, so ride on.
gimakon:
Okay Hi and Good Evening everyone.

Today i have wanted to present all of you with my second Assembly tutorial but many people on here been itching for Reverse Engineering , hence i decided to be generous enough to release some little tutorials about it. I am sorry i wont be going into much details like cracks and the rest. Just teach some little reversal , other things you could try for yourself after studying assembly.

Now Lets begin.
First of all What is Reverse Engineering? so many definitions would come up but by googles definition, we have it as

reverse engineering
noun
noun: reverse engineering
the reproduction of another manufacturer's product following detailed examination of its construction or composition.


Here we would be needing something simple to do this work

1. A Debugger (Ollydbg)
2. Knowledge of ASM
3. Time
4. A Brain smiley

So lets continue.

First of all i would like to show you this . So lets begin

Have a Look at this Code


#include "stdafx.h"
#include <Windows.h>
#include <stdio.h>
#include <stdlib.h>

int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
MessageBoxA(NULL,"Hi am a MessageBox","",MB_OK);
return 0;
}


Hence i use Visual Studio , its a Win32 Windows Application and it looks like this inside the IDE

https://s16.postimg.org/sj45wj72t/image.png

Now I compile it and it Runs like this

https://s14.postimg.org/6qs36rl9t/result.png

Now thats that.

Now As we talked we gonna have to run the code in a Debugger to see how it does look like for this tutorial i choose to use Ollydbg. Instead of IDA or Immunity debbugger smiley

So lets open our Ollydbg

I made it to a shortcut so i can see it well

https://s4.postimg.org/sp63y4hkd/olly.png

When you run it it should look like this
https://s18.postimg.org/6ro232qg9/ollyopen.png

Now its in your hands. As you can see its blank then try running your code inside the debugger. As you can see its blank so When you run your executable inside your debugger you should have something that has so many ASM codes , so many push esp , mov esp epb and the rest like in the image below

https://s1.postimg.org/7enj4y3kv/swax.png

Okay dont be scared hit F2 on yur system to run the debugging. and Lets see What follows.

https://s11.postimg.org/68qn0mxhf/zlatan.png

Taada!! Now you see what happens , i reversed it back to Assembly code. to read it and work on it. You see that the code makes a call to the Function MessageBoxA and that displays the ASCII Characters as shown in the IDE .

This begins the tutorial for Reverse Engineering Basics. Will update Soon. My next tutorial will show how to Edit inside the debugger and change operations and others . Till then , You have Fun. Comments and critics are Welcome. smiley

Happy Coding. grin
Re: Assembly Tutorial 2: Reverse Engineering. by emans(m): 11:44am On Sep 30, 2015
Nice tutorial.....
1 Reply

QUIZ: How Many Lines Of Code Can You Use To Reverse A ListIntroduction To Programming Using Microsoft Visual Basic – Tutorial 2.Assembly Tutorial : Part 1 (The Basics)234

Programming MADE EASY, Download All Programming Books At All Engineering StudiesBest Js Framework Ever...In Some Projects, I Can't Do Without Visual Foxpro.