How it works...

Step 1 begins with us launching GDB in TUI mode against the edited binary. This edited version connects to our local machine instead of to the original IP address we discovered during static analysis. In step 2, we set a breakpoint at _start and ran the binary from within GDB. At this point, the registers aren't very interesting to look at since we haven't executed any instructions yet:

The stack isn't very interesting to look at either since we haven't executed any instructions that manipulate the stack. So, instead, we use the instructions in step 3 to see how the registers and stack have been initialized:

As we work through ...

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.