-
[Pwnable] jmp, call 차이 (RTL chaning할 때 RET)Notepad/Pwnable 2021. 11. 3. 00:27
jmp : 해당 주소로 이동
call : RET(다음 실행 줄)를 스택에 저장하고 jmp
32bit 기준 call을 이용한 함수 호출
ebp+0 -> sfp
ebp+4 -> ret
ebp+8 -> 첫 번째 인자
RTL Chaning할 때는 call이 아닌 jmp로 호출하기 때문에 RET가 스택에 쌓이지 않지만
호출한 함수가 에필로그 과정을 거치기 때문에 ebp+4에 연계할 함수주소를 적어주면 됨
'Notepad > Pwnable' 카테고리의 다른 글
[Pwn] WSL2 gdb attatch / Windows Terminal로 화면 분할 (0) 2025.03.31 [Pwnable] pwntools로 libc 연결 (0) 2021.11.25 [Pwnable] stdin, stodout offset (pwntools) (0) 2021.10.25 [Pwnable] Generate prompt in Reverse shell with python (0) 2021.08.19 [Pwnable] Generate shellcode with gdb-peda (0) 2021.08.18