반응형

Print your payload:

print payload


Pipe it into a file:

EverTokki@pico-2018-shell:~/rop$ python test.py > input


Breakpoint where your program returns:

EverTokki@pico-2018-shell:~/rop$ gdb -q gets

Reading symbols from gets...(no debugging symbols found)...done.

gdb-peda$ b *0x080488a2

Breakpoint 1 at 0x80488a2


Run it with your payload:

gdb-peda$ r < input

Starting program: /home/EverTokki/rop/gets < input

GIVE ME YOUR NAME!


Display your current pc (instruction): 

Breakpoint 1, 0x080488a2 in vuln ()

gdb-peda$ disp/3i $pc 

1: x/3i $pc

=> 0x80488a2 <vuln+38>: ret    

   0x80488a3 <main>: lea    ecx,[esp+0x4]

   0x80488a7 <main+4>: and    esp,0xfffffff0


Step into instructions:
gdb-peda$ si


Keep watching your registers and note when it screws up.


반응형

'STUDY > Documentation' 카테고리의 다른 글

Simple BOF Problem  (0) 2019.04.10
Debugging your ROP  (0) 2019.02.18
해커스쿨 문서 백업 (Syshacks)  (0) 2019.02.17
Bufferoverflow 기법 정리  (0) 2015.09.22
핸드레이  (0) 2015.09.05
strace, 제가 한번 사용해 보겠습니다.  (0) 2014.07.22

+ Recent posts