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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.