Patching binaries with pwntools
from pwn import *
elf = ELF('./be-quick-or-be-dead-1')
# List symbols at program
for key, address in elf.symbols.iteritems():
print key, hex(address)Understanding the binary
Main function
int __cdecl main(int argc, const char **argv, const char **envp){
header(*(_QWORD *)&argc, argv, envp);
set_timer();
get_key();
print_flag(*(_QWORD *)&argc);
return 0;
}Set_timer function
Get_key function
Patching the binary - Solution 1
Patching the binary - Solution 2
Last updated