Debugging binaries for dynamic analysis
Tools such as Objdump are great for getting a look at the code in an executable while it's not executing. However, if you'd like to actually observe an executable in execution and find out more about how it processes information as well as how its internal data structures are altered by its execution, you will need something called a debugger. One such tool is called the GNU Debugger (GDB). In this section, we will cover the basic usage of GDB, and you will also get to know some of the tasks it allows us to pull off during a binary's execution.
Getting started with GDB
To start off with, let's load up a binary and run it in GDB using the following command:
gdb [binary]
For our current example, this command ...
Get Penetration Testing with the Bash shell 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.