GDB
Pwncollege
Debuggers
GDB / GNU Debugger
Debuggers, including gdb, observe the debugged program as it runs to expose information about its runtime behavior.
You start a program with the starti
command: (gdb) starti
starti
“starts the program at the very first instruction.”
In the line mov rdi, 567800
, you are moving the value 567800 into rdi
, rather than reading memory at the address 567800. To read memory, you must enclose the value in []
, such as: [567800]
.
Double dereference
Solution
mov rdi, [rax]
mov rdi, [rdi]
mov rax, 60
syscall