Book Image

Mastering Reverse Engineering

By : Reginald Wong
Book Image

Mastering Reverse Engineering

By: Reginald Wong

Overview of this book

If you want to analyze software in order to exploit its weaknesses and strengthen its defenses, then you should explore reverse engineering. Reverse Engineering is a hackerfriendly tool used to expose security flaws and questionable privacy practices.In this book, you will learn how to analyse software even without having access to its source code or design documents. You will start off by learning the low-level language used to communicate with the computer and then move on to covering reverse engineering techniques. Next, you will explore analysis techniques using real-world tools such as IDA Pro and x86dbg. As you progress through the chapters, you will walk through use cases encountered in reverse engineering, such as encryption and compression, used to obfuscate code, and how to to identify and overcome anti-debugging and anti-analysis tricks. Lastly, you will learn how to analyse other types of files that contain code. By the end of this book, you will have the confidence to perform reverse engineering.
Table of Contents (20 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Basic instructions


Assembly language is made up of direct lines of code that follow this syntax:

The label is used to define the location of the instruction line. It is generally used during development of an assembly code without prior knowledge of the address where the code will be placed in the memory. Some debuggers are able to support having the user label addresses with a readable name. A mnemonic is a human readable instruction, such as MOV, ADD and SUB. Every mnemonic is represented by a byte number or a couple of bytes called an opcode. The operands are the instruction's arguments. This is normally read as destination, source . In the instruction shown above, the eax register is the destination and the doubleword data stored at address 0x0AD4194. Finally, we can add comments to every instruction line of our program. 

Note

In assembly language, code comments are denoted by a semicolon (;)

 

 

Opcode bytes

Every instruction has an equivalent opcode (operation code) byte:

Address     Opcode...