Reverse Engineering : An Introduction

Reverse Enginnering

Definition

At the basic level, Reverse Engineering is looking at things from outside in. It is like having a finalized piece with you like a software system or a hardware product that you want to analyze it to trace it back to its roots.

Why would you Reverse Engineer things?

There could be various reasons behind it. Maybe for your own financial gains , like your opponent launched a product into the market and you want to see how they built it. Or maybe because you want to fix some bugs in your product,optimize its performance ,audit its security or prevent copyright infringement.

Example : You might have come across cracked versions of some kind of game,video editing software,etc.
Ever wondered how this is possible? Well,this is an application of reverse engineering.

So Lets Begin!!

Programs/Software are written in high level language which are then converted to machine level language so that the machine can understand it and implement the instructions (as specified in the program/software)

The thing with machine level code is that we can’t understand it EASILY. It might end up banging your head against a wall before you understand what it is trying to do.

So, we came up with assembly level language that makes it a lot easier than to read machine level code. Assembly level code deals in mnemonics.
Like a = a+b in python could be written as add a,b in assembly level language.

Types of Syntax:

There are 2 types of syntax through which you can read the assembly code generated by your code

  1. AT&T Syntax
  2. Intel Syntax

I personally prefer AT&T syntax but its totally up-to you which one you choose or prefer.I’ll be listing out the differences between the two.

  1. The source , destination operands are written in the opposite order .
  2. Difference between Syntax
  3. In AT&T Syntax , a percentage sign (%) is prepended to the register names and a dollar sign is prepended to the constants.
  4. You’ll often see a character appended with an instruction.Which represents the size of the data involved.

Memory

The basic unit of memory is a bit. 8 Bits make up a byte. Combination of bytes (depending upon the architecture) make up a word.
Memory is represented in the form of words. A word a ordered set of bytes or bits that can be used to store , transmit or operate upon in computer.

Don't stop here.Learn more about it here.