Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,293 members, 7,807,996 topics. Date: Thursday, 25 April 2024 at 01:53 AM

Assembly Tutorial 2: Reverse Engineering. - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Assembly Tutorial 2: Reverse Engineering. (1438 Views)

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

(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



Now I compile it and it Runs like this



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



When you run it it should look like this


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



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



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



Now I compile it and it Runs like this



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



When you run it it should look like this


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



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



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)

Is My Udacity Nanodegree Certificate Powerful? / Has Anyone Hosted With Www.qservers.net / Programming Challenge

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 27
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.