You are currently viewing Installing GEF on Arch Linux
Nevuer Cybersecurity & Hacking

Installing GEF on Arch Linux

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:

Shell

Once installed we can check that the process has been done correctly by checking the version:

Shell

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:

Shell

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:

Shell

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:

If you want to use GEF with the root user you must make the same steps from the root account

Important

SOLVING POSSIBLE ERRORS

UnicodeEncodeError:

When running GDB, the GEF console may not be displayed and the following error may occur:

Shell

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:

Shell

To solve this problem, follow the steps below:

Open the file:

Shell

Add the following:

Shell
/etc/enviroment

The final content of the file should be as follows:

Save and restart the system to apply the configuration:

Shell

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:

Shell

It is necessary to give it execution permissions beforehand:

Shell

I hope it will be as useful to you as it was to me.

Regards.

REFERENCES:

Leave a Reply