目前pwndbg可以说是比较全能了,对qemu、无符号libc支持都较好。

目前在glibc没有调试符号的情况下,heap相关命令也能正常使用(且目前新版本无需开启任何开关)

qemu vmmap

gdb不用root运行时会报以下错误:

Permission error when attempting to parse page tables with gdb-pt-dump. Either change the kernel-vmmap setting, re-run GDB as root, or disable ptrace_scope (echo 0 | sudo tee /proc/sys/kernel/yama)

主要原因是新版pwndbg解析qemu目标的vmmap时使用了新方案,https://github.com/martinradev/gdb-pt-dump

解决方案也在报错里,可以把内核ptrace_scope 关了,虽然降低一些安全性,但反正是做题的虚拟机((,省得每次用root跑

(报错里写错了,应该是 echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope ,或者用 sudo sysctl -w kernel.yama.ptrace_scope=0

希望重启后仍有效就修改 /etc/sysctl.d/10-ptrace.conf kernel.yama.ptrace_scope = 0

升级

在升级本地pwndbg时,请检查:

  1. requirements.txt有无增加
  2. git pull
  3. git submodule update --init --recursive