In this post i show you a small guide for installing GEF on Arch Linux with solutions to possible issues that you may experience when running it.
GEF (pronounced ʤɛf – “Jeff”) is a command set for x86/64, ARM, MIPS, PowerPC and SPARC. It provides additional features to GDB using the Python API to help during the process of dynamic analysis and exploit development.GEF removes much of the usual obscurity from GDB, avoiding repetition of traditional commands, or pulling relevant information from the debug runtime.
To be able to run both GDB and GEF it is necessary to have Python3 installed previously.
1. GDB Installation
As a first step it is necessary to install GDB as a base, we can download it with Paru as follows:
Once installed we can check that the process has been done correctly by checking the version:
The GEF package is not included in the Arch repositories so we have to perform the following procedure:
2. GEF Instalation
Requeirements:
For the correct functioning of GEF it is necessary to install the following pyhton libraries:
Run the following command to install them quickly:
Download & Instalation:
To download and install GEF just run the following command from the command line which will download a script that automates the download and installation of the necessary packages:
If everything has gone well the command should not show any output. If you are curious to analyze the code it executes you can check it out at https://gef.blah.cat/sh .
At this point if you run GDB it should start with GEF:
SOLVING POSSIBLE ERRORS
UnicodeEncodeError:
When running GDB, the GEF console may not be displayed and the following error may occur:
The problem arises from a misconfiguration of the language configured in GDB so it is not able to recognize some characters, if we execute the following command we can visualize the environment variables that store the language:
To solve this problem, follow the steps below:
Open the file:
Add the following:
The final content of the file should be as follows:
Save and restart the system to apply the configuration:
Once applied, the configuration will be saved in the system and the other variables will be configured to this value:
Run GDB again to verify that the problem has been fixed and it shows you the GEF interface.
Permission denied:
In case you get the permission denied error when executing the file:
It is necessary to give it execution permissions beforehand:
I hope it will be as useful to you as it was to me.
Regards.