Introduction to the IA-32 registers

Before we jump into 64-bit assembly on Linux, it's important to learn about 32-bit x86 assembly on Linux since it will make the transition to 64-bit go much more smoothly. While I understand most modern hosts run 64-bit operating systems, I'm a firm believer in solidifying basic knowledge before moving on to the current standard. With that said, I also don't believe we need to go too far back for the purposes of preparing you for the examples in this book. We'll go over the 8-bit and 16-bit registers while covering the 32-bit registers.

In modern 32-bit x86 processors, there are a total of eight general-purpose registers, six segment registers, an EFLAGS register, and an instruction pointer register. Some processors even contain additional registers to handle floating-point mathematical operations and extended registers for additional functionality. For the sake of simplicity, we'll stick to the general-purpose registers, EFLAGS register, and instruction pointer register. I'll leave it up to you to learn about segment registers and the rest of what your particular processor supports. I highly recommend doing that research, though, as there are some interesting obfuscation techniques that you can employ using extended registers when crafting malicious shellcode.

In this recipe, we will see what our processor is capable of and what operation modes it supports and learn about the important registers since they pertain to the recipes in later chapters.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.161.116