我正在尝试二进制利用挑战,但我什至还没有尝试利用它,因为我在使用 pwntools 时遇到了一些问题。
我的代码目前非常简单:
from pwn import *
p = process("./restaurant")
gdb.attach(p)
但是当它使用 gdb (带有 pwndbg 扩展名)启动时,我遇到了以下情况
Reading symbols from ./restaurant...
(No debugging symbols found in ./restaurant)
Attaching to program: /home/dnw/Desktop/htb/pwn/pwn_restaurant/restaurant, process 2704
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...
Reading symbols from /usr/lib/debug/.build-id/1c/5391371d36e92a1c9d8074696881e98f5a5cc8.debug...
Reading symbols from /lib64/ld-linux-x86-64.so.2...
Reading symbols from /usr/lib/debug/.build-id/5b/e47e85c990f390b0dccb6ca9dc3e70f410dc6a.debug...
0x00007fc558394e8e in __GI___libc_read (fd=0, buf=0x7fc558464a03 <_IO_2_1_stdin_+131>, nbytes=1) at ../sysdeps/unix/sysv/linux/read.c:26
26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory.
如果我运行它而不通过 pwntools 附加它,我会得到同样的错误,而是附加它,gdb -p PID
但如果我只是在 gdb 中打开程序(gdb restaurant
)
几个小时以来,我一直在努力解决这个问题,所以任何见解/帮助都会很棒。