100个gdb小技巧中的一个一个命令卡片很适合入门,介绍的指令不多但是基本使用完全是够了,建议全部实现一边。如果还是觉得多,第一页是最低标准了。
之后在使用 gdb 进行调试的过程中如果遇到问题百度就成。
插件
这再推荐几个插件,可以很大程度上提升你的调试分析效率。
下面介绍的 peda、pwndbg、gef 三款插件可以通过重写 ~/.gdbinit 文件来更改所使用的插件。
在做栈溢出与格式化字符串相关漏洞分析时我喜欢用的一个插件。
1 | git clone https://github.com/longld/peda.git ~/peda |
在做堆相关漏洞时我最常使用的插件。
1 | git clone https://github.com/pwndbg/pwndbg |
1 | git clone https://github.com/hugsy/gef ~/gef |
1 | git clone https://github.com/gdbinit/Gdbinit.git ~/gdbinit |
参考资料
- hellogcc. 100个gdb小技巧
- Free Software Foundation. Debugging with GDB
- longld. peda
- pwndbg. pwndbg
- gdbinit. gdbinit
- hugsy. gef