How it works...

In step 1, we used the cat command to investigate the /usr/include/i386-linux-gnu/asm/unistd_32.h file, which is a header file containing the system call numbers on our virtual machine's operating system. In assembly, we need to know these number values for any system call we plan to use in our code. These values, once set up properly in memory, help us to tell the processor which system call we want to execute. We can see the expected output in step 2. When reviewing this output, we can see that, if we want to use the write system call, we need to pass the number 4 to whatever register is responsible for holding this information. Step 3 is just a quick keyboard shortcut to open another tab in our current Terminal session. ...

Get Binary Analysis Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.