这是比 RE 更常规的编程问题。核心转储文件是创建文件时的进程状态(通常是由于崩溃),因此调试器命令最适合这种情况。在 Radare2 中,这些是来自d?类别的。
Usage: d # Debug commands
| db[?] Breakpoints commands
| dbt[?] Display backtrace based on dbg.btdepth and dbg.btalgo
| dc[?] Continue execution
| dd[?] File descriptors (!fd in r1)
| de[-sc] [perm] [rm] [e] Debug with ESIL (see de?)
| dg <file> Generate a core-file (WIP)
| dH [handler] Transplant process to a new handler
| di[?] Show debugger backend information (See dh)
| dk[?] List, send, get, set, signal handlers of child
| dL[?] List or set debugger handler
| dm[?] Show memory maps
| do[?] Open process (reload, alias for 'oo')
| doo[args] Reopen in debugger mode with args (alias for 'ood')
| dp[?] List, attach to process or thread id
| dr[?] Cpu registers
| ds[?] Step, over, source line
| dt[?] Display instruction traces (dtr=reset)
| dw <pid> Block prompt until pid dies
| dx[?] Inject and run code on target process (See gs)
您可以在通过发出dr命令创建 coredump 时获取寄存器的值,或者通过dbt.
但在那之后我不知道下一步该怎么办?
接下来的步骤实际上取决于您的情况 - 您想从该转储中获得什么。
我找不到有关在radare2 中使用核心文件的任何文档。
可能这不是 r2 中最常用的函数;)