需要 GDB 10.0 或更高版本并带 Python3.10+ 绑定,版本不够会装不上;手动安装需把 source ~/.gdbinit-gef.py 写入 ~/.gdbinit 才会生效;更多社区命令需另外安装 GEF-Extras

gef
hugsyMIT活跃维护给 GDB 加上现代化调试体验的增强插件,为 Linux 上的漏洞利用开发和逆向工程师提供高级调试能力。
GEF (GDB Enhanced Features) - a modern experience for GDB with advanced debugging capabilities for exploit devs & reverse engineers on Linux
bash -c "$(curl -fsSL https://gef.blah.cat/sh)"README 未说明硬件要求,仅要求 GDB 10.0 以上且编译时带 Python3.10+ 绑定
给 GDB 加上现代调试体验的插件,帮漏洞开发和逆向工程师少敲重复命令
给 GDB 加上现代化调试体验的增强插件,为 Linux 上的漏洞利用开发和逆向工程师提供高级调试能力。
核心能力
- 用 Python API 扩展 GDB,提供大量增强命令
- 通过架构抽象层支持 x86/ARM/MIPS/PowerPC/SPARC
- 单文件 GDB 脚本,无额外依赖,可即时安装
- 提供更清晰的上下文视图,减少重复传统命令
- 支持 Python3,可基于其 API 自行扩展命令
容易踩的坑
- 2026.012026.01 - Substantial Snow最新正式版2026-02-02 · 2026-02-02 03:31 UTC
Changelog: 2026.01 - Substantial Snow
Contributors
Author Number of commits Gordon Messmer 3 crazy hugsy 3 GHOS7 1N 7H3 F1NG3RS 1 Guy Shimko 1 Jvle 1 Maxime Bonillo 1 Sami Kalliomäki 1 b10902118 1 tesuji 1 xpoy1 1 dependabot[bot] 0 Closed Issues
- 13 issues closed ( 1203 • 1201 • 1196 • 1190 • 1189 • 1188 • 1186 • 1185 • 1183 • 1180 • 1179 • 1178 • 1174 )
Closed Pull Requests
- 17 PRs closed ( 1209 • 1207 • 1206 • 1205 • 1204 • 1197 • 1195 • 1194 • 1193 • 1192 • 1191 • 1184 • 1182 • 1177 • 1175 • 1173 • 1172 )
Commit details
Commit log
- 2025-01-26 7638efe • b10902118 • fix enum.Flag empty check (#1167)
- 2025-02-12 c430473 • Gordon Messmer • Use the correct type for function passed to pthread_create. (#1171)
- 2025-02-13 57181d2 • tesuji • Setup fallback 'debug-file-directory' (#1173)
- 2025-02-23 265f22e • Gordon Messmer • Add a path argument to GotCommand build_line to support hugsy/gef-extras/pull/122 (#1172)
- 2025-03-15 4098b8f • xpoy1 • Always print top chunk when run
heap chunks -a(#1170) - 2025-03-16 c631746 • crazy hugsy • Verify
gdb.parameter("debug-file"directory")returns a string (#1177) - 2025-03-25 5404b6f • Maxime Bonillo • Install/update sh script: Avoid overwriting existing gdb config (#1175)
- 2025-04-08 63304c7 • Sami Kalliomäki • Fix location of syscall-tables for gef-extras installation script (#1182)
- 2025-04-15 ee605f9 • crazy hugsy • Limit the number of instructions when guessing args in
context
- 2025.012025.01 - Muted Actor2025-01-13 · 2025-01-13 02:54 UTC
查看更新说明
Changelog: 2025.01 - Muted Actor
Highlights of
Muted Actor- Bug Fixes: Resolved issues with scoped function calls, remote memory mappings, unicode encoding in non-ASCII locales, color swaps in heap/stack, excessive string reads, and typos across the codebase.
- New Features: Added support for multiple filter flags in the
vmmapcommand, a simplifiedclear screencommand, and extended testing capabilities in CI/CD. - Improvements: Moved to a Python 3.10 baseline, enhanced the arch command documentation, and updated the way optional arguments are parsed.
- RISC-V Support: Many refinements in handling core dumps and improvements for RISC-V instructions.
- Documentation update: Removed obsolete documentation now covered by gef-extras.
Contributors
Author Number of commits crazy hugsy 10 ValekoZ 4 Grazfather 2 arty-hlr 1 FunnyBiu 1 Gordon Messmer 1 Jörg Thalheim 1 Michael Krasnitski 1 Zion Leonahenahe Basque 1 New Contributors
- @fjh1997 made their first contribution in https://github.com/hugsy/gef/pull/1127
- @arty-hlr made their first contribution in https://github.com/hugsy/gef/pull/1136
- @ThePuzzlemaker made their first contribution in https://github.com/hugsy/gef/pull/1163
Closed Issues
Closed Pull Requests
- 19 PRs closed ( 1164 • 1163 • 1162 • 1160 • 1159 • 1156 • 1155 • 1153 • 1148 • 1146 • 1141 • 1139 • 1136 • 1133 • 1127 • 1126 • 1124 • 1122 • 1121 )
Commit details
Commit log
- 2024-06-05 0ca807b • crazy hugsy • Reload settings if gef-extras scripts were loaded (#1118)
- 2024-06-09 c450a2d • ValekoZ • Update
archcommand documentation (#1121) - 2024-06-24 6ddd780 • ValekoZ • [internal] Add a way to append values to optional arguments in
parse_argumentsdecorator (#1122) - 2024-07-21 d8c7723 • Zion Leonahenahe Basque • Fix an incorrect scoped function call (introduc
- 2024.062024.06 - Fresh Quantity2024-06-03 · 2024-06-03 03:41 UTC
查看更新说明
Changelog: 2024.06 - Fresh Quantity
Highlights of
Fresh Quantity- Use
info proc mappingby @hugsy in https://github.com/hugsy/gef/pull/1046 - Restore compatiblity with Python 3.6 by @hugsy in https://github.com/hugsy/gef/pull/1051
- Fixed 404 links in
docs/deprecated.mdby @hugsy in https://github.com/hugsy/gef/pull/1054 - Killing the last inconsistencies through type hints by @hugsy in https://github.com/hugsy/gef/pull/1052
- parse_arguments: Fix bool type by @Grazfather in https://github.com/hugsy/gef/pull/1056
- fix python version parsing by @samas69420 in https://github.com/hugsy/gef/pull/1058
- workflows: tests: Fix arg to check marks by @Grazfather in https://github.com/hugsy/gef/pull/1064
- Restore support for Python3.6 on LTS 18.04 by @hugsy in https://github.com/hugsy/gef/pull/1061
- Cleanup session managers to encapsulate & defer better by @Grazfather in https://github.com/hugsy/gef/pull/1066
- Fixed the install script - again by @hugsy in https://github.com/hugsy/gef/pull/1053
- Add a
sourcepost hook by @hugsy in https://github.com/hugsy/gef/pull/1059 - Fix recursive loop on architectures where
flagsregister is a dynamic value by @hugsy in https://github.com/hugsy/gef/pull/1065 - Fix support for
rrby @hugsy in https://github.com/hugsy/gef/pull/1047 - Support breakpoint.locations by @Angelo942 in https://github.com/hugsy/gef/pull/1068
- dereference_from: Use GEF_MAX_STRING_LENGTH by @Grazfather in https://github.com/hugsy/gef/pull/1075
- Update Documentation by @hugsy in https://github.com/hugsy/gef/pull/1069
flag_register_to_humanis not implemented on RISC-V architecture by @yuk1i in https://github.com/hugsy/gef/pull/1076- Remove pyenv related code (closes #1078) by @mattzque in https://github.com/hugsy/gef/pull/1084
- add skipi to docs by @therealdreg in https://github.com/hugsy/gef/pull/1087
- Evaluate arguments passed to
vmmapby @clubby789 in https://github.com/hugsy/gef/pull/1085 - add stepover command by @therealdreg in https://github.com/hugsy/gef/pull/1086
- Add
on_changedsetting hook by @hugsy in https://github.com/hugsy/gef/pull/1090 - Fix problems due to multiple matches in filename filters by @ValekoZ in https://github.com/hugsy/gef/pull/1083
- Avoid Python 3.8+ f-string debugging feature to restore 3.6+ compatibility by @Unactived in https://github.com/hugsy/gef/pull/1092
- add layout mapping API for external plugins by @therealdreg in https://github.com/hugsy/gef/pull/1093
- Supporting changes for the "got-audit" command. by @gordonmessmer in https://github.com/hugsy/gef/pull/1097
- Correctly parse offset from
info proc mappingsoutput (#1096) by @mjklbhvg in https://github.com/hugsy/gef/pull/1098 - update: gdb logging enable/disable command by @mtwoz in https://github.com/hugsy/gef/pull/1095
- [Docs] Fix typo by @hugsy in https://github.com/hugsy/gef/pull/1106
- [Docs]
pre-commitsetup and use by @hugsy in https://github.com/hugsy/gef/pull/1107 - Fix prompt length calculation by @ValekoZ in https://github.com/hugsy/gef/pull/1103
- Tests: Add more context benchmarks by @Grazfather in https://github.com/hugsy/gef/pull/1108
- Add an "--all" option to the got command by @gordonmessmer in https://github.com/hugsy/gef/pull/1101
- [cmd] Add a
archcommand for managinggef.archby @ValekoZ in https://github.com/hugsy/gef/pull/1114 - [libc] Fix
find_libc_versionfor checking each readable maps by @ValekoZ in https://github.com/hugsy/gef/pull/1110
Contributors
Author Number of commits crazy hugsy 29 Grazfather 5 ValekoZ 4 Dreg 3 Gordon Messmer 2 Angelo942 1 clubby789 1 Matthias Hecker 1 mjklbhvg 1 Saverio 1 Unactive 1 whoismz 1 Yuki 1 Closed Issues
- 8 issues closed ( 1104 • 1102 • [1099](https://github.com/hugs
- Use
- 2024.012024.01 - Evergreen Response2024-01-12 · 2024-01-12 16:43 UTC
查看更新说明
Changelog: 2024.01 - Evergreen Response
What's Changed in
Evergreen Response- install curl coverage.yml by @therealdreg in https://github.com/hugsy/gef/pull/997
- gef-remote: Fix issue with remote path having a space by @Grazfather in https://github.com/hugsy/gef/pull/998
- Tiny cleanup by @Grazfather in https://github.com/hugsy/gef/pull/994
- Let GefSetting write hooks see value by @Grazfather in https://github.com/hugsy/gef/pull/1000
- Fix gdb.execute not quoting paths by @Grazfather in https://github.com/hugsy/gef/pull/999
- Do not quote paths when running 'source' by @Grazfather in https://github.com/hugsy/gef/pull/1005
- show basename in source: split line by @bartman in https://github.com/hugsy/gef/pull/1017
- [Installers] Use latest tag, not main by @hugsy in https://github.com/hugsy/gef/pull/1007
- Reorder reset_arch: param forced, elf header, gdb conf by @josx in https://github.com/hugsy/gef/pull/1004
- Run validate CI step with Python 3.11 by @Grazfather in https://github.com/hugsy/gef/pull/1022
- [target-remote] Basic support for the
target remotecommand by @ValekoZ in https://github.com/hugsy/gef/pull/1020 - Coverage workflow should only be triggered by
pull_requestby @hugsy in https://github.com/hugsy/gef/pull/1023 - Dump memory usage when listing arenas, and add summary option in heap chunks command. by @r12f in https://github.com/hugsy/gef/pull/1024
- Memory map provider by @Grazfather in https://github.com/hugsy/gef/pull/1003
- Fix clear-screen timing when showing context by @r12f in https://github.com/hugsy/gef/pull/1026
- Add min-size and max-size filter to heap chunks command by @r12f in https://github.com/hugsy/gef/pull/1025
- Add c++ symbol support in xinfo. by @r12f in https://github.com/hugsy/gef/pull/1028
- Add config to override libc version. by @r12f in https://github.com/hugsy/gef/pull/1027
- Add option to resolve type when dumping heap summary. by @r12f in https://github.com/hugsy/gef/pull/1030
- Rename _target to debug_target for building test cases. by @r12f in https://github.com/hugsy/gef/pull/1031
- gef.sh: Fix
which: command not foundby @osalbahr in https://github.com/hugsy/gef/pull/1032 - [docs] document conditional context panes by @Ordoviz in https://github.com/hugsy/gef/pull/1035
- support 64 bit retval for stub by @Angelo942 in https://github.com/hugsy/gef/pull/1034
- Add count option in heap chunks command to limit the number of chunks to process / output. by @r12f in https://github.com/hugsy/gef/pull/1029
- correct parsing in gdb_get_location_from_symbol by @Angelo942 in https://github.com/hugsy/gef/pull/1037
- Migrate tests to RPyC by @hugsy in https://github.com/hugsy/gef/pull/1040
- Remove old context_times script + tuneup by @Grazfather in https://github.com/hugsy/gef/pull/1042
- Update rpyc example in
docs/testing.mdby @hugsy in https://github.com/hugsy/gef/pull/1041
Contributors
Author Number of commits Angelo942 2 Bart Trojanowski 1 crazy hugsy 4 Dreg 1 Grazfather 8 José Luis Di Biase 1 Lennard Hofmann 1 Osama Albahrani 1 Riff 8 ValekoZ 1 New Contributors 🎉
- @bartman made their first contribution in https://github.com/hugsy/gef/pull/1017
- @josx made their first contribution in https://github.com/hugsy/gef/pull/1004
- @ValekoZ made their first contribution in https://github.com/hugsy/gef/pull/1020
- @r12f made their first contribution in https://github.com/hugsy/gef/pull/1024
- @osalbahr made their first contribution in https://github.com/hugsy/gef/pull/1032
- @Ordoviz made their first contribution in https://github.com/hugsy/gef/pull/1035
- @Angelo942 made their first contribution in https://github.com/hugsy/gef/pull/1034
Closed Issues
- 9 issues closed ( 1036 • 1033 • [1018](https://github.com/hu
- 2023.082023.08 - Disguised Wedding2023-08-21 · 2023-08-21 20:24 UTC
查看更新说明
Changelog: 2023.08 - Disguised Wedding
Important Note
GEF and GEF-Extras have both moved to using the
mainbranch as the default. Therefore if you contribute to the code, make sure your PRs are made against themainbranch.Highlights of
Disguised Wedding- Fix typo in docs by @bkrl in https://github.com/hugsy/gef/pull/949
- Remove outdated sentence in docs by @bkrl in https://github.com/hugsy/gef/pull/948
- [docs] Regenerating
api/gef.mdby @hugsy in https://github.com/hugsy/gef/pull/951 - add nopi command it patchs full instructions by @therealdreg in https://github.com/hugsy/gef/pull/959
- nop: Fix off-by-one in unmap check by @Grazfather in https://github.com/hugsy/gef/pull/960
- Wrap docs by @Grazfather in https://github.com/hugsy/gef/pull/962
- add skipi command by @therealdreg in https://github.com/hugsy/gef/pull/964
- add site/ directory generated by mkdocs to .gitignore by @therealdreg in https://github.com/hugsy/gef/pull/968
- add new nop command features by @therealdreg in https://github.com/hugsy/gef/pull/967
- nop: Add force req when not already --f by @Grazfather in https://github.com/hugsy/gef/pull/970
- Small cleanup - sets by @Grazfather in https://github.com/hugsy/gef/pull/972
- Restore
autosave_breakpoints_filebehavior by @hugsy in https://github.com/hugsy/gef/pull/969 - Fix hardcoded NOP instructions for ARM/AARCH64 by @hugsy in https://github.com/hugsy/gef/pull/971
- reformat README by @Grazfather in https://github.com/hugsy/gef/pull/976
- Minor additions to the documentation by @hugsy in https://github.com/hugsy/gef/pull/975
- [Docs] Added linting for markdown files by @hugsy in https://github.com/hugsy/gef/pull/977
- fix issue link by @therealdreg in https://github.com/hugsy/gef/pull/979
- under license mit -> under mit license by @therealdreg in https://github.com/hugsy/gef/pull/980
- [CI] Upgrade notification actions by @hugsy in https://github.com/hugsy/gef/pull/981
- Restore
mainas the default branch by @hugsy in https://github.com/hugsy/gef/pull/983 - Switch dev refs to main by @hugsy in https://github.com/hugsy/gef/pull/982
- Setup
pre-commitfor GEF by @hugsy in https://github.com/hugsy/gef/pull/984 - add debugging instructions by @therealdreg in https://github.com/hugsy/gef/pull/985
- add forbidden words checks to coverage action by @therealdreg in https://github.com/hugsy/gef/pull/991
- [CI] Use
pull_request_targetfor coverage trigger by @hugsy in https://github.com/hugsy/gef/pull/990 - Fix context regs regression that broke reg order by @Grazfather in https://github.com/hugsy/gef/pull/993
- Added docs to debug using VSCode by @hugsy in https://github.com/hugsy/gef/pull/995
Contributors
Author Number of commits hugsy 13 Dreg 8 Grazfather 6 Alexander Zhang 2 New Contributors
- @bkrl made their first contribution in https://github.com/hugsy/gef/pull/949
Closed Issues
Closed Pull Requests
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
GEF (pronounced ʤɛf - "Jeff") is a set of commands for x86/64, ARM, MIPS, PowerPC and SPARC to
assist exploit developers and reverse-engineers when using old school GDB. It provides additional
features to GDB using the Python API to assist during the process of dynamic analysis and exploit
development. Application developers will also benefit from it, as GEF lifts a great part of regular
GDB obscurity, avoiding repeating traditional commands, or bringing out the relevant information
from the debugging runtime.
Instant Setup
Simply make sure you have GDB 10.0 or higher compiled with Python3.10+ bindings, then:
# via the install script
## using curl
$ bash -c "$(curl -fsSL https://gef.blah.cat/sh)"
## using wget
$ bash -c "$(wget https://gef.blah.cat/sh -O -)"
# or manually
$ wget -O ~/.gdbinit-gef.py -q https://gef.blah.cat/py
$ echo source ~/.gdbinit-gef.py >> ~/.gdbinit
# or alternatively from inside gdb directly
$ gdb -q
(gdb) pi import urllib.request as u, tempfile as t; g=t.NamedTemporaryFile(suffix='-gef.py'); open(g.name, 'wb+').write(u.urlopen('https://tinyurl.com/gef-main').read()); gdb.execute('source %s' % g.name)
You can immediately see that GEF is correctly installed by launching GDB:

A few of GEF features include:
- One single GDB script
- Entirely architecture agnostic, NO dependencies:
GEFis battery-included and is installable instantly - Fast limiting the number of dependencies and optimizing code to make the commands as fast as possible
- Provides a great variety of commands to drastically change your experience in GDB.
- Easily extensible to create other commands by providing d more comprehensible layout to GDB Python API.
- Full Python3 support (Python2 support was
dropped - see
gef-legacy). - Built around an architecture abstraction layer, so all commands work in any GDB-supported architecture such as x86-32/64, ARMv5/6/7, AARCH64, SPARC, MIPS, PowerPC, etc.
- Suited for real-life apps debugging, exploit development, just as much as CTF
- And a lot more commands contributed by the community available on GEF-Extras !!
Check out the Screenshot page for more or try it
online (user:gef/password:gef-demo)
Documentation
Unlike other GDB plugins, GEF has an extensive and up-to-date documentation. Users are recommended to refer to it as it may help them in their attempts to use GEF. In particular, new users should navigate through it (see the FAQ for common installation problems), and the problem persists, try to reach out for help on the Discord channel or submit an issue.
Current status
| Documentation | License | Compatibility | CI Tests (main) |
|---|---|---|---|
Contribute
To get involved, refer to the Contribution documentation and the guidelines to start.
Sponsors
Another way to contribute to keeping the project alive is by sponsoring it! Check out the sponsoring documentation for details so you can be part of the list of those awesome sponsors.