How it works...

Before we dive into explaining this recipe, let's digest the ELF specification as it pertains to analyzing binaries. First off, the acronym ELF stands for executable and linking format and happens to hold the championship trophy for its presence on Linux. ELF is everywhere on Linux and is the primary format for binaries. Every ELF file, regardless of whether it's an executable file, shared object file, or relocatable object file, begins with the ELF header. The ELF header is constructed using a C structure of the following format when viewing /usr/include/elf.h. This is shown in the following screenshot:

When examining the ...

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.