Pwnable - 32bit ROP
- x86 calling convention
- The caller places all arguments to the callee on the
stack
- Arguments are pushed to the
stack
- Stack cleanup is performed by the calle
- The caller places all arguments to the callee on the
- rip control
/bin/sh\x00
address- leak the libc address. (e.g
got
) - got overwriting
- argument control? ->
pop [reg] ; ret
gadget address (Role is to addesp
)
Libc Leak
1 | payload = b'' |
Execute system('/bin/sh\x00')
1 | # restart main |