Repolode
hugsy

hugsy/gef

A Python extension that adds an enhanced, exploit-development-oriented interface to GDB for x86, ARM, MIPS, PowerPC and SPARC.

Stars
8,425
Forks
841
Open issues
18
Last commit
3 months ago

What is it?

GEF (GDB Enhanced Features) is a single Python script that adds a modern interface and a set of commands on top of GDB. It is aimed at exploit developers and reverse engineers who do dynamic analysis, and it also helps application developers who debug programs and want less repetitive GDB work.

GEF is built on GDB's Python API and uses an architecture abstraction layer, so its commands work across x86-32/64, ARMv5/6/7, AARCH64, SPARC, MIPS and PowerPC. It has no external dependencies and is installed by sourcing one file from ~/.gdbinit. It requires GDB 10.0 or later built with Python 3 bindings.

The project provides a context display on each stop and a large set of commands for inspecting memory, registers and runtime state. Community-contributed commands are maintained in a separate GEF-Extras repository.

Key features

  • 01Single GDB script with no external dependencies
  • 02Architecture-agnostic commands for x86, ARM, MIPS, PowerPC and SPARC
  • 03Context display shown at each debugger stop
  • 04Extensible through the GDB Python API
  • 05Community command extensions via GEF-Extras

Use cases

  • Dynamic analysis of binaries during exploit development
  • Reverse engineering unfamiliar programs on Linux
  • Solving CTF pwn challenges with a richer GDB interface
  • Debugging application crashes with less manual GDB scripting

Quick start

  1. 1

    Make sure GDB 10.0 or higher is installed with Python 3.10+ bindings

  2. 2

    Download the GEF script to your home directory

    wget -O ~/.gdbinit-gef.py -q https://gef.blah.cat/py
  3. 3

    Add the script to your .gdbinit file

    echo source ~/.gdbinit-gef.py >> ~/.gdbinit
  4. 4

    Launch GDB to confirm GEF loads

    gdb -q

Things to know

  • Requires GDB 10.0 or higher built with Python 3.10+ bindings.
  • Targets GDB only and is aimed at exploit development and reverse engineering workflows.

In collections

Topics

FAQ

What is gef?
A Python extension that adds an enhanced, exploit-development-oriented interface to GDB for x86, ARM, MIPS, PowerPC and SPARC. GEF (GDB Enhanced Features) is a single Python script that adds a modern interface and a set of commands on top of GDB. It is aimed at exploit developers and reverse engineers who do dynamic analysis, and it also helps application developers who debug programs and want less repetitive GDB work.
Is gef free to use? What license does it have?
gef is open source under the MIT license. Check the license terms before using it in commercial products.
Is gef still maintained?
Updated within 6 months. The last commit to gef was on Aug 20, 2026.
What can I use gef for?
Dynamic analysis of binaries during exploit development Reverse engineering unfamiliar programs on Linux Solving CTF pwn challenges with a richer GDB interface Debugging application crashes with less manual GDB scripting
How do I install gef?
Make sure GDB 10.0 or higher is installed with Python 3.10+ bindings Download the GEF script to your home directory: wget -O ~/.gdbinit-gef.py -q https://gef.blah.cat/py Add the script to your .gdbinit file: echo source ~/.gdbinit-gef.py >> ~/.gdbinit Launch GDB to confirm GEF loads: gdb -q
Where can I get gef?
The source code and installation instructions are on GitHub: https://github.com/hugsy/gef

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects