target remote :1234
Remote debugging using :1234
warning: while parsing target description (at line 1): Target description specified unknown architecture “aarch64”
warning: Could not load XML target description; ignoring
Truncated register 37 in remote ‘g’ packet
因为exploit64
是64位arm架构的,故需要使用qemu模拟执行,当使用qemu-aarch64 -g 1234 ./exploit64
,并且使用gdb
远程连接时
$ gdb
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
pwndbg: loaded 157 pwndbg commands and 45 shell commands. Type pwndbg [--shell | --all] [filter] for a list.
pwndbg: created $rebase, $base, $ida GDB functions (can be used with print/break)
------- tip of the day (disable with set show-tips off) -------
GDB's follow-fork-mode parameter can be used to set whether to trace parent or child after fork() calls
pwndbg> target remote :1234
Remote debugging using :1234
warning: while parsing target description (at line 1): Target description specified unknown architecture "aarch64"
warning: Could not load XML target description; ignoring
Truncated register 37 in remote 'g' packet
报了如上错。因为本机是x86架构的,故这里为了解决连接的问题,应该使用gdb-multiarch
来执行。
参考文件:https://stackoverflow.com/questions/53524546/gdbserver-target-description-specified-unknown-architecture-aarch64