[dreamhack.io] 「hook」 풀이


[dreamhack.io] 「hook」 풀이

Dreamhack 난이도 이름 hook 미리 알아둘 것 워게임 <oneshot> 워게임 <fho> 이번에는 워게임 <oneshot> 에 이어 같이 이어지는 (그러나 풀이 방법이 좀 다른) <hook>에 대해 풀어봅시다. // gcc -o init_fini_array init_fini_array.c -Wl,-z,norelro #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <unistd.h> void alarm_handler() { puts("TIME OUT"); exit(-1); } void initialize() { setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdout, NULL, _IONBF, 0); signal(SIGALRM, alarm_handler); alarm(60); } int main(int argc, char *argv[]) { long *ptr; size_t s...


#__free_hook #pwnable #system #writeup #동적할당 #메모리 #메모리관리 #이중포인터 #포인터 #pwn #malloc #C #Clang #C언어 #dreamhack #exploitation #free #hook #hook_overwrite #풀이

원문링크 : [dreamhack.io] 「hook」 풀이