-
Book Overview & Buying
-
Table Of Contents
Ghidra Software Reverse-Engineering for Beginners - Second Edition
By :
In this section, we will learn how to debug an application remotely. Earlier, I provided some example scenarios in which remote debugging might be helpful. From those scenarios, let’s pick debugging Linux executables using remote debugging. To do this, we need to have a virtual machine that’s running any Linux distribution. The first thing to do is compile simple_encode.c on Linux using gcc to produce a Linux executable (ELF) file. On a Linux machine, simply run the following command to build the simple_encoder executable:
gcc simple_encoder.c -O0 -o simple_encoder
The following figure shows the build and output of executing the simple_encoder executable on Linux, which is exactly the same as on Windows:
Figure 16.36 – Compiling and executing simple_encoder on the Linux box
If you don’t have gdbserver installed on your Linux machine, install it using the following command:
sudo apt-get install gdbserver...