Identifying the elements of assembly language
As you work with shellcode and start seeing it visualized in assembly language, you will notice that an assembly program can be divided into three sections:
- The data section declares initialized data. At runtime, this data remains unchanged. In this area, you will find various constant values, filenames, buffer sizes, and so forth. The data section starts with the
section.data
declaration. - The bss section is used to declare variables; this is depicted by
section.bss
. - The text section is where the actual code or instructions are kept. This is depicted by
section.text
and begins with aglobal_start
declaration that informs the kernel of the execution point of the program. The code sequence for this text section looks as follows:section.text global _start _start:
When you work with assembly language, it's important to understand the various elements that you will find within it. Recall the example...